HI Gianni,

For faster intersections it is far better to build the kdtree first. Also
splitting your huge geometry in several could help to traverse the graph in
case you don't want to use kdtrees.

Cheers.

2017-07-18 12:17 GMT+02:00 Gianni Ambrosio <g.ambrosio+...@gmail.com>:

> Hi All,
> I built a test geometry with about 9M triangles and 27M vertices. The
> intent of my spike solution (attached) is to select a triangle with mouse
> to change its color. I realized that the bottleneck of that code is the
> line where the camera accepts the "osgUtil::IntersectionVisitor" (line 51:
> camera->accept(iv)). That call takes most of the computation time.
> Debugging the OSG code I fall into:
>
> void LineSegmentIntersector::intersect(osgUtil::IntersectionVisitor& iv,
> osg::Drawable* drawable, const osg::Vec3d& s, const osg::Vec3d& e)
>
> In that code there are different methods to be used: KdTree,
> USE_DOUBLE_CALCULATIONS or USE_FLOAT_CALCULATIONS.
> On the basis of your experience, is one of the previous method ideal to
> solve my performance issue or something else must be done?
>
> Best regards,
> Gianni
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71281#71281
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Jordi Torres
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to