32 #include "LinearMath/btScalar.h"
33 #include "LinearMath/btVector3.h"
34 #include "LinearMath/btQuaternion.h"
44 Config(
const std::size_t res,
45 const double r,
const double d,
46 const double ym,
const double shm,
47 const double stm,
const double csc,
48 const double gt,
const double gr);
50 const std::size_t resolution;
53 const double YoungMod;
54 const double ShearMod;
55 const double StretchMod;
56 const double ConsSpringConst;
79 void step (btScalar dt);
82 void computeConstants();
84 void stepPrerequisites();
86 void computeInternalForces();
88 void unconstrainedMotion(
double dt);
93 struct CordePositionElement
99 CordePositionElement(btVector3 p1,
double m);
110 struct CordeQuaternionElement
115 CordeQuaternionElement(btQuaternion q1);
117 void transposeTorques();
135 std::vector<CordePositionElement*> m_massPoints;
136 std::vector<CordeQuaternionElement*> m_centerlines;
140 std::vector<double> linkLengths;
144 std::vector<double> quaternionShapes;
152 std::vector<double> computedStiffness;
158 btVector3 computedInertia;
159 btVector3 inverseInertia;
167 #endif // CORDE_MODEL
CordeModel(btVector3 pos1, btVector3 pos2, btQuaternion quat1, btQuaternion quat2, CordeModel::Config &Config)