i am trying to compute the direction of an osg::LineSegmentIntersector object. i can get the collision point and i am trying to get the starting point - i need the vector of the intersector's direction.
i do this for the purpose of ray tracing (or ray casting). i create the intersectors this way Code: new osgUtil::LineSegmentIntersector(cf, x, y); where cf is 'WINDOW' (this is for the primary rays). i am not sure how to transform the starting/end point of the intersector into model (world) space. that's why i am trying to get the position of the camera as the starting point. i looked at the code of the linesegmentintersector thoroughly, but still am confused about the matrices, so i decided it could be less difficult to use the camera. i need the vector to calculate the specular color. robert, thank you very much for your help. andrey ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46129#46129 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org