[osg-users] kd-Tree LineIntersection speedUp

Adrian Egli 3dhelp at gmail.com
Mon Oct 29 06:45:28 PDT 2007

Hi Jean-Sebastien,

what i do at the moment is, i walk trought the drawables and collect all
triangles, so i don't care about material, ... nor transformations. what i
should do is to transform the triangles before insertion. but i don't like
this way. another possibility is:
for each geometry (hard) we can attache a kd-tree object, and then the
intersection visitor transforms the objects when a transformation node is
used, this is the
way it works with the current intersection visitor (if i am not wrong), so i
like just to replace a small part of code in OSG core, to check a ray (line)
against the kd-tree
and not against the list of triangles in the geometry. so we can speed up
the intersection testing. but what we need is to implement this into osg


2007/10/29, Jean-Sébastien Guay <jean-sebastien.guay at polymtl.ca>:
> Hello Adrian,
> > The code as it stands does not currently support transforms. Can you
> >> help with that? I have never personally implemented a kd-tree
> >> algorithm, so I do not know where this support of transforms needs to
> >> be put in.
> >
> > correct, but when we have integrated it into the core of osg, then it
> should
> > work as expected.
> I still don't understand why the code would
> a) not support transformations if it isn't integrated into core OSG
> b) support them once it is.
> It's the same code, it won't "magically" support transforms, you need
> to write the code for that... Please explain, because there's
> something I'm missing here.
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
>                          http://whitestar02.webhop.org/
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071029/42226ef3/attachment-0003.htm>

More information about the osg-users mailing list