Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SbLineProjector Class Reference

Line projector. More...

#include <Inventor/projectors/SbLineProjector.h>

+ Inheritance diagram for SbLineProjector:

Public Member Functions

 SbLineProjector ()
 Constructor.
 
virtual ~SbLineProjector ()
 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 SbBool project (const SbVec2f &point, SbVec3f &projectedPoint)
 Applies the projector using the given point, returning the point in three dimensions that it projects to and the status.
 
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 setLine (const SbLine &line)
 Sets the line on which to project 2D points.
 
const SbLinegetLine () const
 Gets the line on which to project 2D points.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition1, const SbVec2f &mousePosition2)
 Gets a vector on this line given two normalized mouse points.
 
virtual SbVec3f getVector (const SbVec2f &mousePosition)
 Gets a vector given the current mouse point.
 
void setStartPosition (const SbVec2f &mousePosition)
 Sets the initial position from a 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

Constructor & Destructor Documentation

◆ SbLineProjector()

SbLineProjector::SbLineProjector ( )

Constructor.

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

◆ ~SbLineProjector()

virtual SbLineProjector::~SbLineProjector ( )
inlinevirtual

Destructor.

Definition at line 90 of file SbLineProjector.h.

Member Function Documentation

◆ copy()

virtual SbProjector * SbLineProjector::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.

◆ getLine()

const SbLine & SbLineProjector::getLine ( ) const
inline

Gets the line on which to project 2D points.

Definition at line 123 of file SbLineProjector.h.

◆ getVector() [1/2]

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

Gets a vector on this line given two normalized mouse points.

◆ intersect()

virtual SbVec3f SbLineProjector::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.

◆ project() [1/2]

virtual SbVec3f SbLineProjector::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.

◆ project() [2/2]

virtual SbBool SbLineProjector::project ( const SbVec2f point,
SbVec3f projectedPoint 
)
virtual

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

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

◆ setLine()

void SbLineProjector::setLine ( const SbLine line)

Sets the line on which to project 2D points.

◆ setStartPosition() [1/2]

void SbLineProjector::setStartPosition ( const SbVec2f mousePosition)
inline

Sets the initial position from a mouse position.

Definition at line 142 of file SbLineProjector.h.

◆ setStartPosition() [2/2]

void SbLineProjector::setStartPosition ( const SbVec3f point)
inline

Sets the initial position from a point on the projector.

Definition at line 148 of file SbLineProjector.h.


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