CLASSES
TagsA - Z

OimoJSPlugin

Plugins

Description

class OimoJSPlugin

Constructor

new OimoJSPlugin(iterations)

Parameters

Name Type Description
optional iterations number Unused parameter

Members

world : any

name : string

Methods

setGravity(gravity) → void

Sets the gravity

Parameters

Name Type Description
gravity Vector3 The given gravity

setTimeStep(timeStep) → void

Parameters

Name Type Description
timeStep number

executeStep(delta, impostors) → void

Parameters

Name Type Description
delta number
impostors Array<PhysicsImpostor>

applyImpulse(impostor, force, contactPoint) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
force Vector3 The force to apply to the mesh
contactPoint Vector3 The point of the mesh where the force has to be applied

applyForce(impostor, force, contactPoint) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
force Vector3 The force to apply to the mesh
contactPoint Vector3 The point of the mesh where the force has to be applied

generatePhysicsBody(impostor) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

removePhysicsBody(impostor) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

generateJoint(impostorJoint) → void

Parameters

Name Type Description
impostorJoint PhysicsImpostorJoint

removeJoint(impostorJoint) → void

Parameters

Name Type Description
impostorJoint PhysicsImpostorJoint

isSupported() → boolean

Tests if the plugin is usable in the current environement

setTransformationFromPhysicsBody(impostor) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

setPhysicsBodyTransformation(impostor, newPosition, newRotation) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
newPosition Vector3
newRotation Quaternion

setLinearVelocity(impostor, velocity) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
velocity Vector3

setAngularVelocity(impostor, velocity) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
velocity Vector3

getLinearVelocity(impostor) → Vector3

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

getAngularVelocity(impostor) → Vector3

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

setBodyMass(impostor, mass) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor
mass number

sleepBody(impostor) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

wakeUpBody(impostor) → void

Parameters

Name Type Description
impostor PhysicsImpostor The corresponding impostor

updateDistanceJoint(joint, maxDistance, minDistance) → void

Parameters

Name Type Description
joint PhysicsJoint
maxDistance number
optional minDistance number

setMotor(joint, speed, maxForce, motorIndex) → void

Parameters

Name Type Description
joint IMotorEnabledJoint
speed number
optional maxForce number

setLimit(joint, upperLimit, lowerLimit, motorIndex) → void

Parameters

Name Type Description
joint IMotorEnabledJoint
upperLimit number
optional lowerLimit number

dispose() → void

Destroys the engine object