gzBtUniversalConstraint Class Reference

Functions that implement a universal joint/constraint using bullet. More...

#include <gzBtUniversalConstraint.hh>

Inherits btGeneric6DofConstraint.

Public Member Functions

 gzBtUniversalConstraint (btRigidBody &_rbA, btRigidBody &_rbB, const btVector3 &_anchor, const btVector3 &_axis1, const btVector3 &_axis2)
 Constructor. More...
 
 gzBtUniversalConstraint (btRigidBody &_rbA, const btVector3 &_anchor, const btVector3 &_axis1, const btVector3 &_axis2)
 Constructor. More...
 
 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
const btVector3 & getAnchor ()
 Get the anchor point in link A reference frame. More...
 
const btVector3 & getAnchor2 ()
 Get the anchor point in link B reference frame. More...
 
btScalar getAngle1 ()
 Get the value of angle 1 in radians. More...
 
btScalar getAngle2 ()
 Get the value of angle 2 in radians. More...
 
const btVector3 & getAxis1 ()
 Get the first axis of rotation. More...
 
const btVector3 & getAxis2 ()
 Get the second axis of rotation. More...
 
void getLowerLimit (btScalar &_ang1min, btScalar &_ang2min)
 Get lower limits. More...
 
btScalar getMaxMotorImpulse1 () const
 Get the maximum allowed motor impluse for the first axis of rotation. More...
 
btScalar getMaxMotorImpulse2 () const
 Get the maximum allowed motor impluse for the second axis of rotation. More...
 
void getUpperLimit (btScalar &_ang1max, btScalar &_ang2max)
 Get upper limits. More...
 
void setAxis (const btVector3 &_axis1, const btVector3 &_axis2)
 Set the axis of rotation. More...
 
void setLowerLimit (btScalar _ang1min, btScalar _ang2min)
 Set lower limits. More...
 
void setMaxMotorImpulse1 (btScalar _i)
 Set the maximum allowed motor impluse for the first axis of rotation. More...
 
void setMaxMotorImpulse2 (btScalar _i)
 Set the maximum allowed motor impluse for the second axis of rotation. More...
 
void setUpperLimit (btScalar _ang1max, btScalar _ang2max)
 Set upper limits. More...
 

Protected Attributes

btVector3 m_anchor
 Anchor point in world coordinate frame. More...
 
btVector3 m_axis1
 First axis of rotation. More...
 
btVector3 m_axis2
 Second axis of rotation. More...
 

Detailed Description

Functions that implement a universal joint/constraint using bullet.

Constructor & Destructor Documentation

gzBtUniversalConstraint ( btRigidBody &  _rbA,
btRigidBody &  _rbB,
const btVector3 &  _anchor,
const btVector3 &  _axis1,
const btVector3 &  _axis2 
)

Constructor.

Parameters
[in]_rbARigid body A, also known as the parent link.
[in]_rbBRigid body B, also known as the child link.
[in]_anchorThe point in world space that constrains the two rigid bodies.
[in]_axis1First axis of rotation in world frame.
[in]_axis2Second axis of rotation in world frame.
gzBtUniversalConstraint ( btRigidBody &  _rbA,
const btVector3 &  _anchor,
const btVector3 &  _axis1,
const btVector3 &  _axis2 
)

Constructor.

Parameters
[in]_rbBRigid body B, also known as the child link.
[in]_anchorThe point in world space that constrains the child link to the world.
[in]_axis1First axis of rotation in world frame.
[in]_axis2Second axis of rotation in world frame.

Member Function Documentation

BT_DECLARE_ALIGNED_ALLOCATOR ( )
const btVector3& getAnchor ( )

Get the anchor point in link A reference frame.

Returns
Anchor point in link A's reference frame.
const btVector3& getAnchor2 ( )

Get the anchor point in link B reference frame.

Returns
Anchor point in link B's reference frame.
btScalar getAngle1 ( )

Get the value of angle 1 in radians.

Returns
Angle value of the first axis in radians.
btScalar getAngle2 ( )

Get the value of angle 2 in radians.

Returns
Angle value of the second axis in radians.
const btVector3& getAxis1 ( )

Get the first axis of rotation.

Returns
The first axis of rotation as a vector
const btVector3& getAxis2 ( )

Get the second axis of rotation.

Returns
The second axis of rotation as a vector
void getLowerLimit ( btScalar &  _ang1min,
btScalar &  _ang2min 
)

Get lower limits.

Parameters
[out]_ang1minMinimum value for angle 1
[out]_ang2minMinimum value for angle 2
btScalar getMaxMotorImpulse1 ( ) const

Get the maximum allowed motor impluse for the first axis of rotation.

Returns
Maximum motor impulse for axis 1.
btScalar getMaxMotorImpulse2 ( ) const

Get the maximum allowed motor impluse for the second axis of rotation.

Returns
Maximum motor impulse for axis 2.
void getUpperLimit ( btScalar &  _ang1max,
btScalar &  _ang2max 
)

Get upper limits.

Parameters
[out]_ang1maxMaximum value for angle 1
[out]_ang2maxMaximum value for angle 2
void setAxis ( const btVector3 &  _axis1,
const btVector3 &  _axis2 
)

Set the axis of rotation.

Parameters
[in]_axis1First axis of rotation.
[in]_axis2Second axis of rotation.
void setLowerLimit ( btScalar  _ang1min,
btScalar  _ang2min 
)

Set lower limits.

Parameters
[in]_ang1minMinimum value for angle 1
[in]_ang2minMinimum value for angle 2
void setMaxMotorImpulse1 ( btScalar  _i)

Set the maximum allowed motor impluse for the first axis of rotation.

Parameters
[in]_iMaximum motor impulse for axis 1.
void setMaxMotorImpulse2 ( btScalar  _i)

Set the maximum allowed motor impluse for the second axis of rotation.

Parameters
[in]_iMaximum motor impulse for axis 2.
void setUpperLimit ( btScalar  _ang1max,
btScalar  _ang2max 
)

Set upper limits.

Parameters
[in]_ang1maxMaximum value for angle 1
[in]_ang2maxMaximum value for angle 2

Member Data Documentation

btVector3 m_anchor
protected

Anchor point in world coordinate frame.

btVector3 m_axis1
protected

First axis of rotation.

btVector3 m_axis2
protected

Second axis of rotation.


The documentation for this class was generated from the following file: