gramods
Loading...
Searching...
No Matches
TextureRenderer.hh
1
2#ifndef GRAMODS_GRAPHICS_TEXTURERENDERER
3#define GRAMODS_GRAPHICS_TEXTURERENDERER
4
5#include <gmGraphics/Renderer.hh>
6#include <gmGraphics/TextureInterface.hh>
7
8#include <gmCore/OFactory.hh>
9
10BEGIN_NAMESPACE_GMGRAPHICS;
11
17 : public Renderer {
18
19public:
20
22
26 void render(const Camera &camera, const Eigen::Affine3f &Mm) override;
27
33 void traverse(Visitor *visitor) override;
34
41 void getNearFar(const Camera &camera,
42 const Eigen::Affine3f &Mm,
43 float &near,
44 float &far) override;
45
52 void setTexture(std::shared_ptr<TextureInterface> tex) {
53 texture = tex;
54 }
55
61 void setFlip(bool on);
62
63 GM_OFI_DECLARE;
64
65private:
66
67 std::shared_ptr<TextureInterface> texture;
68
69 struct Impl;
70 std::unique_ptr<Impl> _impl;
71};
72
73END_NAMESPACE_GMGRAPHICS;
74
75#endif
The base of graphics Camera implementations.
Definition Camera.hh:19
The base of graphics Renderer implementations.
Definition Renderer.hh:17
A renderer that renders a texture flat (2D) filling the view, thereby ignoring camera and view specif...
Definition TextureRenderer.hh:17
void setTexture(std::shared_ptr< TextureInterface > tex)
Sets the Texture that should be called upon calls to the render method.
Definition TextureRenderer.hh:52
The visitor of a design pattern for automatic traversal.
Definition Object.hh:75