World of Rigid Bodies (WoRB)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
WoRB::GLUT_Renderer Class Reference

Interface for a GLUT-rendered rigid body. More...

#include <Utilities.h>

Inheritance diagram for WoRB::GLUT_Renderer:
Collaboration diagram for WoRB::GLUT_Renderer:

Data Structures

struct  Colorf
 Represents a color defined red, green, blue and alpha channels. More...

Public Types

enum  RenderType { BodyShape, BodyAxes, BodyShadow, FloorMirror }

Public Member Functions

 GLUT_Renderer ()
 Default construtor; enables tracking objects trajectory by default.
virtual RigidBodyGetBody ()=0
 Gets underlying rigid body.
virtual GeometryGetGeometry ()=0
 Gets underlying geometry.
virtual void Render (RenderType type)=0
 Draws the required geometry (specified by RenderType) of the rigid body.
virtual void RenderWireframe (double *transform)=0
 Draws the wireframe of the rigid body.
virtual ~GLUT_Renderer ()
 Virtual destructor (must have; even if not needed).

Data Fields

bool ShowTrajectory
 Indicates whether to track objects trajectory.
Colorf ActiveColor
 Holds the shape color, used when body is active (moving).
Colorf InactiveColor
 Holds the shape color, used when body is inactive (not-moving).

Detailed Description

Interface for a GLUT-rendered rigid body.

Definition at line 106 of file Utilities.h.


Member Enumeration Documentation

Enumerator:
BodyShape 

Render the body itself.

BodyAxes 

Render the body axes.

BodyShadow 

Render the body shadow (flattened body)

FloorMirror 

Render floor mirror image of the body.

Definition at line 111 of file Utilities.h.

        {
            BodyShape,   //!< Render the body itself
            BodyAxes,    //!< Render the body axes
            BodyShadow,  //!< Render the body shadow (flattened body)
            FloorMirror  //!< Render floor mirror image of the body
        };

Constructor & Destructor Documentation

Default construtor; enables tracking objects trajectory by default.

Definition at line 170 of file Utilities.h.

            : ShowTrajectory( true )
        {
        }
virtual WoRB::GLUT_Renderer::~GLUT_Renderer ( ) [inline, virtual]

Virtual destructor (must have; even if not needed).

Definition at line 193 of file Utilities.h.

{}

Member Function Documentation

virtual RigidBody& WoRB::GLUT_Renderer::GetBody ( ) [pure virtual]

Gets underlying rigid body.

Implemented in WoRB::Box, and WoRB::Ball.

Referenced by WoRB_MexFunction::Parse(), and WoRB_TestBed::Simulate().

virtual Geometry& WoRB::GLUT_Renderer::GetGeometry ( ) [pure virtual]

Gets underlying geometry.

Implemented in WoRB::Box, and WoRB::Ball.

Referenced by WoRB_MexFunction::Parse().

virtual void WoRB::GLUT_Renderer::Render ( RenderType  type) [pure virtual]

Draws the required geometry (specified by RenderType) of the rigid body.

Implemented in WoRB::Box, and WoRB::Ball.

virtual void WoRB::GLUT_Renderer::RenderWireframe ( double *  transform) [pure virtual]

Draws the wireframe of the rigid body.

Implemented in WoRB::Box, and WoRB::Ball.


Field Documentation

Holds the shape color, used when body is inactive (not-moving).

Definition at line 164 of file Utilities.h.

Referenced by WoRB::Ball::Ball(), WoRB::Box::Box(), WoRB_MexFunction::Parse(), WoRB::Ball::Render(), and WoRB::Box::Render().

Indicates whether to track objects trajectory.

Definition at line 156 of file Utilities.h.

Referenced by WoRB_MexFunction::Parse().


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