Public Member Functions

Body Class Reference

#include <Body.h>

Inheritance diagram for Body:
IBody

List of all members.

Public Member Functions

 Body (const float3 &position, const float3 &rotation)
virtual ~Body ()
 Destructor.
void setActor (NxActor *actor)
 Set PhysX actor.
float3 getPosition ()
 Returns the current position of this object.
void stopMotion ()
 Raises kinematic flag.
void setMass (int mass)
 Sets the mass of this object.
void setGlobalPosition (float3 position)
 Sets the Position of this object.
bool isMoving ()
 Checls if this object is in motion.
void slowDown ()
 Slows the object down.
NxActor & getActor (void)
 Get PhysX actor.
void applyForce (float3 vec)

Detailed Description

PhysX implementation of the IBody interface.

Definition at line 4 of file Body.h.


Constructor & Destructor Documentation

Body::Body ( const float3 position,
const float3 rotation 
)

Contructor to set the initial position and rotation of the body.

Definition at line 3 of file Body.cpp.

Body::~Body (  )  [virtual]

Destructor.

Definition at line 9 of file Body.cpp.


Member Function Documentation

void Body::applyForce ( float3  vec  )  [virtual]

Apply a force to a body. This is used to move an object without a visible event.

Implements IBody.

Definition at line 77 of file Body.cpp.

NxActor & Body::getActor ( void   ) 

Get PhysX actor.

Definition at line 20 of file Body.cpp.

float3 Body::getPosition (  )  [virtual]

Returns the current position of this object.

Implements IBody.

Definition at line 25 of file Body.cpp.

bool Body::isMoving (  )  [virtual]

Checls if this object is in motion.

Implements IBody.

Definition at line 97 of file Body.cpp.

void Body::setActor ( NxActor *  actor  ) 

Set PhysX actor.

Definition at line 13 of file Body.cpp.

void Body::setGlobalPosition ( float3  position  )  [virtual]

Sets the Position of this object.

Implements IBody.

Definition at line 42 of file Body.cpp.

void Body::setMass ( int  mass  )  [virtual]

Sets the mass of this object.

Implements IBody.

Definition at line 70 of file Body.cpp.

void Body::slowDown (  )  [virtual]

Slows the object down.

Implements IBody.

Definition at line 109 of file Body.cpp.

void Body::stopMotion (  )  [virtual]

Raises kinematic flag.

Implements IBody.

Definition at line 57 of file Body.cpp.


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