2#include <Eigen/StdVector>
3#include "ConstraintSet.h"
4#include "DataStructures.h"
42 int AddCapsule(
double radius,
double height,
double contactStiffness,
double contactDamping,
double frictionCoefficient,
int index);
43 int AddSphere(
double radius,
double contactStiffness,
double contactDamping,
double frictionCoefficient,
int index);
44 int AddTorus(
double majorRadius,
double minorRadius,
double contactStiffness,
double contactDamping,
double frictionCoefficient,
int index);
45 int AddChamfer(
double majorRadius,
double minorRadius,
double contactStiffness,
double contactDamping,
double frictionCoefficient,
int index);
46 int AddPlate(
double lengthX,
double lengthY,
double thickness,
double contactStiffness,
double contactDamping,
double frictionCoefficient,
int index);
48 int addExternalSphere(
double radius,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity,
double contactStiffness,
double contactDamping,
double frictionCoefficient);
49 int addExternalCapsule(
double length,
double radius,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity,
double contactStiffness,
double contactDamping,
double frictionCoefficient);
50 int addExternalToroid(
double majorRadius,
double minorRadius,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity,
double contactStiffness,
double contactDamping,
double frictionCoefficient);
51 int addExternalChamfer(
double majorRadius,
double minorRadius,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity,
double contactStiffness,
double contactDamping,
double frictionCoefficient);
52 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);
54 enum ShapeType {SPHERE=0, CAPSULE=1, CHAMFER=2, BOX=3, TOROID=4, PLATE=5};
57 double contactDamping;
64 contactStiffness = std::numeric_limits<double>::quiet_NaN(); contactDamping = std::numeric_limits<double>::quiet_NaN();
frictionCoefficient = std::numeric_limits<double>::quiet_NaN();
72 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
73 mat6 constraint_matrix;
80 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
110 double m_bounding_sphere_radius;
114 ShapeType m_shape_type;
118 vec6 m_contact_forces;
130 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
138 UpdateStates(
nullptr,
nullptr,
nullptr,
nullptr);
142 ExternalObject(
const double*
P,
const double* Q,
const double* V,
const double* W){
143 UpdateStates(
P, Q, V, W);
147 void UpdateStates(
const double*
P,
const double* Q,
const double* V,
const double* W){
162 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
165 void updateExternalElement(
int index,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity);
166 vec6 getExternalObjectReactionForce(
int index);
167 vec6 getExternalObjectReactionForce(
ExternalObject& external_object);
169 vec6 getInternalObjectReactionForce(
InternalObject& internal_object);
173 void setSpacePartitionOrigo(
double x,
double y,
double z);
174 void setSpacePartitionBlockSize(
double length);
178 std::vector<ExternalObject, Eigen::aligned_allocator<ExternalObject> > m_ExternalObjects;
194 double m_timeConstant;
Definition: CollisionManager.h:135
ExternalObject()
Rigid bodies that are controlled externally.
Definition: CollisionManager.h:137
const double * m_W
velocity of the object
Definition: CollisionManager.h:153
const double * m_V
orientation quaternion of the object. order {w,x,y,z}
Definition: CollisionManager.h:152
vec3 P()
angular velocity 'omega' of the object
const double * m_Q
position of the object
Definition: CollisionManager.h:151
Definition: CollisionManager.h:78
double m_radius
half dimensions of the oriented bounding box
Definition: CollisionManager.h:113
Definition: CollisionManager.h:122
InternalObject(RigidElement *element)
Rigid bodies that are under direct control by the constraint solver.
Definition: CollisionManager.h:124
Definition: CollisionManager.h:37
virtual void ComputeConstraints(const double T, const double *const X)
void CollisionTest(InternalObject *objectA, InternalObject *objectB, const double *const X)
list of all internal objects in this collision manager
std::vector< InternalObject, Eigen::aligned_allocator< InternalObject > > m_InternalObjects
list of all external objects in this collision manager
Definition: CollisionManager.h:179
Definition: ConstraintSet.h:24
Definition: ConstraintSolver.h:31
Definition: DataStructures.h:107
Definition: ObjectFactoryStack.h:22
Definition: RigidElement.h:15
Definition: CollisionManager.h:6
enum of different shape types
Definition: CollisionManager.h:56
MaterialCharacteristic(double K, double D, double F)
contact friction coefficient
Definition: CollisionManager.h:60
double contactStiffness
relative damping coefficient of contact forces. relates to alpha as: alpha = beta*contactDamping
Definition: CollisionManager.h:58
double frictionCoefficient
determines contact force stiffness together with the timeConstant.
Definition: CollisionManager.h:59
Definition: CollisionManager.h:71
Definition: GeometryTools.h:88
Definition: GeometryTools.h:60
every point inside 'radius' from 'ring'
Definition: GeometryTools.h:63
Definition: GeometryTools.h:52
Definition: GeometryTools.h:16
Definition: GeometryTools.h:38
every point inside 'radius' from 'disk'
Definition: GeometryTools.h:64
Definition: GeometryTools.h:28
Definition: GeometryTools.h:45
Definition: GeometryTools.h:32
every point inside 'radius' from 'segment'
Definition: GeometryTools.h:61
every point inside 'radius' from 'point'
Definition: GeometryTools.h:62