Hi Paul,

There is an osg::ComputeBoundVisitor that will compute the tight
bounding box of a subgraph, you can use this instead of the
node->getBound().

Robert.

On Jan 23, 2008 3:28 AM, Paul Pocock <[EMAIL PROTECTED]> wrote:
> Hi,
> Wondering if anyone from the list can help me.
>
>  I have a 3x3 grid of tiles from a terrain database, my aim is to get an
> outline representation of this 3x3 by just using lines to represent each
> tile.
>
> My solution is the following:
>
> osg::BoundingBox bbox ;
> bbox.expandBy(node->getBound());
>
>
>
> vertices->push_back(bbox.corner(0));
> vertices->push_back(bbox.corner(1));
>
> vertices->push_back(bbox.corner(1));
> vertices->push_back(bbox.corner(3));
>
> vertices->push_back(bbox.corner(2));
> vertices->push_back(bbox.corner(3));
>
> vertices->push_back(bbox.corner(3));
> vertices->push_back(bbox.corner(2));
>
> vertices->push_back(bbox.corner(0));
> vertices->push_back(bbox.corner(2));
>
>
> My problem stems from the fact that the square is way to big. I believe
> it stems from the fact I'm using BoundingSphere to calculate extents.Is
> there an obvious solution to this problem - To get a square that is
> precisely the dimensions of the terrain tile?
>
> Thanks in Advance
>
> Paul
>
>
>
>
>
> IMPORTANT: This email remains the property of the Australian Defence 
> Organisation and is subject to the jurisdiction of section 70 of the CRIMES 
> ACT 1914.  If you have received this email in error, you are requested to 
> contact the sender and delete the email.
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to