chrono::ChVisualModel Class Reference

Description

Base class for a visual model which encapsulates a set of visual shapes.

Visual models can be instantiated and shared among different Chrono physics items.

#include <ChVisualModel.h>

Public Types

typedef std::pair< std::shared_ptr< ChVisualShape >, ChFrame<> > ShapeInstance
 A ShapeInstance is a pair of a (shared) shape and its position in the model.
 

Public Member Functions

void AddShape (std::shared_ptr< ChVisualShape > shape, const ChFrame<> &frame=ChFrame<>())
 Add a visual shape with specified position within the model. More...
 
void AddShapeFEA (std::shared_ptr< ChVisualShapeFEA > shapeFEA)
 Add visual shapes for an FEA mesh to this model.
 
const std::vector< ShapeInstance > & GetShapes () const
 Get the visual shapes in the model.
 
std::shared_ptr< ChVisualShapeGetShape (unsigned int i) const
 Get the specified visual shape in the model.
 
const std::vector< std::shared_ptr< ChVisualShapeFEA > > & GetShapesFEA () const
 Get the FEA visualization shapes in the model.
 
std::shared_ptr< ChVisualShapeFEAGetShapeFEA (unsigned int i) const
 Get the specified FEA visualization object in the model.
 
const ChFrameGetShapeFrame (unsigned int i) const
 Get the coordinate frame of the specified visual shape in the model (relative to the model frame).
 
void Clear ()
 Erase all shapes in this model.
 
void Erase (std::shared_ptr< ChVisualShape > shape)
 Erase the specified visual shape from this model.
 

Friends

class ChVisualModelInstance
 

Member Function Documentation

◆ AddShape()

void chrono::ChVisualModel::AddShape ( std::shared_ptr< ChVisualShape shape,
const ChFrame<> &  frame = ChFrame<>() 
)

Add a visual shape with specified position within the model.

Parameters
shapevisualization shape
frameshape frame in model

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