Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
om::physics::objects::PhysicsObject Class Reference

A class that represents an abstract physically-based object within a physics simulation. More...

#include <omPhysicsObject.h>

Inheritance diagram for om::physics::objects::PhysicsObject:
om::physics::context::PhysicsSceneObject om::physics::context::PhysicsContextObject om::physics::objects::CharacterController om::physics::objects::RigidObject

Public Member Functions

const PhysicsObjectTypegetType () const
 Return an object representing the type of this object. More...
 
virtual Bool upload ()
 Upload this object's current representation to the simulation. More...
 
virtual Bool download ()
 Download the object's simulation representation to the object's local state. More...
 
- Public Member Functions inherited from om::physics::context::PhysicsSceneObject
virtual Bool addSceneObjects (PhysicsSceneID sceneID)
 Add internal context objects to the scene with the specified ID. More...
 
virtual Bool removeSceneObjects (PhysicsSceneID sceneID)
 Remove internal context objects from the scene with the specified ID. More...
 
- Public Member Functions inherited from om::physics::context::PhysicsContextObject
virtual ~PhysicsContextObject ()
 Destory this physics context object. More...
 
PhysicsContextgetContext () const
 Return a pointer to the physics context this context object is using to do simulation. More...
 
virtual Bool setContext (PhysicsContext *newContext)
 Set a pointer to the physics context this context object should use to do simulation. More...
 
Bool clearContext ()
 Clear the previous context from this object. More...
 

Static Public Attributes

static const ResourceType RESOURCE_TYPE
 The resource type for a physics object. More...
 

Protected Member Functions

 PhysicsObject (const PhysicsObjectType *newType)
 Create a physics object that has the specified type. More...
 
- Protected Member Functions inherited from om::physics::context::PhysicsContextObject
 PhysicsContextObject ()
 Create a new physics context object that doesn't have an associated physics context. More...
 
 PhysicsContextObject (PhysicsContext *newContext)
 Create a new physics context object that uses the specified context for simulation. More...
 

Additional Inherited Members

- Protected Attributes inherited from om::physics::context::PhysicsContextObject
PhysicsContextcontext
 A pointer to the physics context this object is using. More...
 

Detailed Description

A class that represents an abstract physically-based object within a physics simulation.

Constructor & Destructor Documentation

om::physics::objects::PhysicsObject::PhysicsObject ( const PhysicsObjectType newType)
inlineprotected

Create a physics object that has the specified type.

Member Function Documentation

const PhysicsObjectType& om::physics::objects::PhysicsObject::getType ( ) const
inline

Return an object representing the type of this object.

virtual Bool om::physics::objects::PhysicsObject::upload ( )
virtual

Upload this object's current representation to the simulation.

This method should be called if the local object state is modified and those changes should be reflected in the global simulation.

The object's state is automatically uploaded when it is first created in a simulation context.

The method returns whether or not the state was uploaded.

Reimplemented in om::physics::objects::RigidObject.

virtual Bool om::physics::objects::PhysicsObject::download ( )
virtual

Download the object's simulation representation to the object's local state.

This method should be called if the current simulation state is needed after the simulation state was previously updated.

The method returns whether or not the state was downloaded.

Reimplemented in om::physics::objects::RigidObject.

Member Data Documentation

const ResourceType om::physics::objects::PhysicsObject::RESOURCE_TYPE
static

The resource type for a physics object.


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