chrono::ChTriangleMeshShape Class Reference

Description

Class for referencing a triangle mesh shape that can be visualized in some way.

As a child class of ChAsset, it can be 'attached' to physics items. It also defines flags such as 'draw as wireframe', 'do backface culling' etc. but remember that depending on the type of visualization system (POVray, Irrlich,etc.) these flags might not be supported.

#include <ChTriangleMeshShape.h>

Inheritance diagram for chrono::ChTriangleMeshShape:
Collaboration diagram for chrono::ChTriangleMeshShape:

Public Member Functions

std::shared_ptr< geometry::ChTriangleMeshConnectedGetMesh ()
 
void SetMesh (std::shared_ptr< geometry::ChTriangleMeshConnected > mesh)
 
bool IsWireframe () const
 
void SetWireframe (bool mw)
 
bool IsBackfaceCull () const
 
void SetBackfaceCull (bool mbc)
 
const std::string & GetName () const
 
void SetName (const std::string &mname)
 
const ChVectorGetScale () const
 
void SetScale (const ChVector<> &mscale)
 
void SetFixedConnectivity ()
 
bool FixedConnectivity () const
 
void SetModifiedVertices (std::vector< int > vertices)
 
const std::vector< int > & GetModifiedVertices () const
 
virtual void ArchiveOUT (ChArchiveOut &marchive) override
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive) override
 Method to allow de-serialization of transient data from archives.
 
- Public Member Functions inherited from chrono::ChVisualization
void SetVisible (bool mv)
 Set this visualization asset as visible.
 
bool IsVisible () const
 Return true if the asset is set as visible.
 
void SetColor (const ChColor &mc)
 Set the color of the surface (default: white). More...
 
const ChColorGetColor () const
 Return the color assigned to this asset.
 
void SetFading (const float mc)
 Set the fading level, a value in [0,1] (default: 0). More...
 
float GetFading () const
 Get the fading level.
 
void SetStatic (bool val)
 Set this visualization asset as static (default: false). More...
 
bool IsStatic () const
 Return true if the visualization asset is marked as static.
 
- Public Member Functions inherited from chrono::ChAsset
virtual void Update (ChPhysicsItem *updater, const ChCoordsys<> &coords)
 This is called by the owner, i.e. More...
 

Protected Attributes

std::shared_ptr< geometry::ChTriangleMeshConnectedtrimesh
 
bool wireframe
 
bool backface_cull
 
std::string name
 
ChVector scale
 
bool fixed_connectivity
 
std::vector< int > modified_vertices
 
- Protected Attributes inherited from chrono::ChVisualization
bool visible
 
bool is_static
 
ChColor color
 
float fading
 

Additional Inherited Members

- Public Attributes inherited from chrono::ChVisualization
ChVector Pos
 Position of Asset.
 
ChMatrix33 Rot
 Rotation of Asset.
 
std::vector< std::shared_ptr< ChVisualMaterial > > material_list
 

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