GCOP  1.0
Public Member Functions | Public Attributes
gcop::SystemView< Tx, Tu > Class Template Reference

#include <systemview.h>

Inheritance diagram for gcop::SystemView< Tx, Tu >:
Inheritance graph
[legend]
Collaboration diagram for gcop::SystemView< Tx, Tu >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SystemView (const char *name=0, vector< Tx > *xs=0, vector< Tu > *us=0)
virtual ~SystemView ()
virtual void Render (const Tx *x, const Tu *u=0)=0
virtual void Render (const vector< Tx > *xs, const vector< Tu > *us=0, bool rs=true, int is=-1, int ie=-1, int dis=1, int dit=1, bool dl=true)=0
virtual void Render ()
virtual bool RenderFrame (int i)
void SetColor (const double rgba[4])

Public Attributes

vector< Tx > * xs
 trajectory to render
vector< Tu > * us
 controls to render
int dis
 when rendering a trajectory only render a body corresponding to every di-th state (default is 1)
int dit
 when rendering a trajectory only put a point at every di-th state (default is 1)
double rgba [4]
 color
double lineWidth
 trajectory line width (default is 1)
bool renderSystem
 whether to render the physical system (e.g. a body)
bool renderForces
 whether to render forces

Detailed Description

template<typename Tx, typename Tu>
class gcop::SystemView< Tx, Tu >

Discrete Dynamical system view.


Constructor & Destructor Documentation

template<typename Tx, typename Tu>
gcop::SystemView< Tx, Tu >::SystemView ( const char *  name = 0,
vector< Tx > *  xs = 0,
vector< Tu > *  us = 0 
)

Create a view for a single state s

Parameters:
namename
srigid body state

References gcop::SystemView< Tx, Tu >::rgba.

template<typename Tx , typename Tu >
gcop::SystemView< Tx, Tu >::~SystemView ( ) [virtual]

Member Function Documentation

template<typename Tx, typename Tu>
virtual void gcop::SystemView< Tx, Tu >::Render ( const Tx *  x,
const Tu *  u = 0 
) [pure virtual]
template<typename Tx, typename Tu>
virtual void gcop::SystemView< Tx, Tu >::Render ( const vector< Tx > *  xs,
const vector< Tu > *  us = 0,
bool  rs = true,
int  is = -1,
int  ie = -1,
int  dis = 1,
int  dit = 1,
bool  dl = true 
) [pure virtual]

Render a trajectory

Parameters:
trajtrajectory
rsrender state
isstart index
ieend index
disindex step for rendering bodies along trajectory
ditindex step for rendering states(points) along trajectory
dlalways draw last state

Implemented in gcop::Kinbody3dView< _nu >, gcop::Body3dView< c >, gcop::Body3dView< 4 >, gcop::UuvView< c >, gcop::Body2dView< c >, gcop::MbsView, gcop::Kinbody2dView, gcop::CarView, gcop::AirplaneView, gcop::GunicycleView, gcop::Particle2dView, gcop::Point3dView, gcop::RccarView, gcop::UnicycleView, and gcop::Normal2dView< _n >.

template<typename Tx, typename Tu>
void gcop::SystemView< Tx, Tu >::Render ( ) [virtual]

Render a view: all subclasses should provide this method

Reimplemented from gcop::View.

template<typename Tx , typename Tu >
bool gcop::SystemView< Tx, Tu >::RenderFrame ( int  i) [virtual]

Render a view: all subclasses should provide this method

Parameters:
iframe #
Returns:
return true if more frames should be rendered

Reimplemented from gcop::View.

template<typename Tx , typename Tu >
void gcop::SystemView< Tx, Tu >::SetColor ( const double  rgba[4])

Set the rgb color of the trajectory

Parameters:
rgbrgb vector

Member Data Documentation

template<typename Tx, typename Tu>
int gcop::SystemView< Tx, Tu >::dis

when rendering a trajectory only render a body corresponding to every di-th state (default is 1)

template<typename Tx, typename Tu>
int gcop::SystemView< Tx, Tu >::dit

when rendering a trajectory only put a point at every di-th state (default is 1)

template<typename Tx, typename Tu>
double gcop::SystemView< Tx, Tu >::lineWidth

trajectory line width (default is 1)

template<typename Tx, typename Tu>
bool gcop::SystemView< Tx, Tu >::renderForces

whether to render forces

template<typename Tx, typename Tu>
bool gcop::SystemView< Tx, Tu >::renderSystem

whether to render the physical system (e.g. a body)

template<typename Tx, typename Tu>
double gcop::SystemView< Tx, Tu >::rgba[4]
template<typename Tx, typename Tu>
vector<Tu>* gcop::SystemView< Tx, Tu >::us

controls to render

template<typename Tx, typename Tu>
vector<Tx>* gcop::SystemView< Tx, Tu >::xs

trajectory to render


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