Header menu logo Nu

PhysicsEngine Type

Represents a physics engine in Nu. TODO: investigate if we'll ever have to handle enough physics or integration messages to necessitate the use of SList instead of List.

Instance members

Instance member Description

this.CleanUp

Full Usage: this.CleanUp

Modifiers: abstract

Handle physics clean up by freeing all created resources.

this.ClearInternal

Full Usage: this.ClearInternal

Modifiers: abstract

Clear the physics simulation, returning false if no physics objects existed to begin with. For internal use only.

this.GetBodyAngularVelocity

Full Usage: this.GetBodyAngularVelocity

Parameters:
Returns: Vector3
Modifiers: abstract

Get the angular velocity of the body with the given body id.

bodyId : BodyId
Returns: Vector3

this.GetBodyContactNormals

Full Usage: this.GetBodyContactNormals

Parameters:
Returns: Vector3 array
Modifiers: abstract

Get the contact normals of the body with the given body id.

bodyId : BodyId
Returns: Vector3 array

this.GetBodyExists

Full Usage: this.GetBodyExists

Parameters:
Returns: bool
Modifiers: abstract

Check that the physics engine contain the body with the given body id.

bodyId : BodyId
Returns: bool

this.GetBodyGrounded

Full Usage: this.GetBodyGrounded

Parameters:
Returns: bool
Modifiers: abstract

Check that the body with the given body id is on the ground.

bodyId : BodyId
Returns: bool

this.GetBodyJointExists

Full Usage: this.GetBodyJointExists

Parameters:
Returns: bool
Modifiers: abstract

Check that the physics engine contain the body with the given body id.

bodyJointId : BodyJointId
Returns: bool

this.GetBodyJointMotorSpeed

Full Usage: this.GetBodyJointMotorSpeed

Parameters:
Returns: single
Modifiers: abstract

Get the motor speed of the body joint with the given body joint id.

bodyJointId : BodyJointId
Returns: single

this.GetBodyJointTargetAngle

Full Usage: this.GetBodyJointTargetAngle

Parameters:
Returns: single
Modifiers: abstract

Get the target angle of the body joint with the given body joint id.

bodyJointId : BodyJointId
Returns: single

this.GetBodyLinearVelocity

Full Usage: this.GetBodyLinearVelocity

Parameters:
Returns: Vector3
Modifiers: abstract

Get the linear velocity of the body with the given body id.

bodyId : BodyId
Returns: Vector3

this.GetBodySensor

Full Usage: this.GetBodySensor

Parameters:
Returns: bool
Modifiers: abstract

Check that the body with the given body id is a sensor.

bodyId : BodyId
Returns: bool

this.GetBodyToGroundContactNormalOpt

Full Usage: this.GetBodyToGroundContactNormalOpt

Parameters:
Returns: Vector3 option
Modifiers: abstract

Get a contact normal where the body with the given body id is touching the ground (if one exists).

bodyId : BodyId
Returns: Vector3 option

this.GetBodyToGroundContactNormals

Full Usage: this.GetBodyToGroundContactNormals

Parameters:
Returns: Vector3 array
Modifiers: abstract

Get the contact normals where the body with the given body id is touching the ground.

bodyId : BodyId
Returns: Vector3 array

this.GetBodyToGroundContactTangentOpt

Full Usage: this.GetBodyToGroundContactTangentOpt

Parameters:
Returns: Vector3 option
Modifiers: abstract

Get a contact tangent where the body with the given body id is touching the ground (if one exists).

bodyId : BodyId
Returns: Vector3 option

this.GetBodyWheelAngularVelocity

Full Usage: this.GetBodyWheelAngularVelocity

Parameters:
    wheelIndex : int
    bodyId : BodyId

Returns: single
Modifiers: abstract

Get the given wheel's angular velocity (0.0f if not a wheeled vehicle or invalid wheel).

wheelIndex : int
bodyId : BodyId
Returns: single

this.GetBodyWheelModelMatrix

Full Usage: this.GetBodyWheelModelMatrix

Parameters:
Returns: Matrix4x4
Modifiers: abstract

Get the given wheel's model matrix (identity if not a wheeled vehicle or invalid wheel).

wheelModelRight : Vector3
wheelModelUp : Vector3
wheelIndex : int
bodyId : BodyId
Returns: Matrix4x4

this.GetBodyWheelSpeedAtClutch

Full Usage: this.GetBodyWheelSpeedAtClutch

Parameters:
Returns: single
Modifiers: abstract

Get the wheel speed framed in terms of the clutch (0.0f if not a wheeled vehicle).

bodyId : BodyId
Returns: single

this.Gravity

Full Usage: this.Gravity

Returns: Vector3
Modifiers: abstract

Get the global gravity used in the physics engine.

Returns: Vector3

this.GravityDefault

Full Usage: this.GravityDefault

Returns: Vector3
Modifiers: abstract

Get the default global gravity used for the physics engine.

Returns: Vector3

this.HandleMessage

Full Usage: this.HandleMessage

Parameters:
Modifiers: abstract

Handle a physics message from an external source.

message : PhysicsMessage

this.RayCast

Full Usage: this.RayCast

Parameters:
    ray : Ray3
    collisionMask : int
    closestOnly : bool

Returns: BodyIntersection array
Modifiers: abstract

Cast a ray into the physics bodies.

ray : Ray3
collisionMask : int
closestOnly : bool
Returns: BodyIntersection array

this.ShapeCast

Full Usage: this.ShapeCast

Parameters:
    shape : BodyShape
    transformOpt : Affine option
    ray : Ray3
    collisionMask : int
    closestOnly : bool

Returns: BodyIntersection array
Modifiers: abstract

Cast a shape into the physics bodies.

shape : BodyShape
transformOpt : Affine option
ray : Ray3
collisionMask : int
closestOnly : bool
Returns: BodyIntersection array

this.TryIntegrate

Full Usage: this.TryIntegrate

Parameters:
Returns: IntegrationMessage SArray option
Modifiers: abstract

Attempt to integrate the physics system one step.

delta : GameTime
Returns: IntegrationMessage SArray option

this.TryRender

Full Usage: this.TryRender

Parameters:
Modifiers: abstract

Attempt to render physics with the given physics-engine-specific render context.

renderContext : PhysicsEngineRenderContext

Type something to start searching.