[osg-users] kd-Tree LineIntersection speedUp

Jean-Sébastien Guay jean-sebastien.guay at polymtl.ca
Mon Oct 29 07:27:09 PDT 2007


Hello Adrian,

> 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
> core.

That second way makes more sense. But you don't necessarily need to  
integrate it into the core OSG...

If you want to do that without having to wait for someone to integrate  
it into the core OSG, you could just copy the classes you need from  
the OSG source tree into your sources, rename them so they don't clash  
and then modify them as needed. That way we could progress on this and  
later, when Robert is available, you'll have even less changes needed  
to integrate your code into the core.

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.





More information about the osg-users mailing list