gramods
Loading...
Searching...
No Matches
FovPlanarView.hh
1
2#ifndef GRAMODS_GRAPHICS_FOVPLANARVIEW
3#define GRAMODS_GRAPHICS_FOVPLANARVIEW
4
5// Required before gmCore/OFactory.hh for some compilers
6#include <gmCore/io_float.hh>
7#include <gmCore/io_angle.hh>
8#include <gmCore/io_eigen.hh>
9
10#include <gmGraphics/View.hh>
11
12BEGIN_NAMESPACE_GMGRAPHICS;
13
18 : public View {
19
20public:
21
22 void renderFullPipeline(ViewSettings settings) override;
23
31 planes = p;
32 }
33
45 planes[0] = -tanf(p[0]);
46 planes[1] = tanf(p[1]);
47 planes[2] = -tanf(p[2]);
48 planes[3] = tanf(p[3]);
49 }
50
58 void setOrientation(Eigen::Quaternionf q) {
59 orientation = q;
60 }
61
62 GM_OFI_DECLARE;
63
64private:
65
66 gmCore::float4 planes = { -1, 1, -1, 1 };
67 Eigen::Quaternionf orientation = Eigen::Quaternionf::Identity();
68
69};
70
71END_NAMESPACE_GMGRAPHICS;
72
73#endif
This view provides skewed frustum projection of the renderers.
Definition FovPlanarView.hh:18
void setClipPlanes(gmCore::float4 p)
Sets the clip planes, left, right, bottom, top, in x, y coordinates at distance 1.
Definition FovPlanarView.hh:30
void setOrientation(Eigen::Quaternionf q)
Sets the orientation of the View.
Definition FovPlanarView.hh:58
void setClipAngles(gmCore::angle4 p)
Angles between forward direction and the clip planes left, right, bottom and top, in radians.
Definition FovPlanarView.hh:44
The base of graphics View implementations.
Definition View.hh:13
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
Package of settings affecting the rendering.
Definition ViewBase.hh:30