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. | |
unsigned int | GetNumShapes () const |
Get the number of visual shapes in the model. | |
const std::vector< ShapeInstance > & | GetShapeInstances () const |
Get the visual shapes in the model. | |
std::shared_ptr< ChVisualShape > | GetShape (unsigned int i) const |
Get the specified visual shape in the model. | |
const ChFrame & | GetShapeFrame (unsigned int i) const |
Get the coordinate frame of the specified visual shape in the model (relative to the model frame). | |
unsigned int | GetNumShapesFEA () const |
Get the number of visual shapes in the model. | |
const std::vector< std::shared_ptr< ChVisualShapeFEA > > & | GetShapesFEA () const |
Get the FEA visualization shapes in the model. | |
std::shared_ptr< ChVisualShapeFEA > | GetShapeFEA (unsigned int i) const |
Get the specified FEA visualization object in the model. | |
void | Clear () |
Erase all shapes in this model. | |
void | Erase (std::shared_ptr< ChVisualShape > shape) |
Erase the specified visual shape from this model. | |
ChAABB | GetBoundingBox () const |
Return the axis aligned bounding box (AABB) of the visual model. | |
virtual void | ArchiveOut (ChArchiveOut &archive_out) |
Method to allow serialization of transient data to archives. | |
virtual void | ArchiveIn (ChArchiveIn &archive_in) |
Method to allow deserialization of transient data from archives. | |
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
-
shape visualization shape frame shape 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