Logo Search packages:      
Sourcecode: blender version File versions

SM_Object Class Reference

#include <SM_Object.h>

Inheritance diagram for SM_Object:

SM_MotionState SM_FhObject

List of all members.

Detailed Description

SM_Object is an internal part of the Sumo physics engine.

It encapsulates an object in the physics scene, and is responsible for calculating the collision response of objects.

Definition at line 84 of file SM_Object.h.

Public Member Functions

void addAngularVelocity (const MT_Vector3 &ang_vel)
void addExternalAngularVelocity (const MT_Vector3 &ang_vel)
void addExternalLinearVelocity (const MT_Vector3 &lin_vel)
void addLinearVelocity (const MT_Vector3 &lin_vel)
void applyAngularImpulse (const MT_Vector3 &impulse)
void applyCenterForce (const MT_Vector3 &force)
void applyCenterImpulse (const MT_Vector3 &impulse)
void applyForceField (const MT_Vector3 &accel)
void applyImpulse (const MT_Point3 &attach, const MT_Vector3 &impulse)
void applyTorque (const MT_Vector3 &torque)
void calcXform ()
void clearCombinedVelocities ()
void clearForce ()
void clearMomentum ()
const MT_Vector3getAngularVelocity () const
SM_ClientObject * getClientObject ()
SM_ObjectgetDynamicParent ()
SM_FhObjectgetFhObject () const
const MT_Vector3getInvInertia () const
const MT_Matrix3x3getInvInertiaTensor () const
MT_Scalar getInvMass () const
const MT_Vector3getLinearVelocity () const
MT_Point3 getLocalCoord (const MT_Point3 &world) const
MT_Scalar getMargin () const
const SM_MaterialPropsgetMaterialProps () const
const double * getMatrix () const
void getMatrix (double *m) const
DT_ObjectHandle getObjectHandle () const
const MT_QuaterniongetOrientation () const
const MT_Point3getPosition () const
const MT_Vector3getReactionForce () const
const MT_TransformgetScaledTransform () const
DT_ShapeHandle getShapeHandle () const
const SM_ShapePropsgetShapeProps () const
MT_Scalar getTime () const
virtual MT_Transform getTransform () const
MT_Vector3 getVelocity (const MT_Point3 &local) const
MT_Point3 getWorldCoord (const MT_Point3 &local) const
void integrateBackward (MT_Scalar timeStep, const MT_Vector3 &velocity, const MT_Quaternion &ang_vel)
void integrateForces (MT_Scalar timeStep)
void integrateForward (MT_Scalar timeStep, const SM_MotionState &prev_state)
void integrateMidpoint (MT_Scalar timeStep, const SM_MotionState &prev_state, const MT_Vector3 &velocity, const MT_Quaternion &ang_vel)
void integrateMomentum (MT_Scalar timeSteo)
bool isDynamic () const
bool isGhost () const
bool isRigidBody () const
void lerp (MT_Scalar t, const SM_MotionState &other)
void notifyClient ()
void proceedKinematic (MT_Scalar timeStep)
void registerCallback (SM_Callback &callback)
void relax ()
void resolveCombinedVelocities (const MT_Vector3 &lin_vel, const MT_Vector3 &ang_vel)
void restoreDynamics ()
void restoreMaterial ()
void resume (void)
void saveReactionForce (MT_Scalar timeStep)
void setAngularVelocity (const MT_Vector3 &ang_vel)
void setClientObject (SM_ClientObject *client_object)
void setExternalAngularVelocity (const MT_Vector3 &ang_vel)
void setExternalLinearVelocity (const MT_Vector3 &lin_vel)
void setLinearVelocity (const MT_Vector3 &lin_vel)
void setMargin (MT_Scalar margin)
void setOrientation (const MT_Quaternion &orn)
void setPosition (const MT_Point3 &pos)
void setRigidBody (bool is_rigid_body)
void setScaling (const MT_Vector3 &scaling)
void setTime (MT_Scalar time)
 SM_Object (DT_ShapeHandle shape, const SM_MaterialProps *materialProps, const SM_ShapeProps *shapeProps, SM_Object *dynamicParent)
void suspend (void)
void suspendDynamics ()
void suspendMaterial ()
void updateInvInertiaTensor ()

Static Public Member Functions

static DT_Bool boing (void *client_data, void *object1, void *object2, const DT_CollData *coll_data)
static DT_Bool fix (void *client_data, void *object1, void *object2, const DT_CollData *coll_data)

Protected Attributes

MT_Vector3 m_ang_vel
MT_Vector3 m_lin_vel
MT_Quaternion m_orn
MT_Point3 m_pos
MT_Scalar m_time

Private Types

typedef std::vector
< SM_Callback * > 

Private Member Functions

const MT_Vector3 actualAngVelocity () const
const MT_Vector3 actualLinVelocity () const
void dynamicCollision (const MT_Point3 &local2, const MT_Vector3 &normal, MT_Scalar dist, const MT_Vector3 &rel_vel, MT_Scalar restitution, MT_Scalar friction_factor, MT_Scalar invMass)

Private Attributes

MT_Vector3 m_ang_mom
T_CallbackList m_callbackList
SM_ClientObject * m_client_object
MT_Vector3 m_combined_ang_vel
MT_Vector3 m_combined_lin_vel
MT_Vector3 m_error
MT_Vector3 m_force
MT_Vector3 m_inv_inertia
MT_Matrix3x3 m_inv_inertia_tensor
MT_Scalar m_inv_mass
unsigned int m_is_rigid_body: 1
unsigned int m_kinematic: 1
MT_Vector3 m_lin_mom
MT_Scalar m_margin
const SM_MaterialPropsm_materialProps
const SM_MaterialPropsm_materialPropsBackup
DT_ObjectHandle m_object
double m_ogl_matrix [16]
unsigned int m_prev_kinematic: 1
SM_MotionState m_prev_state
MT_Transform m_prev_xform
MT_Vector3 m_reaction_force
MT_Vector3 m_reaction_impulse
MT_Vector3 m_scaling
DT_ShapeHandle m_shape
const SM_ShapePropsm_shapeProps
const SM_ShapePropsm_shapePropsBackup
bool m_suspended
MT_Scalar m_timeStep
MT_Vector3 m_torque
MT_Transform m_xform

Static Private Attributes

static MT_Scalar ImpulseThreshold = -10.

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

Generated by  Doxygen 1.6.0   Back to index