35 double dampingCoefficient,
40 m_dampingCoefficient(dampingCoefficient)
43 assert(anchors.size() >= 2);
45 assert(dampingCoefficient >= 0.0);
47 std::size_t n = anchors.size();
49 btVector3 pos1 = anchors[0]->getWorldPosition();
50 btVector3 pos2 = anchors[n - 1]->getWorldPosition();
56 throw std::invalid_argument(
"Pretension causes string to shorten past rest length!");
75 assert(newRestLength > 0.0);
virtual void setRestLength(const double newRestLength)
Definitions of class tgSpringCable.
virtual const double getRestLength() const
tgSpringCable(const std::vector< tgSpringCableAnchor * > &anchors, double coefK, double dampingCoefficient, double pretension=0.0)
Definitions of class tgSpringCableAnchor.