29 #include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
43 throw std::invalid_argument(
"Failed to provide arguments to tgPrismatic::Config");
52 m_maxLength(maxLength),
53 m_minLength(minLength),
54 m_maxMotorForce(maxMotorForce),
55 m_maxVelocity(maxVelocity)
59 tgPrismatic::tgPrismatic(
60 btSliderConstraint* constraint,
70 tgPrismatic::tgPrismatic(
71 btSliderConstraint* constraint,
72 std::string space_separated_tags,
81 tgPrismatic::~tgPrismatic()
86 void tgPrismatic::init()
88 m_slider->setLowerLinLimit(m_config.m_minLength);
89 m_slider->setUpperLinLimit(m_config.m_maxLength);
90 m_slider->setPoweredLinMotor(
true);
91 m_slider->setMaxLinMotorForce(m_config.m_maxMotorForce);
96 assert(m_slider != NULL);
118 throw std::invalid_argument(
"dt is not positive.");
128 void tgPrismatic::moveMotors(
double dt)
130 m_slider->setTargetLinMotorVelocity(m_config.m_maxVelocity/dt);
virtual void setup(tgWorld &world)
virtual void step(double dt)
virtual void setup(tgWorld &world)
Contains the definition of class tgPrismatic. A prismatic actuator.
Contains the definition of class tgWorldBulletPhysicsImpl.
virtual void step(double dt)
void addConstraint(btTypedConstraint *pConstaint)
tgWorldImpl & implementation() const
Contains the definition of class tgBulletUtil.
void notifyStep(double dt)