Description

Base class for a Chrono run-time visualization system.

#include <ChVisualSystem.h>

Inheritance diagram for chrono::ChVisualSystem:
Collaboration diagram for chrono::ChVisualSystem:

Public Member Functions

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).
 
ChSystemGetSystem () const
 Get the associated Chrono system.
 

Protected Member Functions

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

Protected Attributes

ChSystemm_system
 associated Chrono system
 

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 the visualization system is attached to a Chrono system (using ChSystem::SetVisualSystem()), but can also be called later if further modifications to visualization assets occur.

Reimplemented in chrono::irrlicht::ChVisualSystemIrrlicht.

◆ 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.

◆ 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.

◆ OnAttach()

virtual void chrono::ChVisualSystem::OnAttach ( )
inlineprotectedvirtual

Perform any necessary operations when the visualization system is attached to a ChSystem.

Called by the associated ChSystem after it sets m_system.

◆ OnClear()

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

Remove all visualization objects from this visualization system.

Called by the associated ChSystem.

◆ OnSetup()

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

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

Called by the associated ChSystem.

◆ OnUpdate()

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

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

Called by the 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.


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