chrono::ChColorAsset Class Reference

Description

Base class for assets that carry basic informations about the surface color for visualization assets.

Here we assume that a ChColorAsset 'paints' all the assets of the list (or in same ChAssetLevel). It can be used when exporting to postprocessing or in OpenGL views. The postprocessor must be able to recognize it and implement the proper translation.

#include <ChColorAsset.h>

Inheritance diagram for chrono::ChColorAsset:
Collaboration diagram for chrono::ChColorAsset:

Public Member Functions

 ChColorAsset (const ChColor &c)
 
 ChColorAsset (float mR, float mG, float mB, float mA=0)
 
const ChColorGetColor () const
 Get/Set the color of the surface. More...
 
void SetColor (const ChColor &mc)
 
float GetFading () const
 Get/Set the fading amount, 0 <= fading <= 1. More...
 
void SetFading (const float mc)
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::ChAsset
virtual void Update (ChPhysicsItem *updater, const ChCoordsys<> &coords)
 This is called by the owner, i.e. More...
 

Member Function Documentation

const ChColor& chrono::ChColorAsset::GetColor ( ) const

Get/Set the color of the surface.

This information could be used by visualization postprocessing.

float chrono::ChColorAsset::GetFading ( ) const

Get/Set the fading amount, 0 <= fading <= 1.

If fading = 0, no transparency of surface, If fading = 1, surface is completely transparent.