Open Inventor Reference
SbLineProjector Class Reference

Line projector. More...

#include <Inventor/projectors/SbLineProjector.h>

Inheritance diagram for SbLineProjector:
SbProjector

Public Member Functions

 SbLineProjector ()
 Constructor and destructor.
 
 ~SbLineProjector ()
 Constructor and destructor.
 
virtual SbProjectorcopy () const
 Returns an instance that is a copy of this instance.
 
virtual SbVec3f project (const SbVec2f &point)
 Apply the projector using the given point, returning the point in three dimensions that it projects to.
 
void setLine (const SbLine &line)
 Set and get the line on which to project 2D points.
 
const SbLinegetLine () const
 Set and get the line on which to project 2D points.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition1, const SbVec2f &mousePosition2)
 Get a vector on this line given two normalized mouse points.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition)
 Get a vector given the current mouse point.
 
void setStartPosition (const SbVec2f &mousePosition)
 Set the initial position from a mouse position.
 
void setStartPosition (const SbVec3f &point)
 Set the initial position from a point on the projector.
 
- Public Member Functions inherited from SbProjector
virtual SbVec3f project (const SbVec2f &point)=0
 Apply the projector using the given point, returning the point in three dimensions that it projects to.
 
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.
 
virtual SbProjectorcopy () const =0
 Creates and returns an exact copy of the projector.
 

Protected Attributes

SbLine line
 
SbVec3f lastPoint
 
- Protected Attributes inherited from SbProjector
SbViewVolume viewVol
 
SbMatrix worldToWorking
 
SbMatrix workingToWorld
 

Additional Inherited Members

- Protected Member Functions inherited from SbProjector
 SbProjector ()
 Default constructor.
 
virtual ~SbProjector ()
 
SbLine getWorkingLine (const SbVec2f &point) const
 Given this mouse point, return the line it projects to in working space.
 

Detailed Description

Constructor & Destructor Documentation

◆ SbLineProjector()

SbLineProjector::SbLineProjector ( )

The default line passes through the origin and is aligned with the Y axis.

◆ ~SbLineProjector()

SbLineProjector::~SbLineProjector ( )
inline

The default line passes through the origin and is aligned with the Y axis.

Definition at line 85 of file SbLineProjector.h.

Member Function Documentation

◆ copy()

virtual SbProjector * SbLineProjector::copy ( ) const
virtual

The caller is responsible for deleting the copy when done.

Implements SbProjector.

◆ getLine()

const SbLine & SbLineProjector::getLine ( ) const
inline

Definition at line 99 of file SbLineProjector.h.

◆ getVector() [1/2]

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

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 SbLineProjector::getVector ( const SbVec2f mousePosition1,
const SbVec2f mousePosition2 
)
virtual

◆ project()

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

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

Implements SbProjector.

◆ setLine()

void SbLineProjector::setLine ( const SbLine line)

◆ setStartPosition() [1/2]

void SbLineProjector::setStartPosition ( const SbVec2f mousePosition)
inline

Definition at line 115 of file SbLineProjector.h.

References SbProjector::project().

◆ setStartPosition() [2/2]

void SbLineProjector::setStartPosition ( const SbVec3f point)
inline

Definition at line 119 of file SbLineProjector.h.

Member Data Documentation

◆ lastPoint

SbVec3f SbLineProjector::lastPoint
protected

Definition at line 124 of file SbLineProjector.h.

◆ line

SbLine SbLineProjector::line
protected

Definition at line 123 of file SbLineProjector.h.


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