[osg-users] kd-Tree LineIntersection speedUp
3dhelp at gmail.com
Mon Oct 29 06:45:28 PDT 2007
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
> > 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.
> Jean-Sebastien Guay jean-sebastien.guay at polymtl.ca
> This message was sent using IMP, the Internet Messaging Program.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users