22#ifndef _BULLETSCREWJOINT_HH_
23#define _BULLETSCREWJOINT_HH_
35 class btScrewConstraint;
54 public:
virtual void Load(sdf::ElementPtr _sdf);
57 public:
virtual ignition::math::Vector3d
Anchor(
58 const unsigned int _index)
const;
61 public:
virtual void SetAnchor(
const unsigned int _index,
62 const ignition::math::Vector3d &_anchor);
65 public:
virtual void Init();
70 public:
void SetAxis(
const unsigned int _index,
71 const ignition::math::Vector3d &_axis);
96 public:
virtual double GetVelocity(
unsigned int _index)
const;
101 public:
virtual void SetVelocity(
unsigned int _index,
double _vel);
107 const unsigned int _index)
const;
110 public:
virtual double GetParam(
const std::string &_key,
111 unsigned int _index);
114 protected:
virtual double PositionImpl(
const unsigned int _index)
const;
117 protected:
virtual void SetForceImpl(
unsigned int _index,
double _force);
120 private: btScrewConstraint *bulletScrew;
124 private: ignition::math::Vector3d initialWorldAxis;
A screw joint.
Definition BulletScrewJoint.hh:43
virtual void SetUpperLimit(const unsigned int _index, const double _limit)
Set the joint's upper limit.
virtual void Init()
Initialize joint.
virtual double GetThreadPitch(unsigned int _index)
virtual double PositionImpl(const unsigned int _index) const
Helper function to get the position of an axis.
virtual void SetThreadPitch(unsigned int _index, double _threadPitch)
virtual ignition::math::Vector3d Anchor(const unsigned int _index) const
Get the anchor point.
virtual double GetThreadPitch()
Get screw joint thread pitch.
void SetAxis(const unsigned int _index, const ignition::math::Vector3d &_axis)
Set the axis of motion.
virtual void SetAnchor(const unsigned int _index, const ignition::math::Vector3d &_anchor)
Set the anchor point.
virtual void SetLowerLimit(const unsigned int _index, const double _limit)
Set the joint's lower limit.
virtual double GetParam(const std::string &_key, unsigned int _index)
Get a non-generic parameter for the joint.
virtual void Load(sdf::ElementPtr _sdf)
Load the BulletScrewJoint.
virtual void SetForceImpl(unsigned int _index, double _force)
Set the force applied to this physics::Joint.
virtual double GetVelocity(unsigned int _index) const
Get the rate of change.
virtual void SetThreadPitch(double _threadPitch)
Set screw joint thread pitch.
BulletScrewJoint(btDynamicsWorld *_world, BasePtr _parent)
Constructor.
virtual void SetVelocity(unsigned int _index, double _vel)
Set the velocity of an axis(index).
virtual ignition::math::Vector3d GlobalAxis(const unsigned int _index) const
Get the axis of rotation.
virtual ~BulletScrewJoint()
Destructor.
A screw joint, which has both prismatic and rotational DOFs.
Definition ScrewJoint.hh:36
boost::shared_ptr< Base > BasePtr
Definition PhysicsTypes.hh:77
Forward declarations for the common classes.
Definition Animation.hh:27