17 #ifndef BT_TRBSTATEVEC_H__
18 #define BT_TRBSTATEVEC_H__
21 #ifdef PFX_USE_FREE_VECTORMATH
22 #include "vecmath/vmInclude.h"
25 #endif //PFX_USE_FREE_VECTORMATH
67 #define PFX_MOTION_MASK_DYNAMIC 0x0a // Active,OneWay
68 #define PFX_MOTION_MASK_STATIC 0x95 // Fixed,Keyframe,Trigger,Sleeping
69 #define PFX_MOTION_MASK_SLEEP 0x0e // Can sleep
70 #define PFX_MOTION_MASK_TYPE 0x7f
87 contactFilterSelf=contactFilterTarget=0xffffffff;
94 useContactCallback = 0;
97 angularDamping = 0.99f;
121 float deltaLinearVelocity[3];
122 float deltaAngularVelocity[3];
129 inline void setZero();
130 inline void setIdentity();
159 void wakeup() {mSleeping=0;mSleepCount=0;}
160 void sleep() {
if(useSleep) {mSleeping=1;mSleepCount=0;}}
193 inline void setAuxilsCcd(
const vmVector3 ¢erLocal,
const vmVector3 &halfLocal,
float timeStep);
288 centerW = 0.5f * (aabbMin + aabbMax);
289 halfW =0.5f * (aabbMax - aabbMin);
310 mUseContactCallback = 0;
311 mUseSleepCallback = 0;
313 mContactFilterSelf = 0xffffffff;
314 mContactFilterTarget = 0xffffffff;
315 mLinearDamping = 1.0f;
316 mAngularDamping = 0.99f;
337 #endif //BT_TRBSTATEVEC_H__
void setAngularDamping(float damping)
void setContactFilterTarget(uint32_t filter)
void setOrientation(const vmQuat &rot)
void setAngularVelocity(const vmVector3 &vel)
const Vector3 minPerElem(const Vector3 &vec0, const Vector3 &vec1)
uint32_t contactFilterSelf
#define ATTRIBUTE_ALIGNED128(a)
uint8_t useContactCallback
vmVector3 getPosition() const
static void store_Quat(const vmQuat &src, float *p)
void setMotionType(uint8_t t)
uint8_t getMotionMask() const
vmQuat getOrientation() const
uint32_t getContactFilterTarget() const
const Vector3 rotate(const Quat &quat, const Vector3 &vec)
static const Quat identity()
uint8_t getUseCcd() const
uint8_t getUseSleepCallback() const
Vectormath::Aos::Matrix3 vmMatrix3
uint16_t getSleepCount() const
static vmVector3 read_Vector3(const float *p)
void setPosition(const vmVector3 &pos)
static void store_Vector3(const vmVector3 &src, float *p)
float getLinearDamping() const
const Vector3 maxPerElem(const Vector3 &vec0, const Vector3 &vec1)
void setUseCcd(uint8_t b)
void setLinearDamping(float damping)
void setLinearVelocity(const vmVector3 &vel)
vmVector3 getDeltaLinearVelocity() const
void setUseSleep(uint8_t b)
void setContactFilterSelf(uint32_t filter)
float getAngularDamping() const
void setUseContactCallback(uint8_t b)
uint16_t getRigidBodyId() const
vmVector3 getAngularVelocity() const
#define ATTRIBUTE_ALIGNED16(a)
uint32_t getContactFilterSelf() const
vmVector3 getDeltaAngularVelocity() const
uint32_t contactFilterTarget
static vmQuat read_Quat(const float *p)
uint8_t getUseSleep() const
void loadXYZW(Quat &quat, const float *fptr)
void setAuxils(const vmVector3 ¢erLocal, const vmVector3 &halfLocal)
void setDeltaLinearVelocity(const vmVector3 &vel)
void setAuxilsCcd(const vmVector3 ¢erLocal, const vmVector3 &halfLocal, float timeStep)
vmVector3 getLinearVelocity() const
void storeXYZW(const Quat &quat, float *fptr)
uint8_t getMotionType() const
Vectormath::Aos::Vector3 vmVector3
void setDeltaAngularVelocity(const vmVector3 &vel)
void storeXYZ(const Vector3 &vec, float *fptr)
uint8_t getUseContactCallback() const
void incrementSleepCount()
const Matrix3 absPerElem(const Matrix3 &mat)
void setRigidBodyId(uint16_t i)
void setUseSleepCallback(uint8_t b)
void loadXYZ(Vector3 &vec, const float *fptr)