#include <Inventor/projectors/SbProjector.h>
Inheritance diagram for SbProjector:
Public Member Functions | |
virtual SbVec3f | project (const SbVec2f &point)=0 |
virtual void | setViewVolume (const SbViewVolume &vol) |
const SbViewVolume & | getViewVolume (void) const |
virtual void | setWorkingSpace (const SbMatrix &space) |
const SbMatrix & | getWorkingSpace (void) const |
virtual SbProjector * | copy (void) const =0 |
Protected Member Functions | |
SbProjector (void) | |
virtual | ~SbProjector () |
SbLine | getWorkingLine (const SbVec2f &point) const |
Protected Attributes | |
SbViewVolume | viewVol |
SbMatrix | worldToWorking |
SbMatrix | workingToWorld |
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.
For a usage example, see the class documentation for SbSphereSheetProjector.
The application programmer should normally not need to care about the projector classes, unless there are special needs in the application.
|
The constructor initializes the workingspace matrix to an identity matrix. |
|
Destructor is protected, as this is an abstract class. |
|
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. Implemented in SbCylinderPlaneProjector, SbCylinderProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector. |
|
Set the viewing volume the projections will take place in.
|
|
Return the current viewing volume used by the projections.
|
|
Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. Reimplemented in SbCylinderProjector, and SbSphereProjector. |
|
Returns projector-to-world matrix.
|
|
Construct and return a copy of this projector. The caller is responsible for destructing the new instance. Note that if the Coin library has been built as a DLL under Microsoft Windows and you use this method from application code, you must make sure that both the Coin DLL and the application executable is using the same instance of a C Run-Time (CRT) library. Otherwise, you will get memory heap corruption upon deallocating the returned instances, eventually leading to mysterious crashes. Implemented in SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbPlaneProjector, SbSpherePlaneProjector, SbSphereSectionProjector, and SbSphereSheetProjector. |
|
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. |
|
The viewVol definition. |
|
The matrix which converts from world coordinates to coordinates in the projector's local coordinate system. |
|
The matrix which converts from coordinates in the projector's local coordinate system to world coordinates. |