PhysicsShape

consoledoc.h

Represents a destructible physical object simulated through the plugin system.

More...

PhysicsShape

bool

Enables or disables playing of an ambient animation upon loading the shape.

Public Static Attributes

bool

Disables rendering of all instances of this type.

bool

Disables selection of all instances of this type.

bool

Determines if the shape will recieve corrections from the server or will instead be allowed to diverge.

bool

Determines if client-side shapes will attempt to smoothly transition to their new position after reciving a correction.

Public Functions

void
applyForce(Point3F force)

Add a force to a dynamic physics shape.

void
applyTorque(Point3F torque)

Add a torque to a dynamic physics shape.

void

Disables rendering and physical simulation.

bool

Returns if a PhysicsShape has been destroyed or not.

void

Restores the shape to its state before being destroyed.

Detailed Description

Represents a destructible physical object simulated through the plugin system.

PhysicsShape

bool playAmbient 

Enables or disables playing of an ambient animation upon loading the shape.

note:

The ambient animation must be named "ambient".

Public Static Attributes

bool isRenderable 

Disables rendering of all instances of this type.

bool isSelectable 

Disables selection of all instances of this type.

bool noCorrections 

Determines if the shape will recieve corrections from the server or will instead be allowed to diverge.

In the event that the client and server object positions/orientations differ and if this variable is true, the server will attempt to 'correct' the client object to keep it in sync. Otherwise, client and server objects may fall out of sync.

bool noSmoothing 

Determines if client-side shapes will attempt to smoothly transition to their new position after reciving a correction.

If true, shapes will immediately render at the position they are corrected to.

Public Functions

applyForce(Point3F force)

Add a force to a dynamic physics shape.

Parameters:

force

to apply to the dynamic physics shape

note:

This value is ignored on physics shapes that are not dynamic. Wakes up the dynamic physics shape if it is sleeping.

applyTorque(Point3F torque)

Add a torque to a dynamic physics shape.

Parameters:

torque

to apply to the dynamic physics shape

note:

This value is ignored on physics shapes that are not dynamic. Wakes up the dynamic physics shape if it is sleeping.

destroy()

Disables rendering and physical simulation.

Calling destroy() will also spawn any explosions, debris, and/or destroyedShape defined for it, as well as remove it from the scene graph.

Destroyed objects are only created on the server. Ghosting will later update the client.

note:

This does not actually delete the PhysicsShape.

isDestroyed()

Returns if a PhysicsShape has been destroyed or not.

restore()

Restores the shape to its state before being destroyed.

Re-enables rendering and physical simulation on the object and adds it to the client's scene graph. Has no effect if the shape is not destroyed.