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.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.GetWheelAngularVelocity

Full Usage: this.GetWheelAngularVelocity

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.GetWheelModelMatrix

Full Usage: this.GetWheelModelMatrix

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.GetWheelSpeedAtClutch

Full Usage: this.GetWheelSpeedAtClutch

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.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.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:
    eyeCenter : Vector3
    eyeFrustum : Frustum
    renderSettings : obj
    rendererObj : obj

Modifiers: abstract

Attempt torender physics with the given settings and renderer objects.

eyeCenter : Vector3
eyeFrustum : Frustum
renderSettings : obj
rendererObj : obj

Type something to start searching.