Open Inventor Reference
SbCylinderProjector Class Reference

Cylinder projector. More...

#include <Inventor/projectors/SbCylinderProjector.h>

Inheritance diagram for SbCylinderProjector:
SbProjector SbCylinderSectionProjector SbCylinderSheetProjector SbCylinderPlaneProjector

List of all members.

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 SbCylindergetCylinder () const
 Set and get the cylinder on which to project points.
void setOrientToEye (SbBool orientToEye)
 Set and get whether the projector should always be oriented towards the eye.
SbBool isOrientToEye () const
 Set and get whether the projector should always be oriented towards the eye.
void setFront (SbBool isFront)
 Set and get whether the projector should intersect the half of the cylinder that faces the eye.
SbBool isFront () const
 Set and get whether the projector should intersect the half of the cylinder that faces the eye.
SbBool 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.

Protected Member Functions

 SbCylinderProjector (SbBool orientToEye)
 Constructors The default cylinder to is centered about the Y axis and has a radius of 1.0.
 SbCylinderProjector (const SbCylinder &cyl, SbBool orientToEye)
SbBool intersectCylinderFront (const SbLine &line, SbVec3f &result)
 Just like cylinder::intersect, except always returns the intersection that is in "front".

Protected Attributes

SbBool 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.
SbBool orientToEye
 TRUE if always oriented to eye.
SbBool needSetup
 Set TRUE whenever cylinder, work space or orientation changes.
SbVec3f lastPoint
 Cached last point on this projector.

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 ( ) [inline]

Definition at line 91 of file SbCylinderProjector.h.

SbCylinderProjector::SbCylinderProjector ( SbBool  orientToEye) [protected]
SbCylinderProjector::SbCylinderProjector ( const SbCylinder cyl,
SbBool  orientToEye 
) [protected]

Member Function Documentation

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.

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

The rotation will be about the axis of the cylinder.

Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.

SbBool SbCylinderProjector::intersectCylinderFront ( const SbLine line,
SbVec3f result 
) [protected]
SbBool SbCylinderProjector::isFront ( ) const [inline]

Definition at line 133 of file SbCylinderProjector.h.

SbBool SbCylinderProjector::isOrientToEye ( ) const [inline]

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

Definition at line 125 of file SbCylinderProjector.h.

SbBool SbCylinderProjector::isPointInFront ( const SbVec3f point) const
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 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 ( SbBool  isFront)

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

void SbCylinderProjector::setOrientToEye ( SbBool  orientToEye)

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

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

Reimplemented from SbProjector.


Member Data Documentation

Definition at line 158 of file SbCylinderProjector.h.

Definition at line 152 of file SbCylinderProjector.h.

Subclasses must set this in their project and getRotation methods.

Definition at line 165 of file SbCylinderProjector.h.

Definition at line 160 of file SbCylinderProjector.h.

Definition at line 159 of file SbCylinderProjector.h.


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