2 #ifndef GRAMODS_GRAPHICS_COORDINATESMAPPER
3 #define GRAMODS_GRAPHICS_COORDINATESMAPPER
5 #include <gmCore/Object.hh>
6 #include <gmCore/OFactory.hh>
8 #include <gmGraphics/Camera.hh>
13 BEGIN_NAMESPACE_GMGRAPHICS;
51 "caller wants mapTo2D but this is not imlemented");
69 "caller wants mapTo3D but this is not imlemented");
94 virtual std::string
getDefaultKey()
override {
return "coordinatesMapper"; }
97 const std::string withVarId(std::string)
const;
98 const std::string var_id;
101 END_NAMESPACE_GMGRAPHICS;
Base type for objects in the Gramods package for standardized handling of construction,...
Definition: Object.hh:42
A CoordinatesMapper provides a mapping between 2D and 3D.
Definition: CoordinatesMapper.hh:23
virtual void setTo2DUniforms(GLuint program)
Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by th...
Definition: CoordinatesMapper.hh:82
virtual std::string getCommonCode()
Returns shader "common" code, lines of code that are needed once regardless if 2D or 3D mapping code ...
Definition: CoordinatesMapper.hh:34
virtual std::string getTo2DCode()
Returns shader code that implements the 3D to 2D mapping for the specific coordinates mapper.
Definition: CoordinatesMapper.hh:49
virtual std::string getTo3DCode()
Returns shader code that implements the 2D to 3D mapping for the specific coordinates mapper.
Definition: CoordinatesMapper.hh:67
virtual std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition: CoordinatesMapper.hh:94
virtual void setCommonUniforms(GLuint program)
Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by th...
Definition: CoordinatesMapper.hh:76
virtual void setTo3DUniforms(GLuint program)
Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by th...
Definition: CoordinatesMapper.hh:88
Standard exception for runtime problems and base type for more detailed problems.
Definition: RuntimeException.hh:15