Class: Physics

gEngine.Physics

new Physics()

Default Constructor

Physics engine supporting projection and impulse collision resolution.

Source:

Methods

(static) beginRelaxation() → {void}

Start Relaxation
Source:
Returns:
Type
void

(static) continueRelaxation() → {Boolean}

Continue Relaxation
Source:
Returns:
true if Relaxation is active
Type
Boolean

(static) getRelaxationCorrectionRate() → {Number}

Return Relaxation Correction Rate Value
Source:
Returns:
Relaxation Correction Rate
Type
Number

(static) getRelaxationLoopCount() → {Number}

Return Relaxation Loop Count
Source:
Returns:
Relaxation Loop Count
Type
Number

(static) getSystemtAcceleration() → {Array.<Float>}

Return System Acceleration Value [x, y]
Source:
Returns:
System Acceleration [x, y]
Type
Array.<Float>

(static) initialize() → {void}

Initilize the Engine Physics
Source:
Returns:
Type
void

(static) processObjObj(obj1, obj2) → {void}

Rigid Shape interactions: two game objects
Parameters:
Name Type Description
obj1 GameObject GameObject 1
obj2 GameObject GameObject 2
Source:
Returns:
Type
void

(static) processObjSet(obj, set) → {void}

Rigid Shape interactions: a game object and a game object set
Parameters:
Name Type Description
obj GameObject GameObject
set GameObjectSet GameObjectSet
Source:
Returns:
Type
void

(static) processSelfSet(set) → {void}

Rigid Shape interactions: a set against itself
Parameters:
Name Type Description
set GameObjectSet GameObjectSet
Source:
Returns:
Type
void

(static) processSetSet(set1, set2) → {void}

Rigid Shape interactions: two game object sets
Parameters:
Name Type Description
set1 GameObjectSet GameObjectSet 1
set2 GameObjectSet GameObjectSet 2
Source:
Returns:
Type
void

(static) resolveCollision(s1, s2, collisionInfo) → {void}

Parameters:
Name Type Description
s1 RigidShape shape 1
s2 RigidShape shape 2
collisionInfo CollisionInfo
Source:
Returns:
Type
void

(static) setRelaxationCorrectionRate(r) → {void}

Set Relaxation Correction Rate Value
Parameters:
Name Type Description
r Number Relaxation Correction Rate
Source:
Returns:
Type
void

(static) setRelaxationLoopCount(c) → {void}

Set Relaxation Loop Count
Parameters:
Name Type Description
c Number New Relaxation Loop Count
Source:
Returns:
Type
void

(static) setSystemtAcceleration(g) → {void}

Set System Acceleration Value [x, y]
Parameters:
Name Type Description
g Array.<Float> New System Acceleration [x, y]
Source:
Returns:
Type
void