sbcylinderprojector(3)
NAME
SbCylinderProjector
SYNOPSIS
#include <Inventor/projectors/SbCylinderProjector.h> Inherits SbProjector. Inherited by SbCylinderSectionProjector, and SbCylinderSheetProjector.
Detailed Description
The SbCylinderProjector class is the abstract base class for mapping to
cylindrical surfaces.
The cylinder projectors map 2D points to various surface types based on
cylindrical shapes.
- See also:
- SbSphereProjector
- Public Member Functions
- virtual SbVec3f project (const SbVec2f &point)=0
SbVec3f projectAndGetRotation (const SbVec2f &point, SbRotation &rot)
virtual SbRotation getRotation (const SbVec3f &point1, const SbVec3f
&point2)=0
- void setCylinder (const SbCylinder &cyl)
const SbCylinder & getCylinder (void) const
void setOrientToEye (const SbBool orienttoeye)
SbBool isOrientToEye (void) const
void setFront (const SbBool infront)
SbBool isFront (void) const
SbBool isPointInFront (const SbVec3f &point) const virtual void setWorkingSpace (const SbMatrix &space) - Protected Member Functions
- SbCylinderProjector (const SbBool orienttoeye)
SbCylinderProjector (const SbCylinder &cylinder, const SbBool
orienttoeye)
- SbBool intersectCylinderFront (const SbLine &line, SbVec3f &result)
- Protected Attributes
- SbBool intersectFront
SbCylinder cylinder
SbBool orientToEye
SbBool needSetup
SbVec3f lastPoint
Constructor & Destructor Documentation
- SbCylinderProjector::SbCylinderProjector (const SbBool orienttoeye)
- [protected]
Default constructor sets up a cylinder along the Y axis with height 1. - SbCylinderProjector::SbCylinderProjector (const SbCylinder & cylinder,
- const SbBool orienttoeye) [protected] Constructor taking an explicit cylinder projection definition.
Member Function Documentation
- virtual SbVec3f SbCylinderProjector::project (const SbVec2f & point) [pure
- virtual]
Project the 2D point from normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the
projector. - Implements SbProjector.
- Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.
- Referenced by projectAndGetRotation().
- SbVec3f SbCylinderProjector::projectAndGetRotation (const SbVec2f & point,
- SbRotation & rot)
Project the 2D point to a 3D coordinate on the cylindrical surface, and find the rotation from the last projection to this one. - See also:
project(), getRotation()
- References getRotation(), lastPoint, and project().
- SbRotation SbCylinderProjector::getRotation (const SbVec3f & point1, const
- SbVec3f & point2) [pure virtual] Returns rotation on the projection surface which re-orients point1 to point2.
- Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.
- Referenced by projectAndGetRotation().
- void SbCylinderProjector::setCylinder (const SbCylinder & cylinderref)
- Set cylinder to project onto.
- References cylinder, and needSetup.
- Referenced by SoVRMLCylinderSensor::dragStart().
- const SbCylinder & SbCylinderProjector::getCylinder (void) const
- Returns projection cylinder.
- References cylinder.
- void SbCylinderProjector::setOrientToEye (const SbBool orienttoeye)
- Sets whether or not the projection surface should be oriented towards
the eye of the viewer. - References needSetup, and orientToEye.
- SbBool SbCylinderProjector::isOrientToEye (void) const
- Returns the state of the cylinder orientation flag.
- References orientToEye.
- void SbCylinderProjector::setFront (const SbBool infront)
- Set whether to intersect with the outside of the cylinder (isfront equal to TRUE), or the inside.
- References intersectFront, and needSetup.
- SbBool SbCylinderProjector::isFront (void) const
- Returns value of the flag which decides whether to intersect with the
outside or inside of the cylinder. - References intersectFront.
- Referenced by intersectCylinderFront().
- SbBool SbCylinderProjector::isPointInFront (const SbVec3f & point) const
- Check if point is on the frontside or the backside of the cylinder.
- References cylinder, SbVec3f::dot(), SbCylinder::getAxis(),
SbLine::getClosestPoint(), SbViewVolume::getProjectionPoint(),
SbViewVolume::getProjectionType(), SbProjector::getViewVolume(),
SbMatrix::multDirMatrix(), SbMatrix::multVecMatrix(),
SbViewVolume::PERSPECTIVE, SbProjector::worldToWorking, and
SbViewVolume::zVector(). - void SbCylinderProjector::setWorkingSpace (const SbMatrix & space)
- [virtual]
Sets the matrix used for converting from the projector's coordinate
system to the world coordinate system. - Reimplemented from SbProjector.
- References needSetup, and SbProjector::setWorkingSpace().
- SbBool SbCylinderProjector::intersectCylinderFront (const SbLine & line,
- SbVec3f & result) [protected] Intersect line with the SbCylinderProjector::cylinder and place the intersection point (if any) in result. Considers setFront() settings.
- Returns TRUE if line actually hits the cylinder, FALSE if it doesn't intersect with it.
- References cylinder, SbCylinder::intersect(), and isFront().
- Referenced by SbCylinderSheetProjector::project(),
SbCylinderSectionProjector::project(), and
SbCylinderPlaneProjector::project().
Member Data Documentation
- SbCylinderProjector::intersectFront [protected]
- Flag which says whether or not we should map to the outside or inside
of the cylinder surface. - Referenced by isFront(), setFront(),
SbCylinderSheetProjector::setupPlane(), and
SbCylinderSectionProjector::setupTolerance(). - SbCylinderProjector::cylinder [protected]
- Specification of the projection cylinder.
- Referenced by getCylinder(), SbCylinderSheetProjector::getRotation(),
SbCylinderSectionProjector::getRotation(),
SbCylinderPlaneProjector::getRotation(), intersectCylinderFront(),
isPointInFront(), SbCylinderSectionProjector::project(), setCylinder(), SbCylinderSheetProjector::setupPlane(), and
SbCylinderSectionProjector::setupTolerance(). - SbCylinderProjector::orientToEye [protected]
- Which direction the cylindrical surface is oriented.
- Referenced by isOrientToEye(), setOrientToEye(),
SbCylinderSheetProjector::setupPlane(), and
SbCylinderSectionProjector::setupTolerance(). - SbCylinderProjector::needSetup [protected]
- Set to TRUE whenever the projection surface needs to be recalculated
according to the setting of the SbCylinderProjector::orientToEye flag. - Referenced by SbCylinderSectionProjector::isWithinTolerance(),
SbCylinderSheetProjector::project(),
SbCylinderSectionProjector::project(),
SbCylinderPlaneProjector::project(),
SbCylinderSectionProjector::SbCylinderSectionProjector(),
setCylinder(), setFront(), setOrientToEye(),
SbCylinderSectionProjector::setTolerance(),
SbCylinderSheetProjector::setupPlane(),
SbCylinderSectionProjector::setupTolerance(), and setWorkingSpace(). - SbCylinderProjector::lastPoint [protected]
- Stores the previously projected 3D point.
- Referenced by SbCylinderSheetProjector::project(),
SbCylinderSectionProjector::project(),
SbCylinderPlaneProjector::project(), and projectAndGetRotation().
Author
- Generated automatically by Doxygen for Coin from the source code.