OpenSim  OpenSim 3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
OpenSim::ModelDisplayHints Class Reference

This class captures information indicating user or programmer preferences 

to guide automatic display geometry generation by a Model. More...

#include <ModelDisplayHints.h>

Public Member Functions

 ModelDisplayHints ()
 
Default construction creates a valid display hints object with all 

hints set to their default values.

void clear ()
 This method sets all the display hints to their default values.
Methods for specifying what should get displayed
ModelDisplayHintssetShowWrapGeometry (bool showWrap)
 Specify whether wrap geometry should be displayed.
bool getShowWrapGeometry () const
 Return current setting of the "show wrap geometry" flag.
ModelDisplayHintssetShowContactGeometry (bool showContact)
 Specify whether contact geometry should be displayed.
bool getShowContactGeometry () const
 Return current setting of the "show contact geometry" flag.
ModelDisplayHintssetShowMusclePaths (bool showMusclePaths)
 
Specify whether muscle path lines (or path lines for other path-using

components like ligaments) should be displayed.

bool getShowMusclePaths () const
 Return current setting of the "show muscle paths" flag.
ModelDisplayHintssetShowPathPoints (bool showPathPoints)
 
Specify whether path points should appear along muscle paths in the 

display.

bool getShowPathPoints () const
 Return current setting of the "show path points" flag.
ModelDisplayHintssetShowMarkers (bool showMarkers)
 Specify whether marker points should be displayed.
bool getShowMarkers () const
 Return current setting of the "show markers" flag.
ModelDisplayHintssetShowForces (bool showForces)
 Specify whether forces should be generated and displayed.
bool getShowForces () const
 Return current setting of the "show forces" flag.
ModelDisplayHintssetShowFrames (bool showFrames)
 Specify whether coordinate frames should be displayed.
bool getShowFrames () const
 Return current setting of the "show frames" flag.
ModelDisplayHintssetShowLabels (bool showLabels)
 Specify whether text labels should be generated and displayed.
bool getShowLabels () const
 Return current setting of the "show labels" flag.
ModelDisplayHintssetShowDebugGeometry (bool showDebugGeometry)
 Specify whether debug geometry should be generated and displayed.
bool getShowDebugGeometry () const
 Return current setting of the "show debug geometry" flag.

Detailed Description

This class captures information indicating user or programmer preferences 

to guide automatic display geometry generation by a Model.

Fields here may be set programmatically or as a result of user choices made in the GUI or ModelVisualizer. Any display-generating code including the GUI, ModelVisualizer, and any geometry-generating ModelComponent will be supplied with one of these so that it can modify its behavior if there are any fields it recognizes.

If you are writing a ModelComponent that generates some of its own geometry, and you would like people to consider it well-behaved, you should check whether any of the flags here might reasonably be expected to affect the geometry that your component produces. The currently-supported flags are:

  • show wrap geometry
  • show contact geometry
  • show muscle paths (should apply to other path objects too)
  • show path points
  • show markers
  • show forces
  • show frames
  • show labels
  • show debug geometry

This class is intended to provide some minimal user control over generated geometry in a form that is easy for a ModelComponent author to deal with, since the OpenSim user interface won't know anything about that component or its geometry. Nothing prevents a user interface from providing much more sophisticated control of display features that it understands and the OpenSim GUI does that.

If you would like to see some additional generally-useful flags or options supported here, please file a feature request or post to the OpenSim forum on SimTK.org.

Note
The "set" methods here return a reference to the object so they can be chained for convenience like assignment statements.
See Also
ModelComponent::generateDecorations(), ModelVisualizer
Author
Michael Sherman

Constructor & Destructor Documentation

OpenSim::ModelDisplayHints::ModelDisplayHints ( )
inline

Default construction creates a valid display hints object with all 

hints set to their default values.

Member Function Documentation

void OpenSim::ModelDisplayHints::clear ( )
inline

This method sets all the display hints to their default values.

bool OpenSim::ModelDisplayHints::getShowContactGeometry ( ) const
inline

Return current setting of the "show contact geometry" flag.

bool OpenSim::ModelDisplayHints::getShowDebugGeometry ( ) const
inline

Return current setting of the "show debug geometry" flag.

bool OpenSim::ModelDisplayHints::getShowForces ( ) const
inline

Return current setting of the "show forces" flag.

bool OpenSim::ModelDisplayHints::getShowFrames ( ) const
inline

Return current setting of the "show frames" flag.

bool OpenSim::ModelDisplayHints::getShowLabels ( ) const
inline

Return current setting of the "show labels" flag.

bool OpenSim::ModelDisplayHints::getShowMarkers ( ) const
inline

Return current setting of the "show markers" flag.

bool OpenSim::ModelDisplayHints::getShowMusclePaths ( ) const
inline

Return current setting of the "show muscle paths" flag.

bool OpenSim::ModelDisplayHints::getShowPathPoints ( ) const
inline

Return current setting of the "show path points" flag.

bool OpenSim::ModelDisplayHints::getShowWrapGeometry ( ) const
inline

Return current setting of the "show wrap geometry" flag.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowContactGeometry ( bool  showContact)
inline

Specify whether contact geometry should be displayed.

The default is yes.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowDebugGeometry ( bool  showDebugGeometry)
inline

Specify whether debug geometry should be generated and displayed.

The default is no.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowForces ( bool  showForces)
inline

Specify whether forces should be generated and displayed.

This may apply to forces applied by a component, or calculated reaction forces. The default is no.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowFrames ( bool  showFrames)
inline

Specify whether coordinate frames should be displayed.

The default is no.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowLabels ( bool  showLabels)
inline

Specify whether text labels should be generated and displayed.

The default is no.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowMarkers ( bool  showMarkers)
inline

Specify whether marker points should be displayed.

The default is yes.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowMusclePaths ( bool  showMusclePaths)
inline

Specify whether muscle path lines (or path lines for other path-using

components like ligaments) should be displayed.

The default is yes.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowPathPoints ( bool  showPathPoints)
inline

Specify whether path points should appear along muscle paths in the 

display.

The default is yes but has no effect if muscle paths are not being displayed.

ModelDisplayHints& OpenSim::ModelDisplayHints::setShowWrapGeometry ( bool  showWrap)
inline

Specify whether wrap geometry should be displayed.

The default is yes.


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