Simbody  3.6
SimTK::DecorationGenerator Class Referenceabstract

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

+ Inheritance diagram for SimTK::DecorationGenerator:

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. More...
 
virtual ~DecorationGenerator ()
 Destructor is virtual; be sure to override it if you have something to clean up at the end. More...
 

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

◆ ~DecorationGenerator()

virtual SimTK::DecorationGenerator::~DecorationGenerator ( )
inlinevirtual

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

Member Function Documentation

◆ generateDecorations()

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: