Hi Tony, On 22 January 2016 at 02:31, Tony Vasile <ming...@gmail.com> wrote: > By the way what are the following fields in > osgUtil::LineSegmentIntersector::Intersection : > > double ratio; > osg::NodePath nodePath; > osg::ref_ptr<osg::Drawable> drawable; > osg::ref_ptr<osg::RefMatrix> matrix; > osg::Vec3d localIntersectionPoint; > osg::Vec3 localIntersectionNormal; > IndexList indexList; > RatioList ratioList; > unsigned int primitiveIndex; > > Things like the nodePath, drawable, localIntersectionPoint, and the > localIntersectionNormal, I can work out what the are. But what are the ratio, > ratioList, primitiveIndex, and the matrix? Is the matrix a transformation > matrix?
The IndexList contains the list of vertex indices of the primitive that has been intersected, and the RatioList contains the weighting of those vertices which when added together with their ratios gives the intersection point. This allows you to compute things like texture coordinates, colours etc. The primitiveIndex is the primitive number into the geometry that the intersected primitive lies. The matrix is the accumulated transformation matrix that takes the local coordinate point into coordinate frame of the root of the intersection traversal. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org