gramods
Loading...
Searching...
No Matches
TextureWarpedView.hh
1
2#ifndef GRAMODS_GRAPHICS_TEXTUREWARPEDVIEW
3#define GRAMODS_GRAPHICS_TEXTUREWARPEDVIEW
4
5// Required before gmCore/OFactory.hh for some compilers
6#include <gmCore/io_eigen.hh>
7
8#include <gmGraphics/View.hh>
9#include <gmGraphics/TextureInterface.hh>
10
11BEGIN_NAMESPACE_GMGRAPHICS;
12
17class TextureWarpedView
18 : public View {
19
20public:
21
22 TextureWarpedView();
23 virtual ~TextureWarpedView();
24
30 void renderFullPipeline(ViewSettings settings) override;
31
37 void traverse(Visitor *visitor) override;
38
44 void addView(std::shared_ptr<View>);
45
51 void setTexture(std::shared_ptr<TextureInterface> tex);
52
65 void setEdgeToEdge(bool on);
66
73 void setWarpScale(Eigen::Vector2f scale);
74
81 void setWarpOffset(Eigen::Vector2f offset);
82
83 GM_OFI_DECLARE;
84
85private:
86
87 struct Impl;
88 std::unique_ptr<Impl> _impl;
89};
90
91END_NAMESPACE_GMGRAPHICS;
92
93#endif
void addView(std::shared_ptr< View >)
Adds a view to warp.
Definition TextureWarpedView.cpp:82
void renderFullPipeline(ViewSettings settings) override
Appends local scene graph nodes to the provided settings, forwards rendering to the sub views,...
Definition TextureWarpedView.cpp:87
void setEdgeToEdge(bool on)
De/activates edge-to-edge mode.
Definition TextureWarpedView.cpp:164
void setWarpScale(Eigen::Vector2f scale)
Sets a scaling to the texture values to reach outside of the texture.
Definition TextureWarpedView.cpp:168
void traverse(Visitor *visitor) override
Propagates the specified visitor.
Definition TextureWarpedView.cpp:176
void setTexture(std::shared_ptr< TextureInterface > tex)
Sets the Texture to use for warping coordinates.
Definition TextureWarpedView.cpp:160
void setWarpOffset(Eigen::Vector2f offset)
Sets an offset to add to the texture values, to reach outside of the texture.
Definition TextureWarpedView.cpp:172
The base of graphics View implementations.
Definition View.hh:13
The visitor of a design pattern for automatic traversal.
Definition Object.hh:75
Definition TextureWarpedView.cpp:21
Package of settings affecting the rendering.
Definition ViewBase.hh:34