3#include "ConstraintSet.h"
4#include<Eigen/StdVector>
28 void addBallJointCoupling(
int elementA,
int elementB, vec3 vectorA, vec3 vectorB,
double Beta,
double Alpha,
double Gamma);
36 void addHingeCoupling(
int elementA,
int elementB, vec3 vectorA, vec3 vectorB, vec3 axisA, vec3 axisB,
double Beta,
double Alpha,
double Gamma,
double AlphaFriction,
double GammaFriction);
45 void addRigidCoupling(
int elementA,
int elementB, vec3 vectorA, vec3 vectorB,
double BetaN,
double AlphaN,
double GammaN,
const Quat& nullAngle,
const Quat& BetaM,
const Quat& AlphaM,
const Quat& GammaM);
53 int addExternalBallJointCoupling(
int element, vec3 vector,
double Beta,
double Alpha,
double Gamma,
const double* Position,
const double* Velocity);
73 int addExternalRigidCoupling(
int element, vec3 vectorExternalObject, vec3 vectorInternalObject,
double BetaN,
double AlphaN,
double GammaN,
const Quat& nullAngle,
const Quat& BetaM,
const Quat& AlphaM,
const Quat& GammaM,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity);
79 void updateExternalRigidCoupling(
int rigidCoupling,
const double* Position,
const double* Velocity,
const double* Orientation,
const double* AngularVelocity);
101 double Alpha2Friction;
102 double GammaFriction;
103 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
118 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
138 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
147 const double* extPos;
148 const double* extVel;
150 ExternalBallJointCoupling(
int i, vec3 v,
double B,
double A,
double G){element = i; vector = v; Beta2 = B; Alpha2 = A; Gamma = G;}
151 void SetStates(
const double* E_P,
const double* E_V){extPos = E_P; extVel = E_V;}
154 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
170 const double* extPos;
171 const double* extVel;
172 const double* extQuat;
173 const double* extOmega;
174 void SetValues(
int i, vec3 vExt, vec3 vInt,
const Quat& e,
double BN2,
double A2N,
double GN,
const Quat& BM2,
const Quat& A2M,
const Quat& GM){element = i; vectorExt = vExt; vectorInt = vInt; nullAngle = e; BetaN2 = BN2; Alpha2N = A2N; GammaN = GN; BetaM2 = BM2; Alpha2M = A2M; GammaM = GM;}
175 void SetStates(
const double* E_P,
const double* E_V,
const double* E_Q,
const double* E_W){extPos = E_P; extVel = E_V; extQuat = E_Q; extOmega = E_W;}
176 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
183 static mat4 QuaternionConstraint_Jacobian(
const Quat& q);
184 static mat43 Quaternion_Kinematics(
const Quat& q);
186 std::vector<HingeCoupling ,Eigen::aligned_allocator<HingeCoupling > > m_HingeCoupling;
188 std::vector<RigidCoupling ,Eigen::aligned_allocator<RigidCoupling > >
m_RigidCoupling;
Definition: ConstraintSet.h:24
Definition: ConstraintSolver.h:31
Definition: JointConstraint.h:17
std::vector< ExternalBallJointCoupling, Eigen::aligned_allocator< ExternalBallJointCoupling > > m_ExternalBallJointCoupling
Rigid Coupling.
Definition: JointConstraint.h:190
std::vector< RigidCoupling,Eigen::aligned_allocator< RigidCoupling > > m_RigidCoupling
BallJoint Coupling.
Definition: JointConstraint.h:188
void addBallJointCoupling(int elementA, int elementB, vec3 vectorA, vec3 vectorB, double Beta, double Alpha, double Gamma)
std::vector< ExternalRigidCoupling, Eigen::aligned_allocator< ExternalRigidCoupling > > m_ExternalRigidCoupling
External Ball Joint Coupling.
Definition: JointConstraint.h:191
int addExternalBallJointCoupling(int element, vec3 vector, double Beta, double Alpha, double Gamma, const double *Position, const double *Velocity)
void addRigidCoupling(int elementA, int elementB, vec3 vectorA, vec3 vectorB, double BetaN, double AlphaN, double GammaN, const Quat &nullAngle, const Quat &BetaM, const Quat &AlphaM, const Quat &GammaM)
vec6 getExternalRigidCouplingForce(int rigidCoupling)
std::vector< BallJointCoupling,Eigen::aligned_allocator< BallJointCoupling > > m_BallJointCoupling
BallJoint Coupling.
Definition: JointConstraint.h:187
void updateExternalBallJointCoupling(int ballJointCoupling, const double *Position, const double *Velocity)
int addExternalRigidCoupling(int element, vec3 vectorExternalObject, vec3 vectorInternalObject, double BetaN, double AlphaN, double GammaN, const Quat &nullAngle, const Quat &BetaM, const Quat &AlphaM, const Quat &GammaM, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity)
virtual void ComputeConstraints(const double T, const double *const X)
void addHingeCoupling(int elementA, int elementB, vec3 vectorA, vec3 vectorB, vec3 axisA, vec3 axisB, double Beta, double Alpha, double Gamma, double AlphaFriction, double GammaFriction)
void updateExternalRigidCoupling(int rigidCoupling, const double *Position, const double *Velocity, const double *Orientation, const double *AngularVelocity)
vec3 getExternalBallJointCouplingForce(int ballJointCoupling)
Definition: CollisionManager.h:6
Definition: JointConstraint.h:110
Definition: JointConstraint.h:141
Definition: JointConstraint.h:157
Definition: JointConstraint.h:91
Definition: JointConstraint.h:125