Open Inventor Reference
SbLineProjector Class Reference

Line projector. More...

#include <Inventor/projectors/SbLineProjector.h>

Inheritance diagram for SbLineProjector:
SbProjector

List of all members.

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.

Protected Attributes

SbLine line
SbVec3f lastPoint

Detailed Description


Constructor & Destructor Documentation

SbLineProjector::SbLineProjector ( )

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

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

virtual SbProjector* SbLineProjector::copy ( ) const [virtual]

The caller is responsible for deleting the copy when done.

Implements SbProjector.

const SbLine& SbLineProjector::getLine ( ) const [inline]

Definition at line 99 of file SbLineProjector.h.

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

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.

void SbLineProjector::setLine ( const SbLine line)
void SbLineProjector::setStartPosition ( const SbVec2f mousePosition) [inline]

Definition at line 115 of file SbLineProjector.h.

References SbProjector::project().

void SbLineProjector::setStartPosition ( const SbVec3f point) [inline]

Definition at line 119 of file SbLineProjector.h.


Member Data Documentation

Definition at line 124 of file SbLineProjector.h.

Definition at line 123 of file SbLineProjector.h.


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