Open Inventor Reference
|
Plane projector. More...
#include <Inventor/projectors/SbPlaneProjector.h>
Public Member Functions | |
SbPlaneProjector (bool orient=FALSE) | |
Constructor. | |
SbPlaneProjector (const SbPlane &plane, bool orient=FALSE) | |
Constructor that takes a plane. | |
~SbPlaneProjector () | |
Destructor. | |
virtual SbProjector * | copy () 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. | |
void | setPlane (const SbPlane &plane) |
Set and get the plane to use. | |
const SbPlane & | getPlane () const |
Set and get the plane to use. | |
void | setOrientToEye (bool orientToEye) |
Set whether the projector should be oriented towards the eye. | |
bool | isOrientToEye () const |
Get whether the projector should be oriented towards the eye. | |
virtual SbVec3f | getVector (const SbVec2f &mousePosition1, const SbVec2f &mousePosition2) |
Get a vector on this plane given two normalized mouse points. | |
virtual SbVec3f | getVector (const SbVec2f &mousePosition) |
Get a vector given the current mouse point. | |
void | setStartPosition (const SbVec2f &mousePosition) |
Set the initial mouse position. | |
void | setStartPosition (const SbVec3f &point) |
Set the initial position from a point on the projector. | |
![]() | |
virtual void | setViewVolume (const SbViewVolume &vol) |
Set the view volume to use for the projection. | |
const SbViewVolume & | getViewVolume () const |
Get the view volume to use for the projection. | |
virtual void | setWorkingSpace (const SbMatrix &space) |
Set the transform space to work in. | |
const SbMatrix & | getWorkingSpace () const |
Get the transform space to work in. | |
Protected Member Functions | |
void | setupPlane () |
Sets up plane orientation, if necessary. | |
![]() | |
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 | |
SbPlane | plane |
bool | orientToEye |
TRUE is plane should be oriented to eye. | |
bool | needSetup |
Set TRUE when plane or orientToEye changes. | |
SbPlane | nonOrientPlane |
Non-EyeOriented plane. | |
SbVec3f | lastPoint |
Cached last point. | |
![]() | |
SbViewVolume | viewVol |
SbMatrix | worldToWorking |
SbMatrix | workingToWorld |
SbPlaneProjector projects the mouse onto a plane. This is typically used to write interactive 3D manipulators and viewers.
Definition at line 78 of file SbPlaneProjector.h.
SbPlaneProjector::SbPlaneProjector | ( | bool | orient = FALSE | ) |
The default plane passes through the origin and is oriented perpendicular to the Z axis.
References FALSE.
|
inline |
Definition at line 91 of file SbPlaneProjector.h.
|
virtual |
The caller is responsible for deleting the copy when done.
Implements SbProjector.
References SbProjector::SbProjector().
|
inline |
Definition at line 107 of file SbPlaneProjector.h.
References plane.
Uses the last point on this projector from the previous call to getVector() or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one.
|
virtual |
|
inline |
Definition at line 117 of file SbPlaneProjector.h.
References orientToEye.
The point should be normalized from 0-1, with (0,0) at the lower-left.
Implements SbProjector.
void SbPlaneProjector::setOrientToEye | ( | bool | orientToEye | ) |
If orientToEye is set to TRUE, the given plane's direction is ignored, and the plane will be oriented to the eye. It will pass through the same point from the origin defined by the original dir * dist. Set to FALSE if the plane's direction should remain in working space.
References orientToEye.
|
inline |
Definition at line 134 of file SbPlaneProjector.h.
References lastPoint, and SbProjector::project().
|
inline |
Definition at line 138 of file SbPlaneProjector.h.
References lastPoint.
|
protected |
|
protected |
Definition at line 147 of file SbPlaneProjector.h.
Referenced by setStartPosition(), and setStartPosition().
|
protected |
Definition at line 144 of file SbPlaneProjector.h.
|
protected |
Definition at line 145 of file SbPlaneProjector.h.
|
protected |
Definition at line 143 of file SbPlaneProjector.h.
Referenced by isOrientToEye(), and setOrientToEye().
|
protected |
Definition at line 142 of file SbPlaneProjector.h.
Referenced by getPlane(), SbPlaneProjector(), and setPlane().