gramods
|
A Geometry contains information for projection of graphics on a geometrical shape, such as a sphere or a plane. More...
#include <Geometry.hh>
Classes | |
struct | Impl |
Public Member Functions | |
Geometry (Impl *_impl=nullptr) | |
virtual bool | getCameraFromPosition (Camera vfrustum, Eigen::Vector3f position, Camera &rfrustum) |
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... | |
virtual std::string | getIntersectionCode () |
Returns shader code that implements the necessary functions for the specific geometry. More... | |
virtual void | setMapperUniforms (GLuint) |
Called by the code that is using this geometry object, to let the it set the uniforms used by the mapper code. More... | |
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... | |
![]() | |
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 |
Protected Attributes | |
std::unique_ptr< Impl > | _impl |
A Geometry contains information for projection of graphics on a geometrical shape, such as a sphere or a plane.
|
virtual |
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 in gramods::gmGraphics::SphereGeometry, and gramods::gmGraphics::PlaneGeometry.
|
inlineoverridevirtual |
Returns the default key, in Configuration, for the Object.
Reimplemented from gramods::gmCore::Object.
|
inlinevirtual |
Returns shader code that implements the necessary functions for the specific geometry.
The code must implement
vec3 getIntersection(vec3 pos, vec3 dir)
- returns the intersection between the line defined by the specified position and direction vector and the geometry. Return (0,0,0) if there is no intersection. Reimplemented in gramods::gmGraphics::SphereGeometry, and gramods::gmGraphics::PlaneGeometry.
void gramods::gmGraphics::Geometry::setInside | ( | bool | on | ) |
Set true if the projection should be calculated for the inside of the geometry, and not the outside.
Default is false (projection is estimated for the outside of the geometry).
XML-attribute: inside
|
inlinevirtual |
Called by the code that is using this geometry object, to let the it set the uniforms used by the mapper code.
Reimplemented in gramods::gmGraphics::SphereGeometry, and gramods::gmGraphics::PlaneGeometry.