Open Inventor Reference
|
Sphere projector. More...
#include <Inventor/projectors/SbSphereProjector.h>
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. More... | |
SbVec3f | projectAndGetRotation (const SbVec2f &point, SbRotation &rot) |
Apply the projector using the given point, returning the point in three dimensions that it projects to. More... | |
virtual SbRotation | getRotation (const SbVec3f &point1, const SbVec3f &point2)=0 |
Get a rotation given two points on this sphere projector. More... | |
void | setSphere (const SbSphere &sph) |
Set and get the sphere on which to project points. More... | |
const SbSphere & | getSphere () const |
Set and get the sphere on which to project points. More... | |
void | setOrientToEye (bool orientToEye) |
Set and get whether the projector should always be oriented towards the eye. More... | |
bool | isOrientToEye () const |
Set and get whether the projector should always be oriented towards the eye. More... | |
void | setFront (bool inFront) |
Set whether the projector should intersect the half of the sphere that faces the eye. More... | |
bool | isFront () const |
Get whether the projector should intersect the half of the sphere that faces the eye. More... | |
bool | isPointInFront (const SbVec3f &point) const |
Get whether the projector should intersect the half of the sphere that faces the eye. More... | |
virtual void | setWorkingSpace (const SbMatrix &space) |
Set the transform space to work in. More... | |
~SbSphereProjector () | |
Destructor. More... | |
Public Member Functions inherited from SbProjector | |
virtual void | setViewVolume (const SbViewVolume &vol) |
Set the view volume to use for the projection. More... | |
const SbViewVolume & | getViewVolume () const |
Get the view volume to use for the projection. More... | |
const SbMatrix & | getWorkingSpace () const |
Get the transform space to work in. More... | |
virtual SbProjector * | copy () const =0 |
Creates and returns an exact copy of the projector. More... | |
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). More... | |
SbSphereProjector (const SbSphere &s, bool orientToEye) | |
Protected Member Functions inherited from SbProjector | |
SbProjector () | |
Default constructor. More... | |
virtual | ~SbProjector () |
SbLine | getWorkingLine (const SbVec2f &point) const |
Given this mouse point, return the line it projects to in working space. More... | |
Protected Attributes | |
bool | intersectFront |
Are intersections done on the front half (if not, they're done on the back half) of the sphere? More... | |
SbSphere | sphere |
The sphere being used. More... | |
bool | orientToEye |
TRUE if always oriented to eye. More... | |
bool | needSetup |
Set TRUE whenever sphere, work space or orientation changes. More... | |
SbVec3f | lastPoint |
cached last point on this projector More... | |
Protected Attributes inherited from SbProjector | |
SbViewVolume | viewVol |
SbMatrix | worldToWorking |
SbMatrix | workingToWorld |
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.
Definition at line 79 of file SbSphereProjector.h.
|
inline |
Definition at line 131 of file SbSphereProjector.h.
|
protected |
|
protected |
|
pure virtual |
The rotation will be on the surface of the sphere.
Implemented in SbSphereSheetProjector, SbSphereSectionProjector, and SbSpherePlaneProjector.
|
inline |
The default sphere has radius 1.0.
Definition at line 107 of file SbSphereProjector.h.
|
inline |
Definition at line 122 of file SbSphereProjector.h.
|
inline |
Set to FALSE if the tolerance should be evaluated in working space.
Definition at line 114 of file SbSphereProjector.h.
bool SbSphereProjector::isPointInFront | ( | const SbVec3f & | point | ) | const |
The point should be normalized from 0-1, with (0,0) at the lower-left.
Implements SbProjector.
Implemented in SbSphereSheetProjector, SbSphereSectionProjector, and SbSpherePlaneProjector.
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 | ( | bool | inFront | ) |
Set to FALSE if the projector should intersect with the rear half.
void SbSphereProjector::setOrientToEye | ( | bool | 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 |
Reimplemented from SbProjector.
|
protected |
Definition at line 141 of file SbSphereProjector.h.
|
protected |
Definition at line 149 of file SbSphereProjector.h.
|
protected |
Definition at line 145 of file SbSphereProjector.h.
|
protected |
Definition at line 144 of file SbSphereProjector.h.
|
protected |
Definition at line 143 of file SbSphereProjector.h.