gramods
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
gramods::gmGraphics::GeometryCorrectedProjectorView Class Reference

Geometrically corrected projector view, a view that is undistorted by geometrical projection. More...

#include <GeometryCorrectedProjectorView.hh>

Inheritance diagram for gramods::gmGraphics::GeometryCorrectedProjectorView:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::GeometryCorrectedProjectorView:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
void setBufferWidth (int W)
 Sets the resolution of the intermediate buffer, in pixels. More...
 
void setBufferHeight (int H)
 Sets the resolution of the intermediate buffer, in pixels. More...
 
void setLinearInterpolation (bool on)
 Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space. More...
 
void setTopLeftCorner (Eigen::Vector3f tlc)
 Set the top left corner of the projection. More...
 
void setBottomRightCorner (Eigen::Vector3f brc)
 Set the bottom right corner of the projection. More...
 
void setPosition (Eigen::Vector3f p)
 Set the position of the optic center of the projection. More...
 
void setExtrinsics (gmCore::float12 M)
 Set the position and orientation of the projection as an extrinsics matrix (12 values, 4 column 3-vectors, row major): More...
 
void setIntrinsics (gmCore::float4 m)
 Set the projection shape, as intrinsics (fx fy cx cy), in unitless values assuming a sensor size of 1x1. More...
 
void setClipAngles (gmCore::angle4 a)
 Angles between forward direction and the clip planes left, right, bottom and top, in radians. More...
 
void setOrientation (Eigen::Quaternionf q)
 Set orientation of the projection, of the extrinsics. More...
 
void setGeometry (std::shared_ptr< Geometry > g)
 Set the geometry to use for projection correction. More...
 
- Public Member Functions inherited from gramods::gmGraphics::MultiscopicView
void renderFullPipeline (ViewSettings settings) override final
 Dispatches specified renders, both method argument and class members. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
void setMultiscopicMultiplexer (std::shared_ptr< MultiscopicMultiplexer > sm)
 Sets the multiscopic multiplexing to use for rendering. More...
 
- Public Member Functions inherited from gramods::gmGraphics::ViewBase
void addNode (std::shared_ptr< Node > node)
 Adds a scenegraph to the view. More...
 
void setViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Sets the viewpoint to use in the views rendered by this ViewBase. More...
 
void addViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Adds a viewpoint to use in the views rendered by this ViewBase. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void initialize ()
 Called to initialize the Object. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Static Public Attributes inherited from gramods::gmGraphics::MultiscopicView
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Static Public Attributes inherited from gramods::gmGraphics::View
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Static Public Attributes inherited from gramods::gmGraphics::ViewBase
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Protected Member Functions

void renderFullPipeline (ViewSettings settings, Eye eye) override
 Renders one eye at a time, or just a mono eye. More...
 
- Protected Member Functions inherited from gramods::gmGraphics::ViewBase
void populateViewSettings (ViewSettings &settings)
 Adds the dispatcher's local renderers and viewpoint, if set. More...
 

Additional Inherited Members

- Protected Attributes inherited from gramods::gmGraphics::MultiscopicView
std::shared_ptr< MultiscopicMultiplexermultiscopic_multiplexer
 
- Protected Attributes inherited from gramods::gmGraphics::ViewBase
Node::list nodes
 
std::vector< std::shared_ptr< Viewpoint > > viewpoints
 

Detailed Description

Geometrically corrected projector view, a view that is undistorted by geometrical projection.

Use this view if there is a projector that shows its image on a geometrically non-complex surface (such as a flat, cylindrical or spherical surface) and the observer, or viewer, is not co-located with this projector but still wants a non-distorted view.

To function correctly, this view needs to be configured with three settings: position, orientation and frustum shape.

The estimation of the frustum shape from specified corners will not* control the orientation of the projection, but rather take orientation into account. This means that the corners positions of the projection can be measured directly on the (potentially non-linear) projection surface.

Member Function Documentation

◆ renderFullPipeline()

void gramods::gmGraphics::GeometryCorrectedProjectorView::renderFullPipeline ( ViewSettings  settings,
Eye  eye 
)
overrideprotectedvirtual

Renders one eye at a time, or just a mono eye.

Implements gramods::gmGraphics::MultiscopicView.

◆ setBottomRightCorner()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setBottomRightCorner ( Eigen::Vector3f  brc)

Set the bottom right corner of the projection.

XML-attribute: bottomRightCorner

See also
gramods::operator>>(std::istream &, Eigen::Vector3f &)

◆ setBufferHeight()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setBufferHeight ( int  H)

Sets the resolution of the intermediate buffer, in pixels.

Default is 2048.

XML-attribute: bufferHeight

◆ setBufferWidth()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setBufferWidth ( int  W)

Sets the resolution of the intermediate buffer, in pixels.

Default is 2048.

XML-attribute: bufferWidth

◆ setClipAngles()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setClipAngles ( gmCore::angle4  a)

Angles between forward direction and the clip planes left, right, bottom and top, in radians.

Left and bottom angles increase left-wise and downwards, respectively, while right and top angles increase right-wise and upwards, respectively.

XML-attribute: clipAngles

See also
operator>>(std::istream &, gmCore::angle &)

◆ setExtrinsics()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setExtrinsics ( gmCore::float12  M)

Set the position and orientation of the projection as an extrinsics matrix (12 values, 4 column 3-vectors, row major):

XML-attribute: extrinsics

◆ setGeometry()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setGeometry ( std::shared_ptr< Geometry g)

Set the geometry to use for projection correction.

XML-attribute: geometry

◆ setIntrinsics()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setIntrinsics ( gmCore::float4  m)

Set the projection shape, as intrinsics (fx fy cx cy), in unitless values assuming a sensor size of 1x1.

XML-attribute: intrinsics

◆ setLinearInterpolation()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setLinearInterpolation ( bool  on)

Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space.

Default is off.

XML-attribute: linearInterpolation

◆ setOrientation()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setOrientation ( Eigen::Quaternionf  q)

Set orientation of the projection, of the extrinsics.

XML-attribute: orientation

See also
gramods::operator>>(std::istream &, Eigen::Quaternionf &)

◆ setPosition()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setPosition ( Eigen::Vector3f  p)

Set the position of the optic center of the projection.

XML-attribute: position

See also
gramods::operator>>(std::istream &, Eigen::Vector3f &)

◆ setTopLeftCorner()

void gramods::gmGraphics::GeometryCorrectedProjectorView::setTopLeftCorner ( Eigen::Vector3f  tlc)

Set the top left corner of the projection.

XML-attribute: topLeftCorner

See also
gramods::operator>>(std::istream &, Eigen::Vector3f &)

◆ traverse()

void gramods::gmGraphics::GeometryCorrectedProjectorView::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.


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