Open Inventor Reference
SbCylinderProjector Class Referenceabstract

Cylinder projector. More...

#include <Inventor/projectors/SbCylinderProjector.h>

Inheritance diagram for SbCylinderProjector:
SbProjector SbCylinderSectionProjector SbCylinderSheetProjector SbCylinderPlaneProjector

Public Member Functions

 ~SbCylinderProjector ()
 Destructor. More...
 
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 cylinder projector. More...
 
void setCylinder (const SbCylinder &cyl)
 Set and get the cylinder on which to project points. More...
 
const SbCylindergetCylinder () const
 Set and get the cylinder 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 isFront)
 Set and get whether the projector should intersect the half of the cylinder that faces the eye. More...
 
bool isFront () const
 Set and get whether the projector should intersect the half of the cylinder that faces the eye. More...
 
bool isPointInFront (const SbVec3f &point) const
 Set and get whether the projector should intersect the half of the cylinder that faces the eye. More...
 
virtual void setWorkingSpace (const SbMatrix &space)
 Set the transform space to work in. More...
 
- Public Member Functions inherited from SbProjector
virtual void setViewVolume (const SbViewVolume &vol)
 Set the view volume to use for the projection. More...
 
const SbViewVolumegetViewVolume () const
 Get the view volume to use for the projection. More...
 
const SbMatrixgetWorkingSpace () const
 Get the transform space to work in. More...
 
virtual SbProjectorcopy () const =0
 Creates and returns an exact copy of the projector. More...
 

Protected Member Functions

 SbCylinderProjector (bool orientToEye)
 Constructors The default cylinder to is centered about the Y axis and has a radius of 1.0. More...
 
 SbCylinderProjector (const SbCylinder &cyl, 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 th e back half) of the cylinder? More...
 
SbCylinder cylinder
 Cylinder for this projector. More...
 
bool orientToEye
 TRUE if always oriented to eye. More...
 
bool needSetup
 Set TRUE whenever cylinder, 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
 

Detailed Description

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.

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

Definition at line 86 of file SbCylinderProjector.h.

Constructor & Destructor Documentation

◆ ~SbCylinderProjector()

SbCylinderProjector::~SbCylinderProjector ( )
inline

Definition at line 91 of file SbCylinderProjector.h.

◆ SbCylinderProjector() [1/2]

SbCylinderProjector::SbCylinderProjector ( bool  orientToEye)
protected

◆ SbCylinderProjector() [2/2]

SbCylinderProjector::SbCylinderProjector ( const SbCylinder cyl,
bool  orientToEye 
)
protected

Member Function Documentation

◆ getCylinder()

const SbCylinder& SbCylinderProjector::getCylinder ( ) const
inline

The default cylinder is aligned with the Y axis and has radius 1.0.

Definition at line 118 of file SbCylinderProjector.h.

◆ getRotation()

virtual SbRotation SbCylinderProjector::getRotation ( const SbVec3f point1,
const SbVec3f point2 
)
pure virtual

The rotation will be about the axis of the cylinder.

Implemented in SbCylinderSheetProjector, SbCylinderSectionProjector, and SbCylinderPlaneProjector.

◆ isFront()

bool SbCylinderProjector::isFront ( ) const
inline

Definition at line 133 of file SbCylinderProjector.h.

◆ isOrientToEye()

bool SbCylinderProjector::isOrientToEye ( ) const
inline

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

Definition at line 125 of file SbCylinderProjector.h.

◆ isPointInFront()

bool SbCylinderProjector::isPointInFront ( const SbVec3f point) const

◆ project()

virtual SbVec3f SbCylinderProjector::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 SbCylinderSheetProjector, SbCylinderSectionProjector, and SbCylinderPlaneProjector.

◆ projectAndGetRotation()

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.

◆ setCylinder()

void SbCylinderProjector::setCylinder ( const SbCylinder cyl)

The default cylinder is aligned with the Y axis and has radius 1.0.

◆ setFront()

void SbCylinderProjector::setFront ( bool  isFront)

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

◆ setOrientToEye()

void SbCylinderProjector::setOrientToEye ( bool  orientToEye)

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

◆ setWorkingSpace()

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

Reimplemented from SbProjector.

Member Data Documentation

◆ cylinder

SbCylinder SbCylinderProjector::cylinder
protected

Definition at line 154 of file SbCylinderProjector.h.

◆ intersectFront

bool SbCylinderProjector::intersectFront
protected

Definition at line 152 of file SbCylinderProjector.h.

◆ lastPoint

SbVec3f SbCylinderProjector::lastPoint
protected

Subclasses must set this in their project and getRotation methods.

Definition at line 161 of file SbCylinderProjector.h.

◆ needSetup

bool SbCylinderProjector::needSetup
protected

Definition at line 156 of file SbCylinderProjector.h.

◆ orientToEye

bool SbCylinderProjector::orientToEye
protected

Definition at line 155 of file SbCylinderProjector.h.


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