Description

Base class for a Chrono run-time visualization system.

#include <ChVisualSystem.h>

Inheritance diagram for chrono::ChVisualSystem:

Public Member Functions

virtual void AttachSystem (ChSystem *sys)
 Attach a Chrono system to this visualization system.
 
virtual void BindAll ()
 Process all visual assets in the associated ChSystem. More...
 
virtual void BindItem (std::shared_ptr< ChPhysicsItem > item)
 Process the visual assets for the spcified physics item. More...
 
virtual void WriteImageToFile (const std::string &filename)
 Create a snapshot of the last rendered frame and save it to the provided file. More...
 
virtual void EnableModalAnalysis (bool val)
 Enable modal analysis visualization. More...
 
virtual void SetModalModeNumber (int val)
 Set the mode to be shown (only if some ChModalAssembly is found).
 
virtual void SetModalAmplitude (double val)
 Set the amplitude of the shown mode (only if some ChModalAssembly is found).
 
virtual void SetModalSpeed (double val)
 Set the speed of the shown mode (only if some ChModalAssembly is found).
 
std::vector< ChSystem * > GetSystems () const
 Get the list of associated Chrono systems.
 
ChSystemGetSystem (int i) const
 Get the specified associated Chrono system.
 

Protected Member Functions

virtual void OnSetup (ChSystem *sys)
 Perform any necessary setup operations at the beginning of a time step. More...
 
virtual void OnUpdate (ChSystem *sys)
 Perform any necessary update operations at the end of a time step. More...
 
virtual void OnClear (ChSystem *sys)
 Remove all visualization objects from this visualization system. More...
 

Protected Attributes

std::vector< ChSystem * > m_systems
 associated Chrono system(s)
 

Friends

class ChSystem
 

Member Function Documentation

◆ BindAll()

virtual void chrono::ChVisualSystem::BindAll ( )
inlinevirtual

Process all visual assets in the associated ChSystem.

This function is called by default when a Chrono system is attached to this visualization system (see AttachSystem), but can also be called later if further modifications to visualization assets occur.

Reimplemented in chrono::irrlicht::ChVisualSystemIrrlicht, and chrono::opengl::ChVisualSystemOpenGL.

◆ BindItem()

virtual void chrono::ChVisualSystem::BindItem ( std::shared_ptr< ChPhysicsItem item)
inlinevirtual

Process the visual assets for the spcified physics item.

This function must be called if a new physics item is added to the system or if changes to its visual model occur after the visualization system was attached to the Chrono system.

Reimplemented in chrono::irrlicht::ChVisualSystemIrrlicht, and chrono::opengl::ChVisualSystemOpenGL.

◆ EnableModalAnalysis()

virtual void chrono::ChVisualSystem::EnableModalAnalysis ( bool  val)
inlinevirtual

Enable modal analysis visualization.

If supported, visualize an oscillatory motion of the n-th mode (if the associated system contains a ChModalAssembly).

Reimplemented in chrono::irrlicht::ChVisualSystemIrrlicht.

◆ OnClear()

virtual void chrono::ChVisualSystem::OnClear ( ChSystem sys)
inlineprotectedvirtual

Remove all visualization objects from this visualization system.

Called by an associated ChSystem.

◆ OnSetup()

virtual void chrono::ChVisualSystem::OnSetup ( ChSystem sys)
inlineprotectedvirtual

Perform any necessary setup operations at the beginning of a time step.

Called by an associated ChSystem.

◆ OnUpdate()

virtual void chrono::ChVisualSystem::OnUpdate ( ChSystem sys)
inlineprotectedvirtual

Perform any necessary update operations at the end of a time step.

Called by an associated ChSystem.

◆ WriteImageToFile()

virtual void chrono::ChVisualSystem::WriteImageToFile ( const std::string &  filename)
inlinevirtual

Create a snapshot of the last rendered frame and save it to the provided file.

The file extension determines the image format.

Reimplemented in chrono::irrlicht::ChVisualSystemIrrlicht, and chrono::opengl::ChVisualSystemOpenGL.


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/assets/ChVisualSystem.h