Open Inventor Reference
|
Cylinder projector. More...
#include <Inventor/projectors/SbCylinderProjector.h>
Public Member Functions | |
~SbCylinderProjector () | |
Destructor. | |
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 cylinder projector. | |
void | setCylinder (const SbCylinder &cyl) |
Set and get the cylinder on which to project points. | |
const SbCylinder & | getCylinder () const |
Set and get the cylinder 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 isFront) |
Set and get whether the projector should intersect the half of the cylinder that faces the eye. | |
bool | isFront () const |
Set and get whether the projector should intersect the half of the cylinder that faces the eye. | |
bool | isPointInFront (const SbVec3f &point) const |
Set and get whether the projector should intersect the half of the cylinder that faces the eye. | |
virtual void | setWorkingSpace (const SbMatrix &space) |
Set the transform space to work in. | |
![]() | |
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. | |
const SbMatrix & | getWorkingSpace () const |
Get the transform space to work in. | |
virtual SbProjector * | copy () const =0 |
Creates and returns an exact copy of the projector. | |
Protected Member Functions | |
SbCylinderProjector (bool orientToEye) | |
Constructors The default cylinder to is centered about the Y axis and has a radius of 1.0. | |
SbCylinderProjector (const SbCylinder &cyl, bool orientToEye) | |
![]() | |
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 th e back half) of the cylinder? | |
SbCylinder | cylinder |
Cylinder for this projector. | |
bool | orientToEye |
TRUE if always oriented to eye. | |
bool | needSetup |
Set TRUE whenever cylinder, work space or orientation changes. | |
SbVec3f | lastPoint |
Cached last point on this projector. | |
![]() | |
SbViewVolume | viewVol |
SbMatrix | worldToWorking |
SbMatrix | workingToWorld |
SbCylinderProjector is an abstract base class for projectors that use a cylinder in their projection. The getRotation() method
for an SbCylinderProjector will always return a rotation that is about the axis of the cylinder. Cylinder projectors are typically used to write interactive 3D manipulators and viewers.
Definition at line 86 of file SbCylinderProjector.h.
|
inline |
Definition at line 91 of file SbCylinderProjector.h.
|
protected |
References orientToEye.
|
protected |
References orientToEye.
|
inline |
The default cylinder is aligned with the Y axis and has radius 1.0.
Definition at line 118 of file SbCylinderProjector.h.
References cylinder.
|
pure virtual |
The rotation will be about the axis of the cylinder.
Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.
|
inline |
Definition at line 133 of file SbCylinderProjector.h.
References intersectFront.
Referenced by setFront().
|
inline |
Set to FALSE if the tolerance should be evaluated in working space.
Definition at line 125 of file SbCylinderProjector.h.
References orientToEye.
bool SbCylinderProjector::isPointInFront | ( | const SbVec3f & | point | ) | const |
The point should be normalized from 0-1, with (0,0) at the lower-left.
Implements SbProjector.
Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.
SbVec3f SbCylinderProjector::projectAndGetRotation | ( | const SbVec2f & | point, |
SbRotation & | rot ) |
This also returns in rot a rotation about the axis of the cylinder 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 SbCylinderProjector::setCylinder | ( | const SbCylinder & | cyl | ) |
The default cylinder is aligned with the Y axis and has radius 1.0.
void SbCylinderProjector::setFront | ( | bool | isFront | ) |
Set to FALSE if the projector should intersect with the rear half.
References isFront().
void SbCylinderProjector::setOrientToEye | ( | bool | orientToEye | ) |
Set to FALSE if the tolerance should be evaluated in working space.
References orientToEye.
|
virtual |
Reimplemented from SbProjector.
|
protected |
Definition at line 154 of file SbCylinderProjector.h.
Referenced by getCylinder().
|
protected |
Definition at line 152 of file SbCylinderProjector.h.
Referenced by isFront().
|
protected |
Subclasses must set this in their project and getRotation methods.
Definition at line 161 of file SbCylinderProjector.h.
|
protected |
Definition at line 156 of file SbCylinderProjector.h.
|
protected |
Definition at line 155 of file SbCylinderProjector.h.
Referenced by isOrientToEye(), SbCylinderPlaneProjector::SbCylinderPlaneProjector(), SbCylinderPlaneProjector::SbCylinderPlaneProjector(), SbCylinderProjector(), SbCylinderProjector(), SbCylinderSectionProjector::SbCylinderSectionProjector(), SbCylinderSectionProjector::SbCylinderSectionProjector(), SbCylinderSheetProjector::SbCylinderSheetProjector(), SbCylinderSheetProjector::SbCylinderSheetProjector(), and setOrientToEye().