Open Inventor Reference
SbSphereProjector Class Reference

Sphere projector. More...

#include <Inventor/projectors/SbSphereProjector.h>

Inheritance diagram for SbSphereProjector:
SbProjector SbSphereSectionProjector SbSphereSheetProjector SbSpherePlaneProjector

List of all members.

Public Member Functions

virtual SbVec3f project (const SbVec2f &point)=0
 Apply the projector using the given point, returning the point in three dimensions that it projects to.
SbVec3f projectAndGetRotation (const SbVec2f &point, SbRotation &rot)
 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)=0
 Get a rotation given two points on this sphere projector.
void setSphere (const SbSphere &sph)
 Set and get the sphere on which to project points.
const SbSpheregetSphere () const
 Set and get the sphere on which to project points.
void setOrientToEye (SbBool orientToEye)
 Set and get whether the projector should always be oriented towards the eye.
SbBool isOrientToEye () const
 Set and get whether the projector should always be oriented towards the eye.
void setFront (SbBool inFront)
 Set whether the projector should intersect the half of the sphere that faces the eye.
SbBool isFront () const
 Get whether the projector should intersect the half of the sphere that faces the eye.
SbBool isPointInFront (const SbVec3f &point) const
 Get whether the projector should intersect the half of the sphere that faces the eye.
virtual void setWorkingSpace (const SbMatrix &space)
 Set the transform space to work in.
 ~SbSphereProjector ()
 Destructor.

Protected Member Functions

 SbSphereProjector (SbBool orientToEye)
 Constructors The default sphere to use has a radius of 1.0 and is centered at (0,0,0).
 SbSphereProjector (const SbSphere &s, SbBool orientToEye)
SbBool intersectSphereFront (const SbLine &l, SbVec3f &result)
 Just like sphere::intersect, except always returns the intersection that is in "front".

Protected Attributes

SbBool intersectFront
 Are intersections done on the front half (if not, they're done on the back half) of the sphere?
SbSphere sphere
 The sphere being used.
SbBool orientToEye
 TRUE if always oriented to eye.
SbBool needSetup
 Set TRUE whenever sphere, work space or orientation changes.
SbVec3f lastPoint
 cached last point on this projector

Detailed Description

SbSphereProjector is an abstract base class for projectors that use a sphere in their projection. Sphere projectors are typically used to write interactive 3D manipulators and viewers.

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

Definition at line 79 of file SbSphereProjector.h.


Constructor & Destructor Documentation

SbSphereProjector::~SbSphereProjector ( ) [inline]

Definition at line 131 of file SbSphereProjector.h.

SbSphereProjector::SbSphereProjector ( SbBool  orientToEye) [protected]
SbSphereProjector::SbSphereProjector ( const SbSphere s,
SbBool  orientToEye 
) [protected]

Member Function Documentation

virtual SbRotation SbSphereProjector::getRotation ( const SbVec3f point1,
const SbVec3f point2 
) [pure virtual]

The rotation will be on the surface of the sphere.

Implemented in SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.

const SbSphere& SbSphereProjector::getSphere ( ) const [inline]

The default sphere has radius 1.0.

Definition at line 107 of file SbSphereProjector.h.

SbBool SbSphereProjector::intersectSphereFront ( const SbLine l,
SbVec3f result 
) [protected]
SbBool SbSphereProjector::isFront ( ) const [inline]

Definition at line 122 of file SbSphereProjector.h.

SbBool SbSphereProjector::isOrientToEye ( ) const [inline]

Set to FALSE if the tolerance should be evaluated in working space.

Definition at line 114 of file SbSphereProjector.h.

SbBool SbSphereProjector::isPointInFront ( const SbVec3f point) const
virtual SbVec3f SbSphereProjector::project ( const SbVec2f point) [pure virtual]

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

Implements SbProjector.

Implemented in SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector.

SbVec3f SbSphereProjector::projectAndGetRotation ( const SbVec2f point,
SbRotation rot 
)

This also returns in rot a rotation on the surface of the sphere from the last projected point to this one. The passed point should be normalized (i.e. lie in the range [0.0,1.0]), with (0,0) at the lower-left.

void SbSphereProjector::setFront ( SbBool  inFront)

Set to FALSE if the projector should intersect with the rear half.

void SbSphereProjector::setOrientToEye ( SbBool  orientToEye)

Set to FALSE if the tolerance should be evaluated in working space.

void SbSphereProjector::setSphere ( const SbSphere sph)

The default sphere has radius 1.0.

virtual void SbSphereProjector::setWorkingSpace ( const SbMatrix space) [virtual]

Reimplemented from SbProjector.


Member Data Documentation

Definition at line 141 of file SbSphereProjector.h.

Definition at line 153 of file SbSphereProjector.h.

Definition at line 149 of file SbSphereProjector.h.

Definition at line 148 of file SbSphereProjector.h.

Definition at line 147 of file SbSphereProjector.h.


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