OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
osgManipulator::CylinderPlaneProjector Class Reference

CylinderPlaneProjector projects a point onto a plane relative to the given cylinder. More...

Inheritance diagram for osgManipulator::CylinderPlaneProjector:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

Generates a rotation about the cylinder axis based upon the incoming projected points on the plane computed from project().

Parameters:
[in]p1Initial projection point
[in]p2Second projection point
Returns:
osg::Quat Rotation about cylinder axis
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.

Parameters:
[in]piIncoming intersection information
[out]projectedPointPoint located on the given plane
Returns:
bool Whether the projection onto the plane was successful.

Reimplemented from osgManipulator::CylinderProjector.


Member Data Documentation


The documentation for this class was generated from the following file:

osg logo
Generated at Tue Dec 8 2015 00:16:48 for the OpenSceneGraph by doxygen 1.7.6.1.