Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SbPlaneProjector Class Reference

Plane projector. More...

#include <Inventor/projectors/SbPlaneProjector.h>

+ Inheritance diagram for SbPlaneProjector:

Public Member Functions

 SbPlaneProjector (SbBool orient=FALSE)
 Constructor.
 
 SbPlaneProjector (const SbPlane &plane, SbBool orient=FALSE)
 Constructor which is passed a plane.
 
virtual ~SbPlaneProjector ()
 Destructor.
 
virtual SbProjectorcopy () const
 Returns an instance that is a copy of this instance.
 
virtual SbVec3f project (const SbVec2f &point)
 Applies the projector using the given point, returning the point in three dimensions that it projects to.
 
virtual SbVec3f intersect (const SbLine &line)
 Applies the projector using the given line in world coordinates, returning the point in three dimensions that it projects to.
 
void setPlane (const SbPlane &plane)
 Sets the plane to use.
 
const SbPlanegetPlane () const
 Gets the plane to use.
 
void setOrientToEye (SbBool orientToEye)
 Sets whether the projector should be oriented towards the eye.
 
SbBool isOrientToEye () const
 Gets whether the projector should be oriented towards the eye.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition1, const SbVec2f &mousePosition2)
 Gets a vector on this plane given two normalized mouse positions.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition)
 Gets a vector given the current mouse point.
 
void setStartPosition (const SbVec2f &mousePosition)
 Sets the initial mouse position.
 
void setStartPosition (const SbVec3f &point)
 Sets the initial position from a point on the projector.
 
- Public Member Functions inherited from SbProjector
virtual ~SbProjector ()
 Destructor.
 
virtual void setViewVolume (const SbViewVolume &vol)
 Set the view volume to use for the projection.
 
const SbViewVolumegetViewVolume () const
 Get the view volume to use for the projection.
 
virtual void setWorkingSpace (const SbMatrix &space)
 Set the transform space to work in.
 
const SbMatrixgetWorkingSpace () const
 Get the transform space to work in.
 

Detailed Description

Plane projector.

SbPlaneProjector projects the mouse onto a plane. This is typically used to write interactive 3D manipulators and viewers.

SEE ALSO

SbCylinderProjector, SbCylinderPlaneProjector, SbCylinderSectionProjector, SbCylinderSheetProjector, SbLineProjector, SbSpherePlaneProjector, SbSphereProjector, SbSphereSectionProjector, SbSphereSheetProjector

Definition at line 78 of file SbPlaneProjector.h.

Constructor & Destructor Documentation

◆ SbPlaneProjector() [1/2]

SbPlaneProjector::SbPlaneProjector ( SbBool  orient = FALSE)

Constructor.

The default plane passes through the origin and is oriented perpendicular to the Z axis.

◆ SbPlaneProjector() [2/2]

SbPlaneProjector::SbPlaneProjector ( const SbPlane plane,
SbBool  orient = FALSE 
)

Constructor which is passed a plane.

If orient to eye is TRUE, the plane will be reoriented to the eye.

◆ ~SbPlaneProjector()

virtual SbPlaneProjector::~SbPlaneProjector ( )
inlinevirtual

Destructor.

Definition at line 98 of file SbPlaneProjector.h.

Member Function Documentation

◆ copy()

virtual SbProjector * SbPlaneProjector::copy ( ) const
virtual

Returns an instance that is a copy of this instance.

The caller is responsible for deleting the copy when done.

Implements SbProjector.

◆ getPlane()

const SbPlane & SbPlaneProjector::getPlane ( ) const
inline

Gets the plane to use.

Definition at line 127 of file SbPlaneProjector.h.

◆ getVector() [1/2]

virtual SbVec3f SbPlaneProjector::getVector ( const SbVec2f mousePosition)
virtual

Gets a vector given the current mouse point.

Uses the last point on this projector from the previous call to getVector() or setStartPostion(). Do not use this if the working space transform is changing since the new point will be in a different space than the old one.

◆ getVector() [2/2]

virtual SbVec3f SbPlaneProjector::getVector ( const SbVec2f mousePosition1,
const SbVec2f mousePosition2 
)
virtual

Gets a vector on this plane given two normalized mouse positions.

◆ intersect()

virtual SbVec3f SbPlaneProjector::intersect ( const SbLine line)
virtual

Applies the projector using the given line in world coordinates, returning the point in three dimensions that it projects to.

New for v3.0.

Implements SbProjector.

◆ isOrientToEye()

SbBool SbPlaneProjector::isOrientToEye ( ) const
inline

Gets whether the projector should be oriented towards the eye.

Definition at line 140 of file SbPlaneProjector.h.

◆ project()

virtual SbVec3f SbPlaneProjector::project ( const SbVec2f point)
virtual

Applies the projector using the given point, returning the point in three dimensions that it projects to.

The point should be normalized from 0-1, with (0,0) at the lower-left.

Implements SbProjector.

◆ setOrientToEye()

void SbPlaneProjector::setOrientToEye ( SbBool  orientToEye)

Sets whether the projector should be oriented towards the eye.

If orientToEye is set to TRUE, the given plane's direction is ignored, and the plane will be oriented to the eye. It will pass through the same point from the origin defined by the original dir * dist. Set to FALSE if the plane's direction should remain in working space.

◆ setPlane()

void SbPlaneProjector::setPlane ( const SbPlane plane)

Sets the plane to use.

◆ setStartPosition() [1/2]

void SbPlaneProjector::setStartPosition ( const SbVec2f mousePosition)
inline

Sets the initial mouse position.

Definition at line 159 of file SbPlaneProjector.h.

◆ setStartPosition() [2/2]

void SbPlaneProjector::setStartPosition ( const SbVec3f point)
inline

Sets the initial position from a point on the projector.

Definition at line 165 of file SbPlaneProjector.h.


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