chrono::ChAssetLevel Class Reference

Description

Base class for grouping assets in a level.

The level is like a 'subdirectory'. A level can contain assets; among these, also further levels, etc. (but please avoid circular loops!) A level can have custom rotation and translation respect its parent level.

#include <ChAssetLevel.h>

Inheritance diagram for chrono::ChAssetLevel:
Collaboration diagram for chrono::ChAssetLevel:

Public Member Functions

ChFrameGetFrame ()
 Access the coordinate system information of the level, for setting/getting its position and rotation respect to its parent. More...
 
std::vector< std::shared_ptr< ChAsset > > & GetAssets ()
 Access to the list of children assets.
 
std::shared_ptr< ChAssetGetAssetN (unsigned int num)
 Get the Nth asset in list.
 
void AddAsset (std::shared_ptr< ChAsset > masset)
 Add an asset.
 
virtual void Update (ChPhysicsItem *updater, const ChCoordsys<> &coords)
 Updates all children assets, if any. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de serialization of transient data from archives.
 

Protected Attributes

ChFrame levelframe
 
std::vector< std::shared_ptr< ChAsset > > assets
 

Member Function Documentation

ChFrame& chrono::ChAssetLevel::GetFrame ( )

Access the coordinate system information of the level, for setting/getting its position and rotation respect to its parent.

void chrono::ChAssetLevel::Update ( ChPhysicsItem updater,
const ChCoordsys<> &  coords 
)
virtual

Updates all children assets, if any.

Overrides default behaviour that does nothing. Note that when calls Update() on children assets, their 'coords' will be the result of concatenating this frame csys and 'coords'.

Reimplemented from chrono::ChAsset.

Reimplemented in chrono::fea::ChVisualizationFEAmesh.