Hi Fred,

On Tuesday 01 June 2010, Frederic Bouvier wrote:
> I am trying to implement a view dependent LOD scheme that needs the size
> and position of a drawable (or a node) on screen. A 2D bounding box could
> make the job. Is there something already done in OSG or should I continue
> to use unproject on vertices ?
Nothing that I know of.

I assume you are working on flightgear?
... getting offtopic now ...

Small feature culling is something similar. But as far as I know this works on 
the diameter of the bounding sphere. True?
So this won't help for the tiles.

May be the observation that the scenery tiles in flightgear all have a 
transform node that aligns the drawable coordinate axis to the horizontal 
local frame helps you to avoid doing that on every vertex.

This is done because of usual scenery tiles are mostly flat and thus having 
then the tightest possible axis aligned bounding box for most cases. This 
helps culling and the elevation computation.
But given that, it might be sufficient for you to use the drawables bounding 
box corner vertices and unproject them instead of all vertices in a drawable.
Sure, you can be fooled by that heuristic, but it might be sufficient and it 
is cheap.

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to