29#ifndef DY_CONSTRAINT_PREP_H
30#define DY_CONSTRAINT_PREP_H
32#include "DyConstraint.h"
34#include "DySolverConstraintDesc.h"
35#include "foundation/PxArray.h"
36#include "PxConstraint.h"
38#define DY_ARTICULATION_MIN_RESPONSE 1e-5f
39#define DY_ARTICULATION_CFM 2e-4f
41#define DY_ARTICULATION_BAD_RESPONSE 0.02f
46class PxcConstraintBlockStream;
47class PxsConstraintBlockManager;
49struct PxSolverBodyData;
50struct PxSolverConstraintDesc;
54 struct SpatialVectorF;
60 static const PxU32 MAX_CONSTRAINT_ROWS = 20;
66 const void* constantBlock;
67 PxU32 constantBlockByteSize;
70 SolverConstraintPrepState::Enum setupSolverConstraint4
73 const PxReal dt,
const PxReal recipdt, PxU32& totalRows,
76 SolverConstraintPrepState::Enum setupSolverConstraint4
78 const PxReal dt,
const PxReal recipdt, PxU32& totalRows,
91 static PxU32 setupSolverConstraint(
97 template<
class PrepDescT>
98 PX_FORCE_INLINE void setupConstraintFlags(PrepDescT& prepDesc, PxU16 flags)
109 PxVec4* angSqrtInvInertia0,
110 PxVec4* angSqrtInvInertia1,
112 const PxMat33& sqrtInvInertia0F32,
113 const PxMat33& sqrtInvInertia1F32,
114 const PxReal invMass0,
115 const PxReal invMass1,
117 bool disablePreprocessing,
118 bool diagonalizeDrive);
131 for(PxU32 i=0; i<size; i++)
135 c.minImpulse = -PX_MAX_REAL;
136 c.maxImpulse = PX_MAX_REAL;
Definition DyConstraintPrep.h:88
Definition PxSolverDefs.h:227
3x3 matrix class
Definition PxMat33.h:91
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxU32(* PxConstraintSolverPrep)(Px1DConstraint *constraints, PxVec3p &bodyAWorldOffset, PxU32 maxConstraints, PxConstraintInvMassScale &invMassScale, const void *constantBlock, const PxTransform &bodyAToWorld, const PxTransform &bodyBToWorld, bool useExtendedLimits, PxVec3p &cAtW, PxVec3p &cBtW)
Solver constraint generation shader.
Definition PxConstraintDesc.h:223
PX_FORCE_INLINE void * PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
Definition PxMemory.h:53
Definition CmSpatialVector.h:134
Definition DyConstraint.h:53
Definition DyConstraintPrep.h:63
A one-dimensional constraint.
Definition PxConstraintDesc.h:134
@ eIMPROVED_SLERP
perform preprocessing for improved accuracy on D6 Slerp Drive (this flag will be removed in a future ...
Definition PxConstraint.h:65
@ eENABLE_EXTENDED_LIMITS
enables extended limit ranges for angular limits (e.g., limit values > PxPi or < -PxPi)
Definition PxConstraint.h:67
@ eDISABLE_PREPROCESSING
suppress constraint preprocessing, intended for use with rowResponseThreshold. May result in worse so...
Definition PxConstraint.h:66
@ eDISABLE_CONSTRAINT
disables the constraint. SolverPrep functions won't be called for this constraint.
Definition PxConstraint.h:70
@ eDRIVE_LIMITS_ARE_FORCES
limits for drive strength are forces rather than impulses
Definition PxConstraint.h:64
Struct for specifying mass scaling for a pair of rigids.
Definition PxConstraintDesc.h:184
Data structure used for preparing constraints before solving them.
Definition PxSolverDefs.h:178