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. More...
 
 ~SbLineProjector ()
 Constructor and destructor. More...
 
virtual SbProjectorcopy () const
 Returns an instance that is a copy of this instance. More...
 
virtual SbVec3f project (const SbVec2f &point)
 Apply the projector using the given point, returning the point in three dimensions that it projects to. More...
 
void setLine (const SbLine &line)
 Set and get the line on which to project 2D points. More...
 
const SbLinegetLine () const
 Set and get the line on which to project 2D points. More...
 
virtual SbVec3f getVector (const SbVec2f &mousePosition1, const SbVec2f &mousePosition2)
 Get a vector on this line given two normalized mouse points. More...
 
virtual SbVec3f getVector (const SbVec2f &mousePosition)
 Get a vector given the current mouse point. More...
 
void setStartPosition (const SbVec2f &mousePosition)
 Set the initial position from a mouse position. More...
 
void setStartPosition (const SbVec3f &point)
 Set the initial position from a point on the projector. More...
 
- Public Member Functions inherited from SbProjector
virtual void setViewVolume (const SbViewVolume &vol)
 Set the view volume to use for the projection. More...
 
const SbViewVolumegetViewVolume () const
 Get the view volume to use for the projection. More...
 
virtual void setWorkingSpace (const SbMatrix &space)
 Set the transform space to work in. More...
 
const SbMatrixgetWorkingSpace () const
 Get the transform space to work in. More...
 

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. More...
 
virtual ~SbProjector ()
 
SbLine getWorkingLine (const SbVec2f &point) const
 Given this mouse point, return the line it projects to in working space. More...
 

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: