Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Render Class Reference

A rendering class that accepts commands from a Gui, and determines using specific graphics libraries how to draw the results on a screen. More...

#include <render.h>

Inheritance diagram for Render::

RenderGL RenderIv RenderPerformer List of all members.

Public Methods

 Render ()
 Render (string filepath)
 Render (Scene *s, string filepath)
virtual ~Render ()
virtual void Init ()
 Initialized the renderer.

virtual void HandleEvents ()
 Process IO events.

virtual void MainLoop (Gui *g)
 If ControlFreak = true, then MainLoop is entered here.

virtual void Reset ()
 Reset the renderer.

virtual void Terminate ()
 Implement functions upon termination of the renderer.

virtual void SetFrameList ()
 Make the set of frames from StateList and TimeList.

virtual void MakeAnimationFrames (const list< MSLVector > &xlist, double deltat)
 Generate FrameList and set AnimationActive to true.

virtual void MakeAnimationFrames (const list< MSLVector > &xlist, const list< double > &timelist)
virtual void DrawPath ()
 Display an entire path (the specific renderer determines how).

virtual void ButtonHandle (int b)
 Execute actions for render control window choices.

void SetScene (Scene *s)
 Change the associated scene.


Public Attributes

string FilePath
 The path name for accessing files.

list<MSLVectorFrameList
 The animation frames; each element is a SceneConfiguration.

double FrameTime
 The amount of time for which a frame is shown.

float LastFrameTime
 The time stamp of the last frame change.

float FrameStuckTime
 The amount of time since the last frame change.

int NumFrames
 The number of frames in the animation.

double AnimationStartPause
 Number of seconds to wait at the start of an animation.

double AnimationEndPause
 Number of seconds to wait at the end of an animation.

double AnimationTimeScale
 The speedup factor for the animation (1.0 = normal speed).

int AnimationFrameIndex
 The index in FrameList of the frame that should be currently shown.

MSLVector CurrentAnimationFrame
 The frame that should be shown currently.

bool AnimationActive
 Set to true to start the animation.

bool ControlFreak
 Set to true if the renderer needs main loop control; otherwise, iterated polling of HandleEvents will be performed automatically.

bool RenderCtlWindowOn
 Is teh rendering control window currently displayed?

bool AttachedCameraOn
 Set to true for the viewpoint to be attached to a body.

bool BoundingBoxOn
 Set to true to draw a bounding box using S->LowerWorld and S->UpperWorld.

bool MultipleViewsOn
 Set to true to show multiple views simultaneously.

bool ShowPathOn
 Set to true to show the entire path.

double AmbientLight
 A parameter that controls the amount of light.


Protected Methods

virtual void SetCurrentAnimationFrame ()
 This uses the FrameList to return the SceneConfiguration that is supposed to be shown at the present time.

virtual void ShowCurrentAnimationFrame ()
 Display the current animation frame in a rendering window.


Protected Attributes

SceneS
 Allow information from a Scene to be accessed.

list<MSLVectorStateList
 A sequence of state to use for animation (should be generated by Gui).

list<double> TimeList
 The time stamps for the state sequence.

list<string> EnvList
list<string> BodyList
float RGBRed [RENDERCOLORS]
 RGB color values.

float RGBGreen [RENDERCOLORS]
float RGBBlue [RENDERCOLORS]

Detailed Description

A rendering class that accepts commands from a Gui, and determines using specific graphics libraries how to draw the results on a screen.

This hierarchy of classes contains different implementations of graphical rendering requests. For example, when a graphical user interface (GUI) requests that the a solution path is animated, a method in a Render class displays the bodies in motion using configurations obtained from the Scene class. Each derived class in Render corresponds to a different graphics system. Presently, there are renderers for Open Inventor and Open GL. The flexibility provided by these classes enables easy extensions to be made for other graphics libraries and platforms, such as Open Inventor.

The rendering is expressed in terms of a Scene, in which the scene configuration gives the configuration of a collection of Bodies in a static Environment.


Constructor & Destructor Documentation

Render::Render ( )
 

Render::Render ( string filepath )
 

Render::Render ( Scene * s,
string filepath )
 

Render::~Render ( ) [inline, virtual]
 


Member Function Documentation

void Render::ButtonHandle ( int b ) [virtual]
 

Execute actions for render control window choices.

void Render::DrawPath ( ) [inline, virtual]
 

Display an entire path (the specific renderer determines how).

Reimplemented in RenderGL.

void Render::HandleEvents ( ) [inline, virtual]
 

Process IO events.

Reimplemented in RenderPerformer.

void Render::Init ( ) [virtual]
 

Initialized the renderer.

Reimplemented in RenderGL, RenderIv, and RenderPerformer.

void Render::MainLoop ( Gui * g ) [virtual]
 

If ControlFreak = true, then MainLoop is entered here.

Reimplemented in RenderGL, and RenderIv.

virtual void Render::MakeAnimationFrames ( const list< MSLVector > & xlist,
const list< double > & timelist ) [virtual]
 

void Render::MakeAnimationFrames ( const list< MSLVector > & xlist,
double deltat ) [virtual]
 

Generate FrameList and set AnimationActive to true.

void Render::Reset ( ) [virtual]
 

Reset the renderer.

Reimplemented in RenderGL, and RenderIv.

void Render::SetCurrentAnimationFrame ( ) [protected, virtual]
 

This uses the FrameList to return the SceneConfiguration that is supposed to be shown at the present time.

void Render::SetFrameList ( ) [virtual]
 

Make the set of frames from StateList and TimeList.

void Render::SetScene ( Scene * s )
 

Change the associated scene.

void Render::ShowCurrentAnimationFrame ( ) [inline, protected, virtual]
 

Display the current animation frame in a rendering window.

Reimplemented in RenderPerformer.

void Render::Terminate ( ) [inline, virtual]
 

Implement functions upon termination of the renderer.

Reimplemented in RenderPerformer.


Member Data Documentation

double Render::AmbientLight
 

A parameter that controls the amount of light.

bool Render::AnimationActive
 

Set to true to start the animation.

double Render::AnimationEndPause
 

Number of seconds to wait at the end of an animation.

int Render::AnimationFrameIndex
 

The index in FrameList of the frame that should be currently shown.

double Render::AnimationStartPause
 

Number of seconds to wait at the start of an animation.

double Render::AnimationTimeScale
 

The speedup factor for the animation (1.0 = normal speed).

bool Render::AttachedCameraOn
 

Set to true for the viewpoint to be attached to a body.

list<string> Render::BodyList [protected]
 

bool Render::BoundingBoxOn
 

Set to true to draw a bounding box using S->LowerWorld and S->UpperWorld.

bool Render::ControlFreak
 

Set to true if the renderer needs main loop control; otherwise, iterated polling of HandleEvents will be performed automatically.

MSLVector Render::CurrentAnimationFrame
 

The frame that should be shown currently.

list<string> Render::EnvList [protected]
 

string Render::FilePath
 

The path name for accessing files.

list< MSLVector > Render::FrameList
 

The animation frames; each element is a SceneConfiguration.

float Render::FrameStuckTime
 

The amount of time since the last frame change.

double Render::FrameTime
 

The amount of time for which a frame is shown.

float Render::LastFrameTime
 

The time stamp of the last frame change.

bool Render::MultipleViewsOn
 

Set to true to show multiple views simultaneously.

int Render::NumFrames
 

The number of frames in the animation.

float Render::RGBBlue[RENDERCOLORS] [protected]
 

float Render::RGBGreen[RENDERCOLORS] [protected]
 

float Render::RGBRed [protected]
 

RGB color values.

bool Render::RenderCtlWindowOn
 

Is teh rendering control window currently displayed?

Scene * Render::S [protected]
 

Allow information from a Scene to be accessed.

bool Render::ShowPathOn
 

Set to true to show the entire path.

list< MSLVector > Render::StateList [protected]
 

A sequence of state to use for animation (should be generated by Gui).

list< double > Render::TimeList [protected]
 

The time stamps for the state sequence.


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


Web page maintained by Steve LaValle
Partial support provided by NSF CAREER Award IRI-970228 (LaValle), Honda Research.
Contributors: Anna Atramentov, Peng Cheng, James Kuffner, Steve LaValle, and Libo Yang.