Further work on PlaneIntersector

This commit is contained in:
Robert Osfield
2006-11-29 14:21:59 +00:00
parent 35cb04437d
commit ab7d1ecc42
6 changed files with 314 additions and 168 deletions

View File

@@ -24,7 +24,7 @@ namespace osg {
* Note, if no slave cameras are attached to the view then the master camera does both the control and implementation of the rendering of the scene,
* but if slave cameras are present then the master controls the view onto the scene, while the slaves implement the rendering of the scene.
*/
class OSG_EXPORT View : public osg::Referenced
class OSG_EXPORT View : public virtual osg::Referenced
{
public :

View File

@@ -37,13 +37,22 @@ class OSGUTIL_EXPORT PlaneIntersector : public Intersector
bool operator < (const Intersection& rhs) const
{
if (polyline < rhs.polyline) return true;
if (rhs.polyline < polyline) return false;
if (nodePath < rhs.nodePath) return true;
if (rhs.nodePath < nodePath ) return false;
return (drawable < rhs.drawable);
}
typedef std::vector<osg::Vec3d> Polyline;
osg::NodePath nodePath;
osg::ref_ptr<osg::RefMatrix> matrix;
osg::ref_ptr<osg::Drawable> drawable;
Polyline polyline;
};
typedef std::set<Intersection> Intersections;