gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmGraphics::SphereSceneRenderer Class Reference

A renderer that draws a set of spheres, for demonstration and testing purposes. More...

#include <SphereSceneRenderer.hh>

Inheritance diagram for gramods::gmGraphics::SphereSceneRenderer:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::SphereSceneRenderer:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

void render (const Camera &camera, const Eigen::Affine3f &Mm) override
 Performs rendering of 3D objects in the scene. More...
 
void getNearFar (const Camera &camera, const Eigen::Affine3f &Mm, float &near, float &far) override
 Extracts the currently optimal near and far plane distances. More...
 
void setSphereRadius (float r)
 Sets the radius of each sphere to be drawn. More...
 
void setSphereSetRadius (float r)
 Sets the radius of the set of spheres. More...
 
void setFillRatio (float r)
 Sets how large portion (approximately) of the space that should be covered by spheres. More...
 
void setColor (Eigen::Vector3f c)
 Sets the color of the spheres in the set. More...
 
- Public Member Functions inherited from gramods::gmGraphics::Renderer
void addEye (Eye e)
 Add an eye to render to. More...
 
- Public Member Functions inherited from gramods::gmGraphics::Node
virtual std::vector< float > getIntersections (const IntersectionLine &line)
 Check and return intersections between the provided line and the shape represented by this node. 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::Renderer
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Additional Inherited Members

- Public Types inherited from gramods::gmGraphics::Node
typedef std::vector< std::shared_ptr< Node > > list
 
- Protected Attributes inherited from gramods::gmGraphics::Renderer
std::set< Eyeeyes
 Eyes to render. More...
 

Detailed Description

A renderer that draws a set of spheres, for demonstration and testing purposes.

Member Function Documentation

◆ getNearFar()

void gramods::gmGraphics::SphereSceneRenderer::getNearFar ( const Camera camera,
const Eigen::Affine3f &  Mm,
float &  near,
float &  far 
)
overridevirtual

Extracts the currently optimal near and far plane distances.

This is typically used by a View if there are multiple renderers that need to be rendered with the same near and far planes for correct depth testing.

Implements gramods::gmGraphics::Renderer.

◆ render()

void gramods::gmGraphics::SphereSceneRenderer::render ( const Camera camera,
const Eigen::Affine3f &  Mm 
)
overridevirtual

Performs rendering of 3D objects in the scene.

Implements gramods::gmGraphics::Renderer.

◆ setColor()

void gramods::gmGraphics::SphereSceneRenderer::setColor ( Eigen::Vector3f  c)

Sets the color of the spheres in the set.

Shading will be added.

See also
gramods::operator>>(std::istream &, Eigen::Vector3f &)

◆ setFillRatio()

void gramods::gmGraphics::SphereSceneRenderer::setFillRatio ( float  r)

Sets how large portion (approximately) of the space that should be covered by spheres.

XML-attribute: fillRatio

◆ setSphereRadius()

void gramods::gmGraphics::SphereSceneRenderer::setSphereRadius ( float  r)

Sets the radius of each sphere to be drawn.

XML-attribute: sphereRadius

◆ setSphereSetRadius()

void gramods::gmGraphics::SphereSceneRenderer::setSphereSetRadius ( float  r)

Sets the radius of the set of spheres.

XML-attribute: sphereSetRadius


The documentation for this class was generated from the following files: