Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
btGearConstraint Class Reference

#include <btGearConstraint.h>

Inheritance diagram for btGearConstraint:

Public Member Functions

 btGearConstraint (btRigidBody &rbA, btRigidBody &rbB, const btVector3 &axisInA, const btVector3 &axisInB, btScalar ratio=1.f)
 Implemented by Erwin Coumans. The idea for the constraint comes from Dimitris Papavasiliou. More...
 
virtual ~btGearConstraint ()
 
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...
 
void setAxisA (btVector3 &axisA)
 
void setAxisB (btVector3 &axisB)
 
void setRatio (btScalar ratio)
 
const btVector3getAxisA () const
 
const btVector3getAxisB () const
 
btScalar getRatio () const
 
virtual void setParam (int num, btScalar value, int axis=-1)
 
virtual btScalar getParam (int num, int axis=-1) const
 return the local value of parameter 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...
 

Protected Attributes

btVector3 m_axisInA
 
btVector3 m_axisInB
 
bool m_useFrameA
 
btScalar m_ratio
 

Detailed Description

The btGeatConstraint will couple the angular velocity for two bodies around given local axis and ratio. See Bullet/Demos/ConstraintDemo for an example use.

Definition at line 31 of file btGearConstraint.h.

Constructor & Destructor Documentation

◆ btGearConstraint()

btGearConstraint::btGearConstraint ( btRigidBody rbA,
btRigidBody rbB,
const btVector3 axisInA,
const btVector3 axisInB,
btScalar  ratio = 1.f 
)

Implemented by Erwin Coumans. The idea for the constraint comes from Dimitris Papavasiliou.

Definition at line 20 of file btGearConstraint.cpp.

◆ ~btGearConstraint()

btGearConstraint::~btGearConstraint ( )
virtual

Definition at line 28 of file btGearConstraint.cpp.

Member Function Documentation

◆ calculateSerializeBufferSize()

SIMD_FORCE_INLINE int btGearConstraint::calculateSerializeBufferSize ( ) const
virtual

Definition at line 119 of file btGearConstraint.h.

References btGearConstraintData.

◆ getAxisA()

const btVector3& btGearConstraint::getAxisA ( ) const
inline

Definition at line 61 of file btGearConstraint.h.

References m_axisInA.

◆ getAxisB()

const btVector3& btGearConstraint::getAxisB ( ) const
inline

Definition at line 65 of file btGearConstraint.h.

References m_axisInB.

◆ getInfo1()

void btGearConstraint::getInfo1 ( btConstraintInfo1 info)
virtual

internal method used by the constraint solver, don't use them directly

Definition at line 32 of file btGearConstraint.cpp.

References btConstraintInfo1::m_numConstraintRows, and btConstraintInfo1::nub.

◆ getInfo2()

void btGearConstraint::getInfo2 ( btConstraintInfo2 info)
virtual

internal method used by the constraint solver, don't use them directly

Definition at line 38 of file btGearConstraint.cpp.

References btVector3, m_axisInA, m_axisInB, btConstraintInfo2::m_J1angularAxis, btConstraintInfo2::m_J2angularAxis, m_ratio, m_rbA, and m_rbB.

◆ getParam()

virtual btScalar btGearConstraint::getParam ( int  num,
int  axis = -1 
) const
inlinevirtual

return the local value of parameter

Definition at line 83 of file btGearConstraint.h.

References btAssert, and void.

◆ getRatio()

btScalar btGearConstraint::getRatio ( ) const
inline

Definition at line 69 of file btGearConstraint.h.

References m_ratio.

◆ serialize()

SIMD_FORCE_INLINE const char * btGearConstraint::serialize ( void dataBuffer,
btSerializer serializer 
) const
virtual

fills the dataBuffer and returns the struct name (and 0 on failure)

Definition at line 125 of file btGearConstraint.h.

References btGearConstraintData, btGearConstraintDataName, m_axisInA, m_axisInB, m_ratio, and serialize().

◆ setAxisA()

void btGearConstraint::setAxisA ( btVector3 axisA)
inline

Definition at line 49 of file btGearConstraint.h.

References m_axisInA.

◆ setAxisB()

void btGearConstraint::setAxisB ( btVector3 axisB)
inline

Definition at line 53 of file btGearConstraint.h.

References m_axisInB.

◆ setParam()

virtual void btGearConstraint::setParam ( int  num,
btScalar  value,
int  axis = -1 
)
inlinevirtual

Definition at line 74 of file btGearConstraint.h.

References btAssert, and void.

◆ setRatio()

void btGearConstraint::setRatio ( btScalar  ratio)
inline

Definition at line 57 of file btGearConstraint.h.

References m_ratio.

Member Data Documentation

◆ m_axisInA

btVector3 btGearConstraint::m_axisInA
protected

Definition at line 34 of file btGearConstraint.h.

Referenced by getAxisA(), getInfo2(), serialize(), and setAxisA().

◆ m_axisInB

btVector3 btGearConstraint::m_axisInB
protected

Definition at line 35 of file btGearConstraint.h.

Referenced by getAxisB(), getInfo2(), serialize(), and setAxisB().

◆ m_ratio

btScalar btGearConstraint::m_ratio
protected

Definition at line 37 of file btGearConstraint.h.

Referenced by getInfo2(), getRatio(), serialize(), and setRatio().

◆ m_useFrameA

bool btGearConstraint::m_useFrameA
protected

Definition at line 36 of file btGearConstraint.h.


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