Completed changes to osgManipulator to make it more flexible w.r.t viewer usage, and

ported osgmanipulator example across of osgViewer
This commit is contained in:
Robert Osfield
2007-02-26 13:01:17 +00:00
parent 42689e83ef
commit 7f8f4e331a
15 changed files with 270 additions and 202 deletions

View File

@@ -40,7 +40,7 @@ class OSGMANIPULATOR_EXPORT Projector : public osg::Referenced
* projecting window coordinates into object coordinates and vice versa.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const = 0;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const = 0;
/**
* Sets the matrix for transforming the projector's local coordinate
@@ -105,7 +105,7 @@ class OSGMANIPULATOR_EXPORT LineProjector : public Projector
* coordinate (pointToProject) when projected onto the given line.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
protected:
@@ -133,7 +133,7 @@ class OSGMANIPULATOR_EXPORT PlaneProjector : public Projector
* coordinate (pointToProject) when projected onto the given plane.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
protected:
@@ -161,13 +161,13 @@ class OSGMANIPULATOR_EXPORT SphereProjector : public Projector
* coordinate (pointToProject) when projected onto the given sphere.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
/**
* Returns true is the point is in front of the cylinder given the eye
* direction.
*/
bool isPointInFront(const Dragger::PointerInfo& pi, const osg::Matrix& localToWorld) const;
bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const;
void setFront(bool front) { _front = front; }
@@ -196,7 +196,7 @@ class OSGMANIPULATOR_EXPORT SpherePlaneProjector : public SphereProjector
* coordinate (pointToProject) when projected onto the given sphere.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
/**
* Returns true if the previous projection was on the sphere and false
@@ -240,14 +240,14 @@ class OSGMANIPULATOR_EXPORT CylinderProjector : public Projector
* coordinate (pointToProject) when projected onto the given plane.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
/**
* Returns true is the point is in front of the cylinder given the eye
* direction.
*/
bool isPointInFront(const Dragger::PointerInfo& pi, const osg::Matrix& localToWorld) const;
bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const;
void setFront(bool front) { _front = front; }
@@ -276,7 +276,7 @@ class OSGMANIPULATOR_EXPORT CylinderPlaneProjector : public CylinderProjector
* coordinate (pointToProject) when projected onto the given plane.
* Returns true on successful projection.
*/
virtual bool project(const Dragger::PointerInfo& pi, osg::Vec3& projectedPoint) const;
virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const;
/**
* Returns true if the previous projection was on the cylinder and