Project Chrono: chrono::ChVisualShapePointPoint Class Reference

Public Member Functions | List of all members
chrono::ChVisualShapePointPoint Class Referenceabstract
Chrono::Engine » Visual asset objects

## Description

Base class for visualization of some deformable line shape between two moving points related to the parent ChPhysicsItem.

(at this point, only ChLink and its derivatives are supported.) NOTE: An instance of this class should not be shared among multiple ChPhysicsItem instances. Otherwise drawing may broken since each physics item will try to update geometry of the line and causes race conditions.

`#include <ChVisualShapePointPoint.h>`

Inheritance diagram for chrono::ChVisualShapePointPoint:
[legend]
Collaboration diagram for chrono::ChVisualShapePointPoint:
[legend]

## Public Member Functions
virtual void | Update (ChPhysicsItem *updater, const ChFrame<> &coords) override
| Update this visual shape with information for the owning physical object.
Public Member Functions inherited from chrono::ChVisualShapeLine
| ChVisualShapeLine (std::shared_ptr< ChLine > &mline)
std::shared_ptr< ChLine > | GetLineGeometry ()
| Access the line geometry.
void | SetLineGeometry (std::shared_ptr< ChLine > mline)
| Set the line geometry.
const std::string & | GetName () const
void | SetName (const std::string &mname)
unsigned int | GetNumRenderPoints () const
void | SetNumRenderPoints (unsigned int n)
double | GetThickness () const
void | SetThickness (double mt)
virtual void | ArchiveOut (ChArchiveOut &archive_out) override
| Method to allow serialization of transient data to archives.
virtual void | ArchiveIn (ChArchiveIn &archive_in) override
| Method to allow de-serialization of transient data from archives.
Public Member Functions inherited from chrono::ChVisualShape
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 &col)
| Set the diffuse color for this shape.
ChColor | GetColor () const
| Return the diffuse color of the first material in the list of materials for this shape.
void | SetOpacity (float val)
| Set opacity for this shape (0: fully transparent; 1: fully opaque).
float | GetOpacity () const
| Get opacity of the first material in the list of materials for this shape.
void | SetTexture (const std::string &filename, float scale_x=1, float scale_y=1)
| Set the diffuse texture map for this shape.
std::string | GetTexture () const
| Return the diffuse texture map of the first material in the list of materials for this shape.
void | SetMutable (bool val)
| Set this visualization shape as modifiable (default: false for primitive shapes, true otherwise).
bool | IsMutable () const
| Return true if the visualization shape is marked as modifiable.
int | AddMaterial (std::shared_ptr< ChVisualMaterial > material)
| Add a visualization material and return its index in the list of materials.
void | SetMaterial (int i, std::shared_ptr< ChVisualMaterial > material)
| Replace the material with specified index.
std::vector< std::shared_ptr< ChVisualMaterial > > & | GetMaterials ()
| Get the list of visualization materials.
std::shared_ptr< ChVisualMaterial > | GetMaterial (int i)
| Get the specified material in the list.
unsigned int | GetNumMaterials () const
| Get the number of visualization materials.

## Additional Inherited Members
Protected Attributes inherited from chrono::ChVisualShapeLine
std::shared_ptr< ChLine > | gline
| underlying line geometry
std::string | name
| asset name
unsigned int | npoints
| number of points evaluated when rendering
double | thickness
| thickness of line when rendering (for rendering engines that support it)
Protected Attributes inherited from chrono::ChVisualShape
bool | visible
| shape visibility flag
bool | is_mutable
| flag indicating whether the shape is rigid or deformable
std::vector< std::shared_ptr< ChVisualMaterial > > | material_list
| list of visualization materials

## Member Function Documentation

## ◆ Update()

void chrono::ChVisualShapePointPoint::Update | ( | ChPhysicsItem * | updater,
|  | const ChFrame<> & | frame )
| overridevirtual

Update this visual shape with information for the owning physical object.

Since a visual shape can be shared in multiple instances, this function may be called with different updaters.

Reimplemented from chrono::ChVisualShape.

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono/assets/ChVisualShapePointPoint.h
- D:/W/B/src/chrono-9.0.1/src/chrono/assets/ChVisualShapePointPoint.cpp