gramods
|
SphereGeometry contains information for projection of graphics on a sphere. More...
#include <SphereGeometry.hh>
Classes | |
struct | Impl |
Public Member Functions | |
void | setPosition (Eigen::Vector3f p) |
Set the position of the sphere origin, its center. More... | |
void | setRadius (float) |
Set the radius of the sphere. More... | |
void | setFrustumSizeRatio (float) |
Until the render frustum estimation has been implemented to correctly cover the full view frustum, this frustum size modulation parameter can be used to enlarge the render frustum. 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... | |
![]() | |
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... | |
![]() | |
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 gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
![]() | |
std::unique_ptr< Impl > | _impl |
SphereGeometry contains information for projection of graphics on a sphere.
This can be used for view correction of rendering in dome theatres.
|
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 SphereGeometry. Return (0,0) if there is no intersection. Reimplemented from gramods::gmGraphics::Geometry.
void gramods::gmGraphics::SphereGeometry::setFrustumSizeRatio | ( | float | r | ) |
Until the render frustum estimation has been implemented to correctly cover the full view frustum, this frustum size modulation parameter can be used to enlarge the render frustum.
Use this if you see D-shaped black regions at the edge of the view. Default is 1.0.
XML-attribute: frustumSizeRatio
|
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::SphereGeometry::setPosition | ( | Eigen::Vector3f | p | ) |
Set the position of the sphere origin, its center.
XML-attribute: position
void gramods::gmGraphics::SphereGeometry::setRadius | ( | float | r | ) |
Set the radius of the sphere.
XML-attribute: radius