Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SbCylinderProjector Class Referenceabstract

The SbCylinderProjector class is the abstract base class for mapping to cylindrical surfaces. More...

#include <Inventor/projectors/SbCylinderProjector.h>

Inheritance diagram for SbCylinderProjector:
SbProjector SbCylinderSectionProjector SbCylinderSheetProjector SbCylinderPlaneProjector

Public Member Functions

const SbCylindergetCylinder (void) const
 
virtual SbRotation getRotation (const SbVec3f &point1, const SbVec3f &point2)=0
 
SbBool isFront (void) const
 
SbBool isOrientToEye (void) const
 
SbBool isPointInFront (const SbVec3f &point) const
 
virtual SbVec3f project (const SbVec2f &point)=0
 
SbVec3f projectAndGetRotation (const SbVec2f &point, SbRotation &rot)
 
void setCylinder (const SbCylinder &cyl)
 
void setFront (const SbBool infront)
 
void setOrientToEye (const SbBool orienttoeye)
 
virtual void setWorkingSpace (const SbMatrix &space)
 
- Public Member Functions inherited from SbProjector
virtual SbProjectorcopy (void) const =0
 
const SbViewVolumegetViewVolume (void) const
 
const SbMatrixgetWorkingSpace (void) const
 
virtual void setViewVolume (const SbViewVolume &vol)
 
virtual SbBool tryProject (const SbVec2f &point, const float epsilon, SbVec3f &result)
 

Protected Member Functions

 SbCylinderProjector (const SbBool orienttoeye)
 
 SbCylinderProjector (const SbCylinder &cylinder, const SbBool orienttoeye)
 
SbBool intersectCylinderFront (const SbLine &line, SbVec3f &result)
 
- Protected Member Functions inherited from SbProjector
 SbProjector (void)
 
virtual ~SbProjector ()
 
float findVanishingDistance (void) const
 
SbLine getWorkingLine (const SbVec2f &point) const
 
SbBool verifyProjection (const SbVec3f &projpt) const
 

Protected Attributes

SbCylinder cylinder
 
SbBool intersectFront
 
SbVec3f lastPoint
 
SbBool needSetup
 
SbBool orientToEye
 
- Protected Attributes inherited from SbProjector
SbViewVolume viewVol
 
SbMatrix workingToWorld
 
SbMatrix worldToWorking
 

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

Constructor & Destructor Documentation

◆ SbCylinderProjector() [1/2]

SbCylinderProjector::SbCylinderProjector ( const SbBool orienttoeye)
protected

Default constructor sets up a cylinder along the Y-axis with height 1.

◆ SbCylinderProjector() [2/2]

SbCylinderProjector::SbCylinderProjector ( const SbCylinder & cylinder,
const SbBool orienttoeye )
protected

Constructor taking an explicit cylinder projection definition.

Member Function Documentation

◆ getCylinder()

const SbCylinder & SbCylinderProjector::getCylinder ( void ) const

Returns projection cylinder.

◆ getRotation()

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

Returns rotation on the projection surface which reorients point1 to point2.

Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, and SbCylinderSheetProjector.

◆ intersectCylinderFront()

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.

◆ isFront()

SbBool SbCylinderProjector::isFront ( void ) const

Returns value of the flag which decides whether to intersect with the outside or inside of the cylinder.

◆ isOrientToEye()

SbBool SbCylinderProjector::isOrientToEye ( void ) const

Returns the state of the cylinder orientation flag.

◆ isPointInFront()

SbBool SbCylinderProjector::isPointInFront ( const SbVec3f & point) const

Check if point is on the front side or the back side of the cylinder.

◆ project()

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.

◆ 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()

◆ setCylinder()

void SbCylinderProjector::setCylinder ( const SbCylinder & cylinderref)

Set cylinder to project onto.

◆ setFront()

void SbCylinderProjector::setFront ( const SbBool infront)

Set whether to intersect with the outside of the cylinder (isfront equal to TRUE), or the inside.

◆ setOrientToEye()

void SbCylinderProjector::setOrientToEye ( const SbBool orienttoeye)

Sets whether or not the projection surface should be oriented towards the eye of the viewer.

◆ setWorkingSpace()

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.

Member Data Documentation

◆ cylinder

SbCylinderProjector::cylinder
protected

Specification of the projection cylinder.

◆ intersectFront

SbCylinderProjector::intersectFront
protected

Flag which says whether or not we should map to the outside or inside of the cylinder surface.

◆ lastPoint

SbCylinderProjector::lastPoint
protected

Stores the previously projected 3D point.

◆ needSetup

SbCylinderProjector::needSetup
protected

Set to TRUE whenever the projection surface needs to be recalculated according to the setting of the SbCylinderProjector::orientToEye flag.

◆ orientToEye

SbCylinderProjector::orientToEye
protected

Which direction the cylindrical surface is oriented.


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