Physics

Functions

Nil <- setGravity (GPoint vector)
Set the direction and magnitude of gravity using a 3D vector.

Nil <- setStepSize (Float size)
Set the step size of the simulation when using step()

Nil <- setQuickStepIterations (Integer iterations)
Set the number of iterations done when using quickStep()

Nil <- step ()
Move the simulation forward one step.

Nil <- quickStep ()
Move the simulation forward by using the 'quick' solver, which is less accurate but uses less processing power and memory.

PhysicalSpace object <- createSpace ()
Creates a new physical space, required for collision detection.

PhysicsSystem object <- physicsSystem ()
Returns a reference to the physics system object.

Classes

PhysicalBody
This class contains the physical properties of a simulated object. These properties include mass, velocity, torque, position, rotation, etc.

PhysicalGeometry
This class contains the geometric properties of a simulated object. These properties are used only for collision detection.

PhysicalJoint
A single joint (constraint) between two bodies, or one body and the world.

PhysicalJointGroup
A group of joints (constraints).

PhysicalSpace
A container for PhysicalGeometry objects.
This exists only to partition geometry to speed up collision testing.
In order for an object to collide with anything, it must belong to a space.

PhysicalState
Represents the collective state of a simulated object, including any joints, its geometry, and its body.

PhysicsSystem
Contains all physical state objects, manages the simulation, and performs collision detection.