33 enum b2StretchingModel
35 b2_pbdStretchingModel,
36 b2_xpbdStretchingModel
41 b2_springAngleBendingModel = 0,
42 b2_pbdAngleBendingModel,
43 b2_xpbdAngleBendingModel,
44 b2_pbdDistanceBendingModel,
45 b2_pbdHeightBendingModel
53 stretchingModel = b2_pbdStretchingModel;
54 bendingModel = b2_pbdAngleBendingModel;
56 stretchStiffness = 1.0f;
61 fixedEffectiveMass =
false;
65 b2StretchingModel stretchingModel;
66 b2BendingModel bendingModel;
68 float stretchStiffness;
75 bool fixedEffectiveMass;
113 void Step(
float timeStep, int32 iterations,
const b2Vec2& position);
116 void Reset(
const b2Vec2& position);
119 void Draw(
b2Draw* draw)
const;
123 void SolveStretch_PBD();
124 void SolveStretch_XPBD(
float dt);
125 void SolveBend_PBD_Angle();
126 void SolveBend_XPBD_Angle(
float dt);
127 void SolveBend_PBD_Distance();
128 void SolveBend_PBD_Height();
129 void ApplyBendForces(
float dt);
134 int32 m_stretchCount;
137 b2RopeStretch* m_stretchConstraints;
138 b2RopeBend* m_bendConstraints;