gramods
Loading...
Searching...
No Matches
GeometryCorrectedProjectorView.hh
1
2#ifndef GRAMODS_GRAPHICS_GEOMETRYCORRECTEDPROJECTORVIEW
3#define GRAMODS_GRAPHICS_GEOMETRYCORRECTEDPROJECTORVIEW
4
5// Required before gmCore/OFactory.hh for some compilers
6#include <gmCore/io_float.hh>
7#include <gmCore/io_eigen.hh>
8#include <gmCore/io_angle.hh>
9
10#include <gmGraphics/MultiscopicView.hh>
11
12#include <gmGraphics/Geometry.hh>
13
14BEGIN_NAMESPACE_GMGRAPHICS;
15
34class GeometryCorrectedProjectorView
35 : public MultiscopicView {
36
37public:
38
39 GeometryCorrectedProjectorView();
40 virtual ~GeometryCorrectedProjectorView();
41
47 void traverse(Visitor *visitor) override;
48
55 void setBufferWidth(int W);
56
63 void setBufferHeight(int H);
64
71 void setLinearInterpolation(bool on);
72
80 void setTopLeftCorner(Eigen::Vector3f tlc);
81
89 void setBottomRightCorner(Eigen::Vector3f brc);
90
98 void setPosition(Eigen::Vector3f p);
99
107
115
127
135 void setOrientation(Eigen::Quaternionf q);
136
142 void setGeometry(std::shared_ptr<Geometry> g);
143
144 GM_OFI_DECLARE;
145
146protected:
147
151 void renderFullPipeline(ViewSettings settings, Eye eye) override;
152
153private:
154
155 struct Impl;
156 std::unique_ptr<Impl> _impl;
157};
158
159END_NAMESPACE_GMGRAPHICS;
160
161#endif
void setIntrinsics(gmCore::float4 m)
Set the projection shape, as intrinsics (fx fy cx cy), in unitless values assuming a sensor size of 1...
Definition GeometryCorrectedProjectorView.cpp:156
void setExtrinsics(gmCore::float12 M)
Set the position and orientation of the projection as an extrinsics matrix (12 values,...
Definition GeometryCorrectedProjectorView.cpp:146
void setGeometry(std::shared_ptr< Geometry > g)
Set the geometry to use for projection correction.
Definition GeometryCorrectedProjectorView.cpp:168
void setPosition(Eigen::Vector3f p)
Set the position of the optic center of the projection.
Definition GeometryCorrectedProjectorView.cpp:142
void setLinearInterpolation(bool on)
Turn on or off linear interpolation in the projection from linear graphics to non-linear projection s...
Definition GeometryCorrectedProjectorView.cpp:130
void setBufferWidth(int W)
Sets the resolution of the intermediate buffer, in pixels.
Definition GeometryCorrectedProjectorView.cpp:122
void renderFullPipeline(ViewSettings settings, Eye eye) override
Renders one eye at a time, or just a mono eye.
Definition GeometryCorrectedProjectorView.cpp:172
void traverse(Visitor *visitor) override
Propagates the specified visitor.
Definition GeometryCorrectedProjectorView.cpp:345
void setBottomRightCorner(Eigen::Vector3f brc)
Set the bottom right corner of the projection.
Definition GeometryCorrectedProjectorView.cpp:138
void setBufferHeight(int H)
Sets the resolution of the intermediate buffer, in pixels.
Definition GeometryCorrectedProjectorView.cpp:126
void setTopLeftCorner(Eigen::Vector3f tlc)
Set the top left corner of the projection.
Definition GeometryCorrectedProjectorView.cpp:134
void setOrientation(Eigen::Quaternionf q)
Set orientation of the projection, of the extrinsics.
Definition GeometryCorrectedProjectorView.cpp:164
void setClipAngles(gmCore::angle4 a)
Angles between forward direction and the clip planes left, right, bottom and top, in radians.
Definition GeometryCorrectedProjectorView.cpp:160
The base of Views that support multiscopic perspectives.
Definition MultiscopicView.hh:19
std::array< float, 12 > float12
Array of 12 float.
Definition io_float.hh:21
std::array< float, 4 > float4
Array of 4 float.
Definition io_float.hh:18
std::array< angle, 4 > angle4
Array of 4 angle.
Definition io_angle.hh:65
The visitor of a design pattern for automatic traversal.
Definition Object.hh:75
An indexed eye that can be rendered.
Definition Eye.hh:20
Definition GeometryCorrectedProjectorView.cpp:29
Package of settings affecting the rendering.
Definition ViewBase.hh:34