summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h')
-rw-r--r--thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h64
1 files changed, 30 insertions, 34 deletions
diff --git a/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h b/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h
index 14b3ba7fec..1f163ba7d5 100644
--- a/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h
+++ b/thirdparty/bullet/Bullet3OpenCL/RigidBody/b3GpuGenericConstraint.h
@@ -20,37 +20,35 @@ subject to the following restrictions:
struct b3RigidBodyData;
enum B3_CONSTRAINT_FLAGS
{
- B3_CONSTRAINT_FLAG_ENABLED=1,
+ B3_CONSTRAINT_FLAG_ENABLED = 1,
};
enum b3GpuGenericConstraintType
{
- B3_GPU_POINT2POINT_CONSTRAINT_TYPE=3,
- B3_GPU_FIXED_CONSTRAINT_TYPE=4,
-// B3_HINGE_CONSTRAINT_TYPE,
-// B3_CONETWIST_CONSTRAINT_TYPE,
-// B3_D6_CONSTRAINT_TYPE,
-// B3_SLIDER_CONSTRAINT_TYPE,
-// B3_CONTACT_CONSTRAINT_TYPE,
-// B3_D6_SPRING_CONSTRAINT_TYPE,
-// B3_GEAR_CONSTRAINT_TYPE,
-
+ B3_GPU_POINT2POINT_CONSTRAINT_TYPE = 3,
+ B3_GPU_FIXED_CONSTRAINT_TYPE = 4,
+ // B3_HINGE_CONSTRAINT_TYPE,
+ // B3_CONETWIST_CONSTRAINT_TYPE,
+ // B3_D6_CONSTRAINT_TYPE,
+ // B3_SLIDER_CONSTRAINT_TYPE,
+ // B3_CONTACT_CONSTRAINT_TYPE,
+ // B3_D6_SPRING_CONSTRAINT_TYPE,
+ // B3_GEAR_CONSTRAINT_TYPE,
+
B3_GPU_MAX_CONSTRAINT_TYPE
};
-
-
-struct b3GpuConstraintInfo2
+struct b3GpuConstraintInfo2
{
// integrator parameters: frames per second (1/stepsize), default error
// reduction parameter (0..1).
- b3Scalar fps,erp;
+ b3Scalar fps, erp;
// for the first and second body, pointers to two (linear and angular)
// n*3 jacobian sub matrices, stored by rows. these matrices will have
// been initialized to 0 on entry. if the second body is zero then the
// J2xx pointers may be 0.
- b3Scalar *m_J1linearAxis,*m_J1angularAxis,*m_J2linearAxis,*m_J2angularAxis;
+ b3Scalar *m_J1linearAxis, *m_J1angularAxis, *m_J2linearAxis, *m_J2angularAxis;
// elements to jump from one row to the next in J's
int rowskip;
@@ -58,44 +56,44 @@ struct b3GpuConstraintInfo2
// right hand sides of the equation J*v = c + cfm * lambda. cfm is the
// "constraint force mixing" vector. c is set to zero on entry, cfm is
// set to a constant value (typically very small or zero) value on entry.
- b3Scalar *m_constraintError,*cfm;
+ b3Scalar *m_constraintError, *cfm;
// lo and hi limits for variables (set to -/+ infinity on entry).
- b3Scalar *m_lowerLimit,*m_upperLimit;
+ b3Scalar *m_lowerLimit, *m_upperLimit;
// findex vector for variables. see the LCP solver interface for a
// description of what this does. this is set to -1 on entry.
// note that the returned indexes are relative to the first index of
// the constraint.
- int *findex;
+ int* findex;
// number of solver iterations
int m_numIterations;
//damping of the velocity
- b3Scalar m_damping;
+ b3Scalar m_damping;
};
-
-B3_ATTRIBUTE_ALIGNED16(struct) b3GpuGenericConstraint
+B3_ATTRIBUTE_ALIGNED16(struct)
+b3GpuGenericConstraint
{
- int m_constraintType;
- int m_rbA;
- int m_rbB;
- float m_breakingImpulseThreshold;
+ int m_constraintType;
+ int m_rbA;
+ int m_rbB;
+ float m_breakingImpulseThreshold;
b3Vector3 m_pivotInA;
b3Vector3 m_pivotInB;
b3Quaternion m_relTargetAB;
- int m_flags;
+ int m_flags;
int m_uid;
int m_padding[2];
- int getRigidBodyA() const
+ int getRigidBodyA() const
{
return m_rbA;
}
- int getRigidBodyB() const
+ int getRigidBodyB() const
{
return m_rbB;
}
@@ -121,12 +119,10 @@ B3_ATTRIBUTE_ALIGNED16(struct) b3GpuGenericConstraint
}
///internal method used by the constraint solver, don't use them directly
- void getInfo1 (unsigned int* info,const b3RigidBodyData* bodies);
+ void getInfo1(unsigned int* info, const b3RigidBodyData* bodies);
///internal method used by the constraint solver, don't use them directly
- void getInfo2 (b3GpuConstraintInfo2* info, const b3RigidBodyData* bodies);
-
-
+ void getInfo2(b3GpuConstraintInfo2 * info, const b3RigidBodyData* bodies);
};
-#endif //B3_GPU_GENERIC_CONSTRAINT_H \ No newline at end of file
+#endif //B3_GPU_GENERIC_CONSTRAINT_H \ No newline at end of file