Open Inventor Reference
SbSpherePlaneProjector Class Reference

Sphere-plane projector. More...

#include <Inventor/projectors/SbSpherePlaneProjector.h>

Inheritance diagram for SbSpherePlaneProjector:
SbSphereSectionProjector SbSphereProjector SbProjector

List of all members.

Public Member Functions

 SbSpherePlaneProjector (float edgeTol=0.9, SbBool orientToEye=TRUE)
 Default constructor.
 SbSpherePlaneProjector (const SbSphere &sph, float edgeTol=0.9, SbBool orientToEye=TRUE)
 Constructor taking the sphere.
 ~SbSpherePlaneProjector ()
 Destructor.
virtual SbProjectorcopy () const
 Returns an instance that is a copy of this instance.
virtual SbVec3f project (const SbVec2f &point)
 Apply the projector using the given point, returning the point in three dimensions that it projects to.
virtual SbRotation getRotation (const SbVec3f &point1, const SbVec3f &point2)
 Computes a rotation based on two points on this projector.

Protected Member Functions

SbRotation getRotation (const SbVec3f &point1, SbBool tol1, const SbVec3f &point2, SbBool tol2)

Detailed Description

SbSpherePlaneProjector projects a window space point (usually based on the mouse location) onto a surface defined by a sphere and plane cutting through the sphere. Two projected points can produce a rotation about the sphere's center. When the mouse position projects onto the plane, the rotations will be as if the plane is being dragged, causing the sphere to roll beneath it.

Incremental changes (delta rotation) can be computed during interactive sessions. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

See Also
SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSphereSheetProjector

Definition at line 92 of file SbSpherePlaneProjector.h.


Constructor & Destructor Documentation

SbSpherePlaneProjector::SbSpherePlaneProjector ( float  edgeTol = 0.9,
SbBool  orientToEye = TRUE 
)

The default view volume is undefined. The default working space is identity (world space). The default sphere to use has a radius of 1.0 and is centered at (0,0,0). The default edge tolerance is .9. The default eye orientation is TRUE.

SbSpherePlaneProjector::SbSpherePlaneProjector ( const SbSphere sph,
float  edgeTol = 0.9,
SbBool  orientToEye = TRUE 
)
SbSpherePlaneProjector::~SbSpherePlaneProjector ( ) [inline]

Definition at line 109 of file SbSpherePlaneProjector.h.


Member Function Documentation

virtual SbProjector* SbSpherePlaneProjector::copy ( ) const [virtual]

The caller is responsible for deleting the copy when done.

Reimplemented from SbSphereSectionProjector.

SbRotation SbSpherePlaneProjector::getRotation ( const SbVec3f point1,
SbBool  tol1,
const SbVec3f point2,
SbBool  tol2 
) [protected]
virtual SbRotation SbSpherePlaneProjector::getRotation ( const SbVec3f point1,
const SbVec3f point2 
) [virtual]

Reimplemented from SbSphereSectionProjector.

virtual SbVec3f SbSpherePlaneProjector::project ( const SbVec2f point) [virtual]

The point should be normalized from 0-1, with (0,0) at the lower-left.

Reimplemented from SbSphereSectionProjector.


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