Bullet Collision Detection & Physics Library
Public Member Functions | Protected Attributes | List of all members
btHinge2Constraint Class Reference

#include <btHinge2Constraint.h>

Inheritance diagram for btHinge2Constraint:
Inheritance graph
Collaboration diagram for btHinge2Constraint:
Collaboration graph

Public Member Functions

 btHinge2Constraint (btRigidBody &rbA, btRigidBody &rbB, btVector3 &anchor, btVector3 &axis1, btVector3 &axis2)
const btVector3getAnchor ()
const btVector3getAnchor2 ()
const btVector3getAxis1 ()
const btVector3getAxis2 ()
btScalar getAngle1 ()
btScalar getAngle2 ()
void setUpperLimit (btScalar ang1max)
void setLowerLimit (btScalar ang1min)
- Public Member Functions inherited from btGeneric6DofSpring2Constraint
 btGeneric6DofSpring2Constraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, RotateOrder rotOrder=RO_XYZ)
 2009 March: btGeneric6DofConstraint refactored by Roman Ponomarev Added support for generic constraint solver through getInfo1/getInfo2 methods More...
 btGeneric6DofSpring2Constraint (btRigidBody &rbB, const btTransform &frameInB, RotateOrder rotOrder=RO_XYZ)
virtual void buildJacobian ()
 internal method used by the constraint solver, don't use them directly More...
virtual void getInfo1 (btConstraintInfo1 *info)
 internal method used by the constraint solver, don't use them directly More...
virtual void getInfo2 (btConstraintInfo2 *info)
 internal method used by the constraint solver, don't use them directly More...
virtual int calculateSerializeBufferSize () const
virtual const char * serialize (void *dataBuffer, btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure) More...
btRotationalLimitMotor2getRotationalLimitMotor (int index)
btTranslationalLimitMotor2getTranslationalLimitMotor ()
void calculateTransforms (const btTransform &transA, const btTransform &transB)
void calculateTransforms ()
const btTransformgetCalculatedTransformA () const
const btTransformgetCalculatedTransformB () const
const btTransformgetFrameOffsetA () const
const btTransformgetFrameOffsetB () const
btTransformgetFrameOffsetA ()
btTransformgetFrameOffsetB ()
btVector3 getAxis (int axis_index) const
btScalar getAngle (int axis_index) const
btScalar getRelativePivotPosition (int axis_index) const
void setFrames (const btTransform &frameA, const btTransform &frameB)
void setLinearLowerLimit (const btVector3 &linearLower)
void getLinearLowerLimit (btVector3 &linearLower)
void setLinearUpperLimit (const btVector3 &linearUpper)
void getLinearUpperLimit (btVector3 &linearUpper)
void setAngularLowerLimit (const btVector3 &angularLower)
void setAngularLowerLimitReversed (const btVector3 &angularLower)
void getAngularLowerLimit (btVector3 &angularLower)
void getAngularLowerLimitReversed (btVector3 &angularLower)
void setAngularUpperLimit (const btVector3 &angularUpper)
void setAngularUpperLimitReversed (const btVector3 &angularUpper)
void getAngularUpperLimit (btVector3 &angularUpper)
void getAngularUpperLimitReversed (btVector3 &angularUpper)
void setLimit (int axis, btScalar lo, btScalar hi)
void setLimitReversed (int axis, btScalar lo, btScalar hi)
bool isLimited (int limitIndex)
void setRotationOrder (RotateOrder order)
RotateOrder getRotationOrder ()
void setAxis (const btVector3 &axis1, const btVector3 &axis2)
void setBounce (int index, btScalar bounce)
void enableMotor (int index, bool onOff)
void setServo (int index, bool onOff)
void setTargetVelocity (int index, btScalar velocity)
void setServoTarget (int index, btScalar target)
void setMaxMotorForce (int index, btScalar force)
void enableSpring (int index, bool onOff)
void setStiffness (int index, btScalar stiffness, bool limitIfNeeded=true)
void setDamping (int index, btScalar damping, bool limitIfNeeded=true)
void setEquilibriumPoint ()
void setEquilibriumPoint (int index)
void setEquilibriumPoint (int index, btScalar val)
virtual void setParam (int num, btScalar value, int axis=-1)
 override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). More...
virtual btScalar getParam (int num, int axis=-1) const
 return the local value of parameter More...
- Public Member Functions inherited from btTypedConstraint
virtual ~btTypedConstraint ()
 btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA)
 btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA, btRigidBody &rbB)
int getOverrideNumSolverIterations () const
void setOverrideNumSolverIterations (int overideNumIterations)
 override the number of constraint solver iterations used to solve this constraint -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations More...
virtual void setupSolverConstraint (btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
 internal method used by the constraint solver, don't use them directly More...
void internalSetAppliedImpulse (btScalar appliedImpulse)
 internal method used by the constraint solver, don't use them directly More...
btScalar internalGetAppliedImpulse ()
 internal method used by the constraint solver, don't use them directly More...
btScalar getBreakingImpulseThreshold () const
void setBreakingImpulseThreshold (btScalar threshold)
bool isEnabled () const
void setEnabled (bool enabled)
virtual void solveConstraintObsolete (btSolverBody &, btSolverBody &, btScalar)
 internal method used by the constraint solver, don't use them directly More...
const btRigidBodygetRigidBodyA () const
const btRigidBodygetRigidBodyB () const
btRigidBodygetRigidBodyA ()
btRigidBodygetRigidBodyB ()
int getUserConstraintType () const
void setUserConstraintType (int userConstraintType)
void setUserConstraintId (int uid)
int getUserConstraintId () const
void setUserConstraintPtr (void *ptr)
void * getUserConstraintPtr ()
void setJointFeedback (btJointFeedback *jointFeedback)
const btJointFeedbackgetJointFeedback () const
btJointFeedbackgetJointFeedback ()
int getUid () const
bool needsFeedback () const
void enableFeedback (bool needsFeedback)
 enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information More...
btScalar getAppliedImpulse () const
 getAppliedImpulse is an estimated total applied impulse. More...
btTypedConstraintType getConstraintType () const
void setDbgDrawSize (btScalar dbgDrawSize)
btScalar getDbgDrawSize ()
- Public Member Functions inherited from btTypedObject
 btTypedObject (int objectType)
int getObjectType () const

Protected Attributes

btVector3 m_anchor
btVector3 m_axis1
btVector3 m_axis2
- Protected Attributes inherited from btGeneric6DofSpring2Constraint
btTransform m_frameInA
btTransform m_frameInB
btJacobianEntry m_jacLinear [3]
btJacobianEntry m_jacAng [3]
btTranslationalLimitMotor2 m_linearLimits
btRotationalLimitMotor2 m_angularLimits [3]
RotateOrder m_rotateOrder
btTransform m_calculatedTransformA
btTransform m_calculatedTransformB
btVector3 m_calculatedAxisAngleDiff
btVector3 m_calculatedAxis [3]
btVector3 m_calculatedLinearDiff
btScalar m_factA
btScalar m_factB
bool m_hasStaticBody
int m_flags
- Protected Attributes inherited from btTypedConstraint
btScalar m_appliedImpulse
btScalar m_dbgDrawSize

Additional Inherited Members

- Static Public Member Functions inherited from btTypedConstraint
static btRigidBodygetFixedBody ()
- Public Attributes inherited from btTypedObject
int m_objectType
- Protected Member Functions inherited from btGeneric6DofSpring2Constraint
btGeneric6DofSpring2Constraintoperator= (btGeneric6DofSpring2Constraint &)
int setAngularLimits (btConstraintInfo2 *info, int row_offset, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB)
int setLinearLimits (btConstraintInfo2 *info, int row, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB)
void calculateLinearInfo ()
void calculateAngleInfo ()
void testAngularLimitMotor (int axis_index)
void calculateJacobi (btRotationalLimitMotor2 *limot, const btTransform &transA, const btTransform &transB, btConstraintInfo2 *info, int srow, btVector3 &ax1, int rotational, int rotAllowed)
int get_limit_motor_info2 (btRotationalLimitMotor2 *limot, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB, btConstraintInfo2 *info, int row, btVector3 &ax1, int rotational, int rotAllowed=false)
- Protected Member Functions inherited from btTypedConstraint
btScalar getMotorFactor (btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
 internal method used by the constraint solver, don't use them directly More...
- Static Protected Member Functions inherited from btGeneric6DofSpring2Constraint
static btScalar btGetMatrixElem (const btMatrix3x3 &mat, int index)
static bool matrixToEulerXYZ (const btMatrix3x3 &mat, btVector3 &xyz)
static bool matrixToEulerXZY (const btMatrix3x3 &mat, btVector3 &xyz)
static bool matrixToEulerYXZ (const btMatrix3x3 &mat, btVector3 &xyz)
static bool matrixToEulerYZX (const btMatrix3x3 &mat, btVector3 &xyz)
static bool matrixToEulerZXY (const btMatrix3x3 &mat, btVector3 &xyz)
static bool matrixToEulerZYX (const btMatrix3x3 &mat, btVector3 &xyz)

Detailed Description

Definition at line 32 of file btHinge2Constraint.h.

Constructor & Destructor Documentation

btHinge2Constraint::btHinge2Constraint ( btRigidBody rbA,
btRigidBody rbB,
btVector3 anchor,
btVector3 axis1,
btVector3 axis2 

Definition at line 27 of file btHinge2Constraint.cpp.

Member Function Documentation

const btVector3& btHinge2Constraint::getAnchor ( )

Definition at line 46 of file btHinge2Constraint.h.

const btVector3& btHinge2Constraint::getAnchor2 ( )

Definition at line 47 of file btHinge2Constraint.h.

btScalar btHinge2Constraint::getAngle1 ( )

Definition at line 50 of file btHinge2Constraint.h.

btScalar btHinge2Constraint::getAngle2 ( )

Definition at line 51 of file btHinge2Constraint.h.

const btVector3& btHinge2Constraint::getAxis1 ( )

Definition at line 48 of file btHinge2Constraint.h.

const btVector3& btHinge2Constraint::getAxis2 ( )

Definition at line 49 of file btHinge2Constraint.h.

void btHinge2Constraint::setLowerLimit ( btScalar  ang1min)

Definition at line 54 of file btHinge2Constraint.h.

void btHinge2Constraint::setUpperLimit ( btScalar  ang1max)

Definition at line 53 of file btHinge2Constraint.h.

Member Data Documentation

btVector3 btHinge2Constraint::m_anchor

Definition at line 35 of file btHinge2Constraint.h.

btVector3 btHinge2Constraint::m_axis1

Definition at line 36 of file btHinge2Constraint.h.

btVector3 btHinge2Constraint::m_axis2

Definition at line 37 of file btHinge2Constraint.h.

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