chrono::ChBoundary Class Reference
Description
Utility class for specifying a collision boundary composed of multiple semi-planes.
#include <ChBoundary.h>
Inheritance diagram for chrono::ChBoundary:
Collaboration diagram for chrono::ChBoundary:
Public Member Functions | |
ChBoundary (std::shared_ptr< ChBody > body, std::shared_ptr< ChMaterialSurfaceSMC > material) | |
void | AddPlane (const ChFrame<> &frame, const ChVector2<> &lengths) |
Add a collision plane with finite extent and return the plane ID. More... | |
void | Update () |
Update all collision planes. More... | |
void | UpdatePlane (size_t id, const ChFrame<> &frame) |
Override the position of the specified collision plane. More... | |
void | UpdatePlane (size_t id, const ChVector2<> &lengths) |
Override the X-Y extent of the specified collision plane. More... | |
void | AddVisualization (size_t id, double thickness) |
Add visualization for the specified plane. More... | |
void | AddVisualization (double thickness) |
Add visualization for all existing planes. More... | |
int | GetNContacts () const |
Return the current number of collisions. | |
std::shared_ptr< ChBody > | GetBody () const |
Return the associated body. | |
Member Function Documentation
◆ AddPlane()
Add a collision plane with finite extent and return the plane ID.
The plane normal is in the Z-direction of the given frame.
- Parameters
-
frame plane reference frame, relative to associated body lengths X-Y extent
◆ AddVisualization() [1/2]
void chrono::ChBoundary::AddVisualization | ( | double | thickness | ) |
Add visualization for all existing planes.
- Parameters
-
thickness visualization thickness
◆ AddVisualization() [2/2]
void chrono::ChBoundary::AddVisualization | ( | size_t | id, |
double | thickness | ||
) |
Add visualization for the specified plane.
- Parameters
-
id plane indes thickness visualization thickness
◆ Update()
void chrono::ChBoundary::Update | ( | ) |
Update all collision planes.
This function should be called if the position of the associated body is modified.
◆ UpdatePlane() [1/2]
void chrono::ChBoundary::UpdatePlane | ( | size_t | id, |
const ChFrame<> & | frame | ||
) |
Override the position of the specified collision plane.
- Parameters
-
id plane index frame plane reference frame, relative to associated body
◆ UpdatePlane() [2/2]
void chrono::ChBoundary::UpdatePlane | ( | size_t | id, |
const ChVector2<> & | lengths | ||
) |
Override the X-Y extent of the specified collision plane.
- Parameters
-
id plane index lengths X-Y extent
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_distributed/collision/ChBoundary.h
- /builds/uwsbel/chrono/src/chrono_distributed/collision/ChBoundary.cpp