OpenSceneGraph
3.4.0
|
CylinderPlaneProjector projects a point onto a plane relative to the given cylinder. More...
Public Member Functions | |
CylinderPlaneProjector () | |
CylinderPlaneProjector (osg::Cylinder *cylinder) | |
virtual bool | project (const PointerInfo &pi, osg::Vec3d &projectedPoint) const |
Calculates the object coordinates (projectedPoint) of a window coordinate (pointToProject) when projected onto the given plane. | |
osg::Quat | getRotation (const osg::Vec3d &p1, const osg::Vec3d &p2) const |
Generates a rotation about the cylinder axis based upon the incoming projected points on the plane computed from project(). | |
Protected Member Functions | |
virtual | ~CylinderPlaneProjector () |
Protected Attributes | |
osg::Plane | _plane |
osg::Vec3d | _planeLineStart |
osg::Vec3d | _planeLineEnd |
bool | _parallelPlane |
CylinderPlaneProjector projects a point onto a plane relative to the given cylinder.
For most cases, the plane will be parallel to the cylinder axis oriented towards the eyepoint. When the eyepoint and cylinder axis are close to parallel, then it will project onto a plane perpendicular to the cylinder.
virtual osgManipulator::CylinderPlaneProjector::~CylinderPlaneProjector | ( | ) | [protected, virtual] |
osg::Quat osgManipulator::CylinderPlaneProjector::getRotation | ( | const osg::Vec3d & | p1, |
const osg::Vec3d & | p2 | ||
) | const |
virtual bool osgManipulator::CylinderPlaneProjector::project | ( | const PointerInfo & | pi, |
osg::Vec3d & | projectedPoint | ||
) | const [virtual] |
Calculates the object coordinates (projectedPoint) of a window coordinate (pointToProject) when projected onto the given plane.
Returns true on successful projection.
[in] | pi | Incoming intersection information |
[out] | projectedPoint | Point located on the given plane |
Reimplemented from osgManipulator::CylinderProjector.
bool osgManipulator::CylinderPlaneProjector::_parallelPlane [mutable, protected] |
osg::Plane osgManipulator::CylinderPlaneProjector::_plane [mutable, protected] |
osg::Vec3d osgManipulator::CylinderPlaneProjector::_planeLineEnd [mutable, protected] |
osg::Vec3d osgManipulator::CylinderPlaneProjector::_planeLineStart [mutable, protected] |
![]() | Generated at Tue Dec 8 2015 00:14:29 for the OpenSceneGraph by doxygen 1.7.6.1. |