24 #ifndef BT_MULTIBODY_H
25 #define BT_MULTIBODY_H
63 bool disableParentCollision=
false
74 bool disableParentCollision=
false);
283 sum += delta_vee[i]*multiplier*delta_vee[i]*multiplier;
302 sum += delta_vee[i]*multiplier*delta_vee[i]*multiplier;
void calcAccelerationDeltas(const btScalar *force, btScalar *output, btAlignedObjectArray< btScalar > &scratch_r, btAlignedObjectArray< btVector3 > &scratch_v) const
static T sum(const btAlignedObjectArray< T > &items)
void setCanSleep(bool canSleep)
btAlignedObjectArray< btMultiBodyLinkCollider * > m_colliders
const btMultibodyLink & getLink(int index) const
BT_DECLARE_ALIGNED_ALLOCATOR()
const btVector3 getBaseVel() const
btMultiBodyLinkCollider * getBaseCollider()
void setNumLinks(int numLinks)
btMultiBodyLinkCollider * m_baseCollider
void addBaseTorque(const btVector3 &t)
const btVector3 & getLinkForce(int i) const
btScalar getBaseMass() const
btScalar btSqrt(btScalar y)
btVector3 localDirToWorld(int i, const btVector3 &vec) const
btAlignedObjectArray< btScalar > m_real_buf
void addLinkForce(int i, const btVector3 &f)
void setBaseCollider(btMultiBodyLinkCollider *collider)
btScalar getJointPos(int i) const
btMatrix3x3 cached_inertia_top_right
const btVector3 & getBaseTorque() const
btMatrix3x3 cached_inertia_lower_left
void setWorldToBaseRot(const btQuaternion &rot)
btScalar m_maxAppliedImpulse
btAlignedObjectArray< btVector3 > vector_buf
btScalar getMaxAppliedImpulse() const
void applyDeltaVee(const btScalar *delta_vee)
void clearForcesAndTorques()
btVector3 getAngularMomentum() const
void setBaseVel(const btVector3 &vel)
btAlignedObjectArray< btMatrix3x3 > matrix_buf
const btVector3 & getBaseInertia() const
void setHasSelfCollision(bool hasSelfCollision)
int size() const
return the number of elements in the array
void setUseGyroTerm(bool useGyro)
const btVector3 & getLinkTorque(int i) const
void addLinkTorque(int i, const btVector3 &t)
void setCompanionId(int id)
void setBaseOmega(const btVector3 &omega)
void compTreeLinkVelocities(btVector3 *omega, btVector3 *vel) const
bool hasFixedBase() const
btMultibodyLink & getLink(int index)
void addJointTorque(int i, btScalar Q)
btScalar getLinearDamping() const
void solveImatrix(const btVector3 &rhs_top, const btVector3 &rhs_bot, float result[6]) const
const btVector3 & getRVector(int i) const
bool hasSelfCollision() const
void setJointVel(int i, btScalar qdot)
void operator=(const btMultiBody &)
void setJointPos(int i, btScalar q)
void checkMotionAndSleepIfRequired(btScalar timestep)
btVector3 can be used to represent 3D points and vectors.
void setLinearDamping(btScalar damp)
btScalar getLinkMass(int i) const
void addBaseForce(const btVector3 &f)
void setMaxAppliedImpulse(btScalar maxImp)
btVector3 getBaseOmega() const
int getCompanionId() const
btAlignedObjectArray< btMultibodyLink > links
btScalar getAngularDamping() const
void resize(int newsize, const T &fillData=T())
btMatrix3x3 cached_inertia_top_left
void setupPrismatic(int i, btScalar mass, const btVector3 &inertia, int parent, const btQuaternion &rot_parent_to_this, const btVector3 &joint_axis, const btVector3 &r_vector_when_q_zero, bool disableParentCollision=false)
void applyDeltaVee(const btScalar *delta_vee, btScalar multiplier)
void setBaseInertia(const btVector3 &inertia)
btMultiBody(int n_links, btScalar mass, const btVector3 &inertia, bool fixed_base_, bool can_sleep_)
btVector3 worldPosToLocal(int i, const btVector3 &vec) const
const btQuaternion & getParentToLocalRot(int i) const
void fillContactJacobian(int link, const btVector3 &contact_point, const btVector3 &normal, btScalar *jac, btAlignedObjectArray< btScalar > &scratch_r, btAlignedObjectArray< btVector3 > &scratch_v, btAlignedObjectArray< btMatrix3x3 > &scratch_m) const
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
const btMultiBodyLinkCollider * getBaseCollider() const
btVector3 worldDirToLocal(int i, const btVector3 &vec) const
const btVector3 & getLinkInertia(int i) const
void setupRevolute(int i, btScalar mass, const btVector3 &inertia, int parent, const btQuaternion &zero_rot_parent_to_this, const btVector3 &joint_axis, const btVector3 &parent_axis_position, const btVector3 &my_axis_position, bool disableParentCollision=false)
The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatr...
btScalar getJointTorque(int i) const
const btQuaternion & getWorldToBaseRot() const
void setBaseMass(btScalar mass)
void stepPositions(btScalar dt)
int getParent(int link_num) const
const btVector3 & getBasePos() const
btVector3 localPosToWorld(int i, const btVector3 &vec) const
const btVector3 & getBaseForce() const
void setBasePos(const btVector3 &pos)
const btScalar * getVelocityVector() const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar m_angularDamping
bool getUseGyroTerm() const
void stepVelocities(btScalar dt, btAlignedObjectArray< btScalar > &scratch_r, btAlignedObjectArray< btVector3 > &scratch_v, btAlignedObjectArray< btMatrix3x3 > &scratch_m)
btScalar getJointVel(int i) const
btScalar getKineticEnergy() const
btMatrix3x3 cached_inertia_lower_right