|
gramods
|
PlaneGeometry contains information for projection of graphics on a plane. More...
#include <PlaneGeometry.hh>


Classes | |
| struct | Impl |
Public Member Functions | |
| void | setPosition (Eigen::Vector3f p) |
| Set the position of the plane. More... | |
| void | setNormal (Eigen::Vector3f n) |
| Set the orientation of the plane by defining its normal. More... | |
| void | setOrientation (Eigen::Quaternionf q) |
| Set the orientation of the plane. More... | |
| bool | getCameraFromPosition (Camera vfrustum, Eigen::Vector3f position, Camera &rfrustum) override |
| Calculates and returns a frustum, with optical center at the specified position, that contains the intersection between the provided frustum and the geometrical shape. More... | |
| std::string | getIntersectionCode () override |
| Returns shader code that implements the necessary functions for the specific Geometry. More... | |
| void | setMapperUniforms (GLuint program) override |
| Called by the code that is using this geometry object, to let the it set the uniforms used by the mapper code. More... | |
Public Member Functions inherited from gramods::gmGraphics::Geometry | |
| Geometry (Impl *_impl=nullptr) | |
| void | setInside (bool on) |
| Set true if the projection should be calculated for the inside of the geometry, and not the outside. More... | |
| virtual std::string | getDefaultKey () override |
| Returns the default key, in Configuration, for the Object. More... | |
Public Member Functions inherited from gramods::gmCore::Object | |
| Object () | |
| Initializes internal data. More... | |
| virtual | ~Object () |
| Cleaning up internal data. More... | |
| virtual void | initialize () |
| Called to initialize the Object. More... | |
| virtual void | accept (Visitor *visitor) |
| Calls the visitors apply method with this as argument. More... | |
| virtual void | traverse (Visitor *visitor) |
| Calls the child Object's accept method, if such exist. More... | |
| bool | isInitialized () |
| Returns true if the Object is initialized. More... | |
Static Public Attributes | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Static Public Attributes inherited from gramods::gmGraphics::Geometry | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
Protected Attributes inherited from gramods::gmGraphics::Geometry | |
| std::unique_ptr< Impl > | _impl |
PlaneGeometry contains information for projection of graphics on a plane.
This can be used to compensate for keystoning.
|
overridevirtual |
Calculates and returns a frustum, with optical center at the specified position, that contains the intersection between the provided frustum and the geometrical shape.
| [in] | vfrustum | The view frustum, typically the frustum of a projector that projects onto a geometrical surface. |
| [in] | position | The rendering position, that will be the position of the returned render frustum. |
| [out] | rfrustum | The render frustum, a frustum that will provide a rendering of the scene, from the provided position, onto the geometry where this geometry is seen by the vfrustum frustum. |
Reimplemented from gramods::gmGraphics::Geometry.
|
overridevirtual |
Returns shader code that implements the necessary functions for the specific Geometry.
The code implements
vec3 getIntersection(vec3 pos, vec3 dir) - returns the intersection between the line defined by the specified position and direction vector and the PlaneGeometry. Return (0,0,0) if there is no intersection. Reimplemented from gramods::gmGraphics::Geometry.
|
overridevirtual |
Called by the code that is using this geometry object, to let the it set the uniforms used by the mapper code.
Reimplemented from gramods::gmGraphics::Geometry.
| void gramods::gmGraphics::PlaneGeometry::setNormal | ( | Eigen::Vector3f | n | ) |
Set the orientation of the plane by defining its normal.
XML-attribute: normal
| void gramods::gmGraphics::PlaneGeometry::setOrientation | ( | Eigen::Quaternionf | q | ) |
Set the orientation of the plane.
The zero rotation plane is in the x-y plane.
XML-attribute: orientation
| void gramods::gmGraphics::PlaneGeometry::setPosition | ( | Eigen::Vector3f | p | ) |
Set the position of the plane.
XML-attribute: position