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)
 
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< ChBodyGetBody () const
 Return the associated body.
 

Member Function Documentation

◆ AddPlane()

void chrono::ChBoundary::AddPlane ( const ChFrame<> &  frame,
const ChVector2<> &  lengths 
)

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
frameplane reference frame, relative to associated body
lengthsX-Y extent

◆ AddVisualization() [1/2]

void chrono::ChBoundary::AddVisualization ( double  thickness)

Add visualization for all existing planes.

Parameters
thicknessvisualization thickness

◆ AddVisualization() [2/2]

void chrono::ChBoundary::AddVisualization ( size_t  id,
double  thickness 
)

Add visualization for the specified plane.

Parameters
idplane indes
thicknessvisualization 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
idplane index
frameplane 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
idplane index
lengthsX-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