Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SbProjector Class Reference

The SbProjector class is the abstract base projector class. More...

#include <Inventor/projectors/SbProjector.h>

Inheritance diagram for SbProjector::

SbCylinderProjector SbLineProjector SbPlaneProjector SbSphereProjector SbCylinderSectionProjector SbCylinderSheetProjector SbSphereSectionProjector SbSphereSheetProjector SbCylinderPlaneProjector SbSpherePlaneProjector List of all members.

Public Methods

virtual SbVec3f project (const SbVec2f &point)=0
virtual void setViewVolume (const SbViewVolume &vol)
const SbViewVolumegetViewVolume (void) const
virtual void setWorkingSpace (const SbMatrix &space)
const SbMatrixgetWorkingSpace (void) const
virtual SbProjector * copy (void) const=0

Protected Methods

 SbProjector (void)
virtual ~SbProjector ()
SbLine getWorkingLine (const SbVec2f &point) const

Protected Attributes

SbViewVolume viewVol
SbMatrix worldToWorking
SbMatrix workingToWorld

Detailed Description

The SbProjector class is the abstract base projector class.

Projectors are used in the Coin library for mapping 2D coordinates (typically from the position of the mouse cursor in the rendering window) to 3D "world" coordinates.

Mapping 2D coordinates to 3D coordinates is something which is done extensively in the dragger classes, to provide the user with a convenient and natural way of interacting with the 3D geometry of scenes.

The application programmer should normally not need to care about the projector classes, unless there are special needs in the application.

See also:
SoDragger


Constructor & Destructor Documentation

SbProjector::SbProjector void [protected]
 

The constructor initializes the workingspace matrix to an identity matrix.

SbProjector::~SbProjector [inline, protected, virtual]
 

Destructor is protected, as this is an abstract class.


Member Function Documentation

SbVec3f SbProjector::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.

Reimplemented in SbLineProjector, SbPlaneProjector, SbCylinderProjector, SbCylinderSectionProjector, SbCylinderPlaneProjector, SbCylinderSheetProjector, SbSphereSheetProjector, SbSphereSectionProjector, and SbSpherePlaneProjector.

void SbProjector::setViewVolume const SbViewVolume & vol [virtual]
 

Set the viewing volume the projections will take place in.

See also:
getViewVolume()

const SbViewVolume & SbProjector::getViewVolume void const
 

Return the current viewing volume used by the projections.

See also:
setViewVolume()

void SbProjector::setWorkingSpace const SbMatrix & space [virtual]
 

Sets the matrix used for converting from the projector's coordinate system to the world coordinate system.

Reimplemented in SbCylinderProjector, and SbSphereProjector.

const SbMatrix & SbProjector::getWorkingSpace void const
 

Returns projector-to-world matrix.

See also:
setWorkingSpace()

SbProjector * SbProjector::copy void const [pure virtual]
 

Construct and return a copy of this projector. The caller is responsible for destructing the new instance.

Reimplemented in SbLineProjector, SbPlaneProjector, SbCylinderSectionProjector, SbCylinderPlaneProjector, SbCylinderSheetProjector, SbSphereSheetProjector, SbSphereSectionProjector, and SbSpherePlaneProjector.

SbLine SbProjector::getWorkingLine const SbVec2f & point const [protected]
 

From the 2D point in normalized screenspace coordinates, calculate the line passing through the scene.

Typically used for tracking intersection points for the mouse cursor.


Member Data Documentation

SbProjector::viewVol [protected]
 

The viewVol definition.

SbProjector::worldToWorking [protected]
 

The matrix which converts from world coordinates to coordinates in the projector's local coordinate system.

SbProjector::workingToWorld [protected]
 

The matrix which converts from coordinates in the projector's local coordinate system to world coordinates.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:29 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001