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() [1/2]

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() [2/2]

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()

BT_DECLARE_ALIGNED_ALLOCATOR ( )

§ getAnchor()

const btVector3& getAnchor ( )

Get the anchor point in link A reference frame.

Returns
Anchor point in link A's reference frame.

§ getAnchor2()

const btVector3& getAnchor2 ( )

Get the anchor point in link B reference frame.

Returns
Anchor point in link B's reference frame.

§ getAngle1()

btScalar getAngle1 ( )

Get the value of angle 1 in radians.

Returns
Angle value of the first axis in radians.

§ getAngle2()

btScalar getAngle2 ( )

Get the value of angle 2 in radians.

Returns
Angle value of the second axis in radians.

§ getAxis1()

const btVector3& getAxis1 ( )

Get the first axis of rotation.

Returns
The first axis of rotation as a vector

§ getAxis2()

const btVector3& getAxis2 ( )

Get the second axis of rotation.

Returns
The second axis of rotation as a vector

§ getLowerLimit()

void getLowerLimit ( btScalar &  _ang1min,
btScalar &  _ang2min 
)

Get lower limits.

Parameters
[out]_ang1minMinimum value for angle 1
[out]_ang2minMinimum value for angle 2

§ getMaxMotorImpulse1()

btScalar getMaxMotorImpulse1 ( ) const

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

Returns
Maximum motor impulse for axis 1.

§ getMaxMotorImpulse2()

btScalar getMaxMotorImpulse2 ( ) const

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

Returns
Maximum motor impulse for axis 2.

§ getUpperLimit()

void getUpperLimit ( btScalar &  _ang1max,
btScalar &  _ang2max 
)

Get upper limits.

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

§ setAxis()

void setAxis ( const btVector3 &  _axis1,
const btVector3 &  _axis2 
)

Set the axis of rotation.

Parameters
[in]_axis1First axis of rotation.
[in]_axis2Second axis of rotation.

§ setLowerLimit()

void setLowerLimit ( btScalar  _ang1min,
btScalar  _ang2min 
)

Set lower limits.

Parameters
[in]_ang1minMinimum value for angle 1
[in]_ang2minMinimum value for angle 2

§ setMaxMotorImpulse1()

void setMaxMotorImpulse1 ( btScalar  _i)

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

Parameters
[in]_iMaximum motor impulse for axis 1.

§ setMaxMotorImpulse2()

void setMaxMotorImpulse2 ( btScalar  _i)

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

Parameters
[in]_iMaximum motor impulse for axis 2.

§ setUpperLimit()

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

§ m_anchor

btVector3 m_anchor
protected

Anchor point in world coordinate frame.

§ m_axis1

btVector3 m_axis1
protected

First axis of rotation.

§ m_axis2

btVector3 m_axis2
protected

Second axis of rotation.


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