Open Inventor Reference
SbSphereProjector Class Referenceabstract

Sphere projector. More...

#include <Inventor/projectors/SbSphereProjector.h>

Inheritance diagram for SbSphereProjector:
SbProjector SbSphereSectionProjector SbSphereSheetProjector SbSpherePlaneProjector

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 (bool orientToEye)
 Set and get whether the projector should always be oriented towards the eye.
 
bool isOrientToEye () const
 Set and get whether the projector should always be oriented towards the eye.
 
void setFront (bool inFront)
 Set whether the projector should intersect the half of the sphere that faces the eye.
 
bool isFront () const
 Get whether the projector should intersect the half of the sphere that faces the eye.
 
bool 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.
 
- Public Member Functions inherited from SbProjector
virtual SbVec3f project (const SbVec2f &point)=0
 Apply the projector using the given point, returning the point in three dimensions that it projects to.
 
virtual void setViewVolume (const SbViewVolume &vol)
 Set the view volume to use for the projection.
 
const SbViewVolumegetViewVolume () const
 Get the view volume to use for the projection.
 
virtual void setWorkingSpace (const SbMatrix &space)
 Set the transform space to work in.
 
const SbMatrixgetWorkingSpace () const
 Get the transform space to work in.
 
virtual SbProjectorcopy () const =0
 Creates and returns an exact copy of the projector.
 

Protected Member Functions

 SbSphereProjector (bool orientToEye)
 Constructors The default sphere to use has a radius of 1.0 and is centered at (0,0,0).
 
 SbSphereProjector (const SbSphere &s, bool orientToEye)
 
- Protected Member Functions inherited from SbProjector
 SbProjector ()
 Default constructor.
 
virtual ~SbProjector ()
 
SbLine getWorkingLine (const SbVec2f &point) const
 Given this mouse point, return the line it projects to in working space.
 

Protected Attributes

bool 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.
 
bool orientToEye
 TRUE if always oriented to eye.
 
bool needSetup
 Set TRUE whenever sphere, work space or orientation changes.
 
SbVec3f lastPoint
 cached last point on this projector
 
- Protected Attributes inherited from SbProjector
SbViewVolume viewVol
 
SbMatrix worldToWorking
 
SbMatrix workingToWorld
 

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::~SbSphereProjector ( )
inline

Definition at line 131 of file SbSphereProjector.h.

◆ SbSphereProjector() [1/2]

SbSphereProjector::SbSphereProjector ( bool  orientToEye)
protected

◆ SbSphereProjector() [2/2]

SbSphereProjector::SbSphereProjector ( const SbSphere s,
bool  orientToEye 
)
protected

Member Function Documentation

◆ getRotation()

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.

◆ getSphere()

const SbSphere & SbSphereProjector::getSphere ( ) const
inline

The default sphere has radius 1.0.

Definition at line 107 of file SbSphereProjector.h.

◆ isFront()

bool SbSphereProjector::isFront ( ) const
inline

Definition at line 122 of file SbSphereProjector.h.

◆ isOrientToEye()

bool SbSphereProjector::isOrientToEye ( ) const
inline

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

Definition at line 114 of file SbSphereProjector.h.

◆ isPointInFront()

bool SbSphereProjector::isPointInFront ( const SbVec3f point) const

◆ project()

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.

◆ projectAndGetRotation()

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.

◆ setFront()

void SbSphereProjector::setFront ( bool  inFront)

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

◆ setOrientToEye()

void SbSphereProjector::setOrientToEye ( bool  orientToEye)

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

◆ setSphere()

void SbSphereProjector::setSphere ( const SbSphere sph)

The default sphere has radius 1.0.

◆ setWorkingSpace()

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

Reimplemented from SbProjector.

Member Data Documentation

◆ intersectFront

bool SbSphereProjector::intersectFront
protected

Definition at line 141 of file SbSphereProjector.h.

◆ lastPoint

SbVec3f SbSphereProjector::lastPoint
protected

Definition at line 149 of file SbSphereProjector.h.

◆ needSetup

bool SbSphereProjector::needSetup
protected

Definition at line 145 of file SbSphereProjector.h.

◆ orientToEye

bool SbSphereProjector::orientToEye
protected

Definition at line 144 of file SbSphereProjector.h.

◆ sphere

SbSphere SbSphereProjector::sphere
protected

Definition at line 143 of file SbSphereProjector.h.


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