gramods
Loading...
Searching...
No Matches
Geometry.hh
1
2#ifndef GRAMODS_GRAPHICS_GEOMETRY
3#define GRAMODS_GRAPHICS_GEOMETRY
4
5#include <gmCore/Object.hh>
6#include <gmCore/OFactory.hh>
7
8#include <gmGraphics/Camera.hh>
9
10#include <GL/glew.h>
11#include <GL/gl.h>
12
13BEGIN_NAMESPACE_GMGRAPHICS;
14
20 : public gmCore::Object {
21
22protected:
23
24 struct Impl;
25 std::unique_ptr<Impl> _impl;
26
27public:
28
29 Geometry(Impl * _impl = nullptr);
30 virtual ~Geometry();
31
53 virtual bool getCameraFromPosition(Camera vfrustum,
54 Eigen::Vector3f position,
55 Camera &rfrustum);
56
68 virtual std::string getIntersectionCode() { return ""; }
69
74 virtual void setMapperUniforms(GLuint) {}
75
83 void setInside(bool on);
84
89 virtual std::string getDefaultKey() override { return "geometry"; }
90
91 GM_OFI_DECLARE;
92
93};
94
95END_NAMESPACE_GMGRAPHICS;
96
97#endif
Base type for objects in the Gramods package for standardized handling of construction,...
Definition Object.hh:42
The base of graphics Camera implementations.
Definition Camera.hh:19
A Geometry contains information for projection of graphics on a geometrical shape,...
Definition Geometry.hh:20
virtual std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition Geometry.hh:89
virtual void setMapperUniforms(GLuint)
Called by the code that is using this geometry object, to let the it set the uniforms used by the map...
Definition Geometry.hh:74
virtual std::string getIntersectionCode()
Returns shader code that implements the necessary functions for the specific geometry.
Definition Geometry.hh:68
Definition Geometry.impl.hh:6