Simbody  3.4 (development)
SimTK::DecorationGenerator Class Reference

A DecorationGenerator is used to define geometry that may change over the course of a simulation. More...

#include <DecorationGenerator.h>

+ Inheritance diagram for SimTK::DecorationGenerator:

List of all members.

Public Member Functions

virtual void generateDecorations (const State &state, Array_< DecorativeGeometry > &geometry)=0
 This will be called every time a new State is about to be visualized.
virtual ~DecorationGenerator ()
 Destructor is virtual; be sure to override it if you have something to clean up at the end.

Detailed Description

A DecorationGenerator is used to define geometry that may change over the course of a simulation.

Example include

  • Geometry whose position is not fixed relative to any single body.
  • Geometry which may appear or disappear during the simulation.
  • Geometry whose properties (color, size, etc.) may change during the simulation.

To use it, define a concrete subclass that implements generateDecorations() to generate whatever geometry is appropriate for a given State. It can then be added to a DecorationSubsystem, or directly to a Visualizer.


Constructor & Destructor Documentation

virtual SimTK::DecorationGenerator::~DecorationGenerator ( ) [inline, virtual]

Destructor is virtual; be sure to override it if you have something to clean up at the end.


Member Function Documentation

virtual void SimTK::DecorationGenerator::generateDecorations ( const State state,
Array_< DecorativeGeometry > &  geometry 
) [pure virtual]

This will be called every time a new State is about to be visualized.

It should generate whatever decorations are appropriate for the State and append them to the array.

Implemented in SimTK::PlaneDecorator, SimTK::PathDecorator, and SimTK::GeodesicDecorator.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines