Description

Class for storing information about a collision point.

#include <ChCollisionPair.h>

Collaboration diagram for chrono::ChCollisionPair:

Public Member Functions

 ChCollisionPair ()
 Basic constructor.
 
 ChCollisionPair (ChGeometry *mgeo1, ChGeometry *mgeo2, const ChVector3d &mp1, const ChVector3d &mp2, const ChVector3f &mnormal, float *mreaction_cache=0)
 Constructor for case of contact point correctly estimated.
 
 ChCollisionPair (ChGeometry *mgeo1, ChGeometry *mgeo2)
 Constructor for case of just intersection.
 
void Set (ChGeometry *mgeo1, ChGeometry *mgeo2, const ChVector3d &mp1, const ChVector3d &mp2, const ChVector3f &mnormal, float *mreaction_cache=0)
 Set all data at once (better: use the custom constructor)
 
void SwapGeometries ()
 Swap geometries, that is geo1 becomes geo2 and viceversa; normal and so on are updates as well.
 
void CacheFetchSpeedSolutionFromManifold (float &mN, float &mU, float &mV)
 Fetches normal and U,V impulsive reactions, as previously stored in a persistent contact manifold maintained by the collision engine. More...
 
void CacheFetchPositionSolutionFromManifold (float &mN, float &mU, float &mV)
 Fetches normal and U,V 'positional' reactions, as previously stored in a persistent contact manifold maintained by the collision engine. More...
 
void CacheStoreSpeedSolutionIntoManifold (const float mN, const float mU, const float mV)
 Stores normal and U,V reactions into a persistent contact manifold maintained by the collision engine (if any)
 
void CacheStorePositionSolutionIntoManifold (const float mN, const float mU, const float mV)
 Stores normal and U,V 'positional' reactions into a persistent contact manifold maintained by the collision engine (if any)
 

Public Attributes

ChGeometrygeo1
 pointer to 1st geometry which generated this collision pair
 
ChGeometrygeo2
 pointer to 2nd geometry which generated this collision pair
 
ChVector3d p1
 max penetration point on geo1, after refining, in abs space
 
ChVector3d p2
 max penetration point on geo2, after refining, in abs space
 
ChVector3f normal
 normal, on surface of master reference (geo1)
 
double norm_dist
 penetration distance (negative if going inside) after refining
 
bool just_intersection
 if true, only reports that two geometries are intersection, but no info is reliable
 
float * reactions_cache
 about normal, p1 or p2. More...
 

Member Function Documentation

◆ CacheFetchPositionSolutionFromManifold()

void chrono::ChCollisionPair::CacheFetchPositionSolutionFromManifold ( float &  mN,
float &  mU,
float &  mV 
)
inline

Fetches normal and U,V 'positional' reactions, as previously stored in a persistent contact manifold maintained by the collision engine.

If no cache, set as 0,0,0

◆ CacheFetchSpeedSolutionFromManifold()

void chrono::ChCollisionPair::CacheFetchSpeedSolutionFromManifold ( float &  mN,
float &  mU,
float &  mV 
)
inline

Fetches normal and U,V impulsive reactions, as previously stored in a persistent contact manifold maintained by the collision engine.

If no cache, set as 0,0,0

Member Data Documentation

◆ reactions_cache

float* chrono::ChCollisionPair::reactions_cache

about normal, p1 or p2.

points to an array[3] of N,U,V reactions which might be stored in a persistent contact manifold in the collision engine


The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono/collision/ChCollisionPair.h