PhysicsWorld

Engine/source/T3D/physics/physicsWorld.h

More...

Public Types

enum
BodyType {
  BT_Static = BIT( 0 )
  BT_Dynamic = BIT( 1 )
  BT_Player = BIT( 2 )
  BT_All = BT_Static | BT_Dynamic | BT_Player
}

Protected Attributes

Protected Static Attributes

bool

Gpu acceleration.

Public Static Attributes

Public Functions

The constructor.

The destructor.

castRay(const Point3F & start, const Point3F & end, U32 bodyTypes)
bool
castRay(const Point3F & startPnt, const Point3F & endPnt, RayInfo * ri, const Point3F & impulse)

An abstract way to raycast into any type of PhysicsWorld, in a way that mirrors a Torque-style raycast.

Tears down the physics world destroying any existing bodies, joints, and controllers.

explosion(const Point3F & pos, F32 radius, F32 forceMagnitude)

Returns the active gravity force.

bool
initWorld(bool isServer, ProcessList * processList)

Prepare the physics world for use.

bool

Returns true if the physics world is active and simulating.

Overloaded to do debug drawing.

Public Static Functions

bool

Gpu acceleration.

Detailed Description

Public Types

BodyType

Enumerator

BT_Static = BIT( 0 )
BT_Dynamic = BIT( 1 )
BT_Player = BIT( 2 )
BT_All = BT_Static | BT_Dynamic | BT_Player

Protected Attributes

Point3F mGravity 

The current gravity force.

Signal< void()> mStaticChangedSignal 
Signal< void()> mUpdateSignal 

Protected Static Attributes

bool smGpuEnabled 

Gpu acceleration.

Public Static Attributes

U32 smPhysicsMaxSubSteps 
F32 smPhysicsStepTime 

Physics timing.

Public Functions

PhysicsWorld()

The constructor.

~PhysicsWorld()

The destructor.

castRay(const Point3F & start, const Point3F & end, U32 bodyTypes)

Reimplemented by: BtWorld, Px3World

castRay(const Point3F & startPnt, const Point3F & endPnt, RayInfo * ri, const Point3F & impulse)

An abstract way to raycast into any type of PhysicsWorld, in a way that mirrors a Torque-style raycast.


This method is not fully developed or very sophisticated. For example, there is no system of collision groups or raycast masks, which could be very complex to write in a PhysicsPlugin-Abstract way...

Reimplemented by: BtWorld, Px3World

destroyWorld()

Tears down the physics world destroying any existing bodies, joints, and controllers.

Reimplemented by: BtWorld, Px3World

explosion(const Point3F & pos, F32 radius, F32 forceMagnitude)

Reimplemented by: BtWorld, Px3World

getGravity()

Returns the active gravity force.

getStaticChangedSignal()

getUpdateSignal()

initWorld(bool isServer, ProcessList * processList)

Prepare the physics world for use.

Reimplemented by: BtWorld, Px3World

isEnabled()

Returns true if the physics world is active and simulating.

Reimplemented by: BtWorld, Px3World

onDebugDraw(const SceneRenderState * state)

Overloaded to do debug drawing.

It is assumed the GFX state is setup prior to this call for rendering in world space.

Reimplemented by: BtWorld, Px3World

reset()

Reimplemented by: BtWorld, Px3World

Public Static Functions

isGpuEnabled()

Gpu acceleration.