Marine systems simulation
|
#include <CollisionManager.h>
Classes | |
struct | contact_matrix_index_pair |
class | ExternalObject |
class | GeometricObject |
class | InternalObject |
struct | MaterialCharacteristic |
enum of different shape types More... | |
Public Types | |
enum | ShapeType { SPHERE =0 , CAPSULE =1 , CHAMFER =2 , BOX =3 , TOROID =4 , PLATE =5 } |
Public Member Functions | |
CollisionManager (ConstraintSolver *solver, double timeConstant) | |
int | AddCapsule (double radius, double height, double contactStiffness, double contactDamping, double frictionCoefficient, int index) |
int | AddSphere (double radius, double contactStiffness, double contactDamping, double frictionCoefficient, int index) |
int | AddTorus (double majorRadius, double minorRadius, double contactStiffness, double contactDamping, double frictionCoefficient, int index) |
int | AddChamfer (double majorRadius, double minorRadius, double contactStiffness, double contactDamping, double frictionCoefficient, int index) |
int | AddPlate (double lengthX, double lengthY, double thickness, double contactStiffness, double contactDamping, double frictionCoefficient, int index) |
int | addExternalSphere (double radius, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity, double contactStiffness, double contactDamping, double frictionCoefficient) |
int | addExternalCapsule (double length, double radius, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity, double contactStiffness, double contactDamping, double frictionCoefficient) |
int | addExternalToroid (double majorRadius, double minorRadius, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity, double contactStiffness, double contactDamping, double frictionCoefficient) |
int | addExternalChamfer (double majorRadius, double minorRadius, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity, double contactStiffness, double contactDamping, double frictionCoefficient) |
int | addExternalPlate (double lengthX, double lengthY, double thickness, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity, double contactStiffness, double contactDamping, double frictionCoefficient) |
void | updateExternalElement (int index, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity) |
vec6 | getExternalObjectReactionForce (int index) |
vec6 | getExternalObjectReactionForce (ExternalObject &external_object) |
vec6 | getInternalObjectReactionForce (InternalObject &internal_object) |
virtual void | ComputeConstraints (const double T, const double *const X) |
void | setSpacePartitionOrigo (double x, double y, double z) |
void | setSpacePartitionBlockSize (double length) |
Public Member Functions inherited from CoRiBoDynamics::ConstraintSet | |
ConstraintSet (ConstraintSolver *solver) | |
virtual void | ComputeConstraints (const double T, const double *const X)=0 |
Protected Member Functions | |
void | CollisionTest (InternalObject *objectA, InternalObject *objectB, const double *const X) |
list of all internal objects in this collision manager | |
void | CollisionTest (ExternalObject *ExtObj, InternalObject *IntObj, const double *const X) |
double | ObjectDistance (GeometricObject *shapeA, GeometricObject *shapeB, GeometryTools::MinDistanceInfo &result) |
bool | BoundingSphereRejectionTest (GeometricObject *sphereA, GeometricObject *sphereB) |
bool | OBB_BoundingSphereRejectionTest (GeometricObject *box, GeometricObject *sphere) |
Protected Member Functions inherited from CoRiBoDynamics::ConstraintSet | |
const std::vector< RigidElement * > & | ElementVector () |
void | addConstraintResultantForce (int element, const vec6 &Force) |
const vec3 | Acceleration (int element) |
const vec3 | AngularAcceleration (int element) |
const vec6 | SecondDerivatives (int element) |
void | addMatrix (int i, int j, const mat6 &M) |
Protected Attributes | |
std::vector< ExternalObject, Eigen::aligned_allocator< ExternalObject > > | m_ExternalObjects |
std::vector< InternalObject, Eigen::aligned_allocator< InternalObject > > | m_InternalObjects |
list of all external objects in this collision manager | |
DataStructures::SpacePartitioner | m_CollisionPartition |
ObjectFactoryStack< contact_matrix_index_pair > | m_external_contact |
double | m_timeConstant |
Adds collision constraint forces to rigid objects. Add references to the elements you want in the collision model.
[2] Currently only a small number of geometric primitives are supported, and not all of them can be pairwise computed for contact forces. The sphere and capsule can collide with all the other primitives, and two plates can collide. Contact between other primitives will not be detected.
[3] The space partition algorithm that is used to speed up the "all vs all" collision detection is optimized for a large number of roughly equally sized objects. If your object size varies by more than 1 order of magnitude the default algorithm may not run efficiently. As a default the object size is set to ~1m.
[4] The size of the space covered by the space partition algorithm is 2^15 (32768) times the block size. Block size and partition origo can be updated.
|
virtual |
Computes and returns the constraint system matrix for the current states (T and X). Adds constraint forces.
Implements CoRiBoDynamics::ConstraintSet.
Reimplemented in CoRiBoDynamics::Structures::SupergridCableCollisionManager, CoRiBoDynamics::Structures::SupergridWinchCableCollisionManager, CoRiBoDynamics::TrawlCableCollisionManager, and ShipContact.