33 #include "LinearMath/btQuickprof.h"
51 isFreeEndAttached(iFEA),
55 moveCablePointAToEdge(moveCPA),
56 moveCablePointBToEdge(moveCPB)
61 throw std::invalid_argument(
"stiffness is negative.");
65 throw std::invalid_argument(
"damping is negative.");
69 throw std::invalid_argument(
"Rest length is negative. Compression springs have a positive rest length.");
75 void tgCompressionSpringActuator::constructorAux()
79 throw std::invalid_argument(
"Pointer to tgBulletCompressionSpring is NULL.");
83 throw std::invalid_argument(
"Stiffness is less than zero.");
87 throw std::invalid_argument(
"Damping coefficient is negative.");
91 throw std::invalid_argument(
"Rest length is less than zero..");
120 std::cout <<
"Destroying tgCompressionSpringActuator" << std::endl;
153 #ifndef BT_NO_PROFILE
154 BT_PROFILE(
"tgCompressionSpringActuator::step");
155 #endif //BT_NO_PROFILE
158 throw std::invalid_argument(
"dt is not positive.");
172 #ifndef BT_NO_PROFILE
173 BT_PROFILE(
"tgCompressionSpringActuator::onVisit");
174 #endif //BT_NO_PROFILE
199 bool tgCompressionSpringActuator::invariant()
const
virtual void setup(tgWorld &world)
Contains the definition of class tgCompressionSpringActuator. This class assumes a linear spring...
Config(bool iFEA=false, double s=1000.0, double d=10.0, double rL=0.0, bool moveCPA=true, bool moveCPB=true)
virtual void setup(tgWorld &world)
tgBulletCompressionSpring * m_compressionSpring
virtual void step(double dt)
virtual const double getSpringForce() const
virtual ~tgCompressionSpringActuator()
virtual void step(double dt)
tgCompressionSpringActuator(tgBulletCompressionSpring *compressionSpring, const tgTags &tags, tgCompressionSpringActuator::Config &config)
virtual double getActuatorSpringForce()
virtual void render(const tgRod &rod) const
virtual void step(double dt)
Contains the definition of interface class tgModelVisitor.
Contains the definition of class tgWorld $Id$.
Definitions of class tgBulletCompressionSpring.
virtual void onVisit(const tgModelVisitor &r) const
virtual void setControlInput(double input)
void notifyStep(double dt)