Projector Class Reference

A class projecting a 3D space point into a 2D image point. More...

Public Member Functions

 Projector ()
 Constructor.
 
const ImagePointgetImagePoint () const
 Returns the position on the 2D image of the point to project.
 
ImagePoint getImagePoint01 () const
 Returns the normalized position on the 2D image of the point to project.
 
bool pointInsideImage () const
 Returns true if the point is inside the image.
 
void set3DPointEye (const wVector &point)
 Sets the 3D point to project on the 2D image.
 
void set3DPointWorld (const wVector &point)
 Sets the 3D point to project on the 2D image.
 
void setEyeMatrix (const wMatrix &eye)
 Sets the current eye matrix.
 

Detailed Description

A class projecting a 3D space point into a 2D image point.

The resulting image is the one we would obtain if the focal distance was 1.0; the center of the image is in <0, 0>. Both the vertical and horizontal aperture are in degrees.

Definition at line 97 of file projector.h.

Constructor & Destructor Documentation

Projector ( )
inline

Constructor.

Definition at line 103 of file projector.h.

Member Function Documentation

const ImagePoint& getImagePoint ( ) const
inline

Returns the position on the 2D image of the point to project.

The point to project is the last one passed to set3DPointWorld() or set3DPointEye()

Returns
the position on the 2D image

Definition at line 171 of file projector.h.

ImagePoint getImagePoint01 ( ) const
inline

Returns the normalized position on the 2D image of the point to project.

The point to project is the last one passed to set3DPointWorld() or set3DPointEye(). The point returned by this function is normalized (i.e. is in [0, 1]x[0, 1])

Returns
the normlized position on the 2D image

Definition at line 185 of file projector.h.

Referenced by ColorCameraSensor::update(), LinearCameraSensor::update(), and HandObjectVisualOffsetSensor::update().

bool pointInsideImage ( ) const
inline

Returns true if the point is inside the image.

Returns
true if the point is inside the image, false otherwise

Definition at line 196 of file projector.h.

References ImagePoint::valid.

Referenced by ColorCameraSensor::update(), and LinearCameraSensor::update().

void set3DPointEye ( const wVector &  point)
inline

Sets the 3D point to project on the 2D image.

Points coordinates must be in the eye frame of reference

Parameters
pointthe 3D point to project on the 2D image

Definition at line 146 of file projector.h.

void set3DPointWorld ( const wVector &  point)
inline

Sets the 3D point to project on the 2D image.

Points coordinates must be in the world frame of reference

Parameters
pointthe 3D point to project on the 2D image

Definition at line 135 of file projector.h.

Referenced by ColorCameraSensor::update(), LinearCameraSensor::update(), and HandObjectVisualOffsetSensor::update().

void setEyeMatrix ( const wMatrix eye)
inline

Sets the current eye matrix.

The z axis is taken as the direction of view and the x axis as the opposite of the upvector (see comment in set3DPointEye())

Returns
the current eye matrix

Definition at line 124 of file projector.h.

References wMatrix::inverse().

Referenced by ColorCameraSensor::update(), LinearCameraSensor::update(), and HandObjectVisualOffsetSensor::update().


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