Logo Search packages:      
Sourcecode: blender version File versions  Download package

SM_Object Class Reference

#include <SM_Object.h>

Inheritance diagram for SM_Object:


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 81 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 ()
void endFrame ()
const MT_Vector3getAngularVelocity () const
SM_ClientObject * getClientObject ()
const SM_MotionStategetCurrentFrame () const
SM_MotionStategetCurrentFrame ()
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
const SM_MotionStategetNextFrame () const
SM_MotionStategetNextFrame ()
DT_ObjectHandle getObjectHandle () const
const MT_QuaterniongetOrientation () const
void * getPhysicsClientObject ()
const MT_Point3getPosition () const
const SM_MotionStategetPreviousFrame () const
SM_MotionStategetPreviousFrame ()
const MT_Vector3getReactionForce () const
const MT_TransformgetScaledTransform () const
DT_ShapeHandle getShapeHandle () const
const SM_ShapePropsgetShapeProps () const
MT_Scalar getTime () const
MT_Vector3 getVelocity (const MT_Point3 &local) const
MT_Point3 getWorldCoord (const MT_Point3 &local) const
void integrateForces (MT_Scalar timeStep)
void integrateMomentum (MT_Scalar timeSteo)
void interpolate (MT_Scalar timeStep)
bool isDynamic () const
bool isGhost () const
bool isRigidBody () const
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 setPhysicsClientObject (void *physicsClientObject)
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)

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
SM_MotionState m_frames [3]
MT_Vector3 m_inv_inertia
MT_Matrix3x3 m_inv_inertia_tensor
MT_Scalar m_inv_mass
bool m_is_rigid_body
bool m_kinematic
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]
void * m_physicsClientObject
bool m_prev_kinematic
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
int m_static
bool m_suspended
MT_Scalar m_timeStep
MT_Vector3 m_torque
MT_Transform m_xform

Static Private Attributes

static MT_Scalar ImpulseThreshold = -1.0


class Contact

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

Generated by  Doxygen 1.6.0   Back to index