Libraries.Game.Physics.SolverConstraint3D Documentation

This class is used by CollisionSolver3D to store all of the criteria, ex. the direction that one object should go relative to another object.

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer SOLVER_FRICTION
integer SOLVER_CONTACT

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAngularComponentA()This action returns the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object A.
GetAngularComponentB()This action gets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.
GetAppliedImpulse()This action gets the impulse that is needed to separate the two colliding objects.
GetAppliedPushImpulse()This action gets the impulse that is needed to stop the two colliding objects from penetrating each other.
GetBodyIDA()This action gets if the first object would be responding to forces/torques (id = -2) or not (id = -1).
GetBodyIDB()This action gets if the second object would be responding to forces/torques (id = -2) or not (id = -1).
GetConstraintType()This action gets the solver type.
GetContactNormal()This action returns the collision normal between two colliding objects.
GetFriction()This action gets the friction between the two colliding objects.
GetFrictionIndex()This action gets the friction index.
GetHashCode()This action gets the hash code for an object.
GetJacobianDiagonalABInverse()This action gets a number that is used to scale the impulse that is used to avoid penetration of the two objects and the impulse that is used to move the two objects apart.
GetOriginalContactPoint()This action gets the collision point that is inside this SolverConstraint3D class.
GetPenetration()This action gets what the current penetration between the two objects is.
GetRelativePosition1CrossNormal()This action returns the cross product of a vector from the collision point to the center of the first object and the collision normal.
GetRelativePosition2CrossNormal()This action returns the cross product of a vector from the collision point to the center of the second object and the collision normal.
GetRestitution()This action gets the restitution between the two colliding objects.
SetAngularComponentA(Libraries.Compute.Vector3 vector)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object A.
SetAngularComponentB(Libraries.Compute.Vector3 vector)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.
SetAppliedImpulse(number impulse)This action sets the impulse that is needed to separate the two colliding objects.
SetAppliedPushImpulse(number impulse)This action sets the impulse that is needed to stop the two colliding objects from penetrating each other.
SetBodyIDA(integer id)This action sets if the first object would be responding to forces/torques (id = -2) or not (id = -1).
SetBodyIDB(integer id)This action sets if the second object would be responding to forces/torques (id = -2) or not (id = -1).
SetConstraintType(integer type)This action sets whether the solver is going to be a friction solver or a contact solver.
SetContactNormal(Libraries.Compute.Vector3 normal)This action sets the collision normal between two colliding objects.
SetFriction(number friction)This action sets the friction between the two colliding objects.
SetFrictionIndex(integer index)This action sets the friction index.
SetJacobianDiagonalABInverse(number jacobian)This action sets a number that is used to scale the impulse that is used to avoid penetration of the two objects and the impulse that is used to move the two objects apart.
SetOriginalContactPoint(Libraries.Game.Collision.CollisionPoint3D contactPoint)This action stores a collision point inside this SolverConstraint3D class.
SetPenetration(number penetration)This action records what the current penetration between the two objects is.
SetRelativePosition1CrossNormal(Libraries.Compute.Vector3 vector)This action sets the cross product of a vector from the collision point to the center of the first object and the collision normal.
SetRelativePosition2CrossNormal(Libraries.Compute.Vector3 vector)This action sets the cross product of a vector from the collision point to the center of the second object and the collision normal.
SetRestitution(number restitution)This action sets the restitution between the two colliding objects.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetAngularComponentA()

This action returns the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object A.

Return

Libraries.Compute.Vector3: the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object A.

GetAngularComponentB()

This action gets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.

Return

Libraries.Compute.Vector3: the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.

GetAppliedImpulse()

This action gets the impulse that is needed to separate the two colliding objects.

Return

number: the impulse that is needed to separate the two colliding objects.

GetAppliedPushImpulse()

This action gets the impulse that is needed to stop the two colliding objects from penetrating each other.

Return

number: the impulse that is needed to stop the two colliding objects from penetrating each other.

GetBodyIDA()

This action gets if the first object would be responding to forces/torques (id = -2) or not (id = -1).

Return

integer: the ID of the first object.

GetBodyIDB()

This action gets if the second object would be responding to forces/torques (id = -2) or not (id = -1).

Return

integer: the ID of the second object.

GetConstraintType()

This action gets the solver type.

Return

integer: whether the solver is going to be a friction solver or a contact solver.

GetContactNormal()

This action returns the collision normal between two colliding objects.

Return

Libraries.Compute.Vector3: the collision normal between two colliding objects.

GetFriction()

This action gets the friction between the two colliding objects.

Return

number: the coefficient of friction.

GetFrictionIndex()

This action gets the friction index.

Return

integer: the friction index.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetJacobianDiagonalABInverse()

This action gets a number that is used to scale the impulse that is used to avoid penetration of the two objects and the impulse that is used to move the two objects apart. These impulses will be applied along the collision normal between the two objects.

Return

number:

GetOriginalContactPoint()

This action gets the collision point that is inside this SolverConstraint3D class.

Return

Libraries.Game.Collision.CollisionPoint3D: the collision point inside this SolverConstraint3D class.

GetPenetration()

This action gets what the current penetration between the two objects is.

Return

number: current penetration between the two objects is.

GetRelativePosition1CrossNormal()

This action returns the cross product of a vector from the collision point to the center of the first object and the collision normal.

Return

Libraries.Compute.Vector3: the cross product of a vector from the collision point to the center of the first object and the collision normal.

GetRelativePosition2CrossNormal()

This action returns the cross product of a vector from the collision point to the center of the second object and the collision normal.

Return

Libraries.Compute.Vector3: the cross product of a vector from the collision point to the center of the second object and the collision normal.

GetRestitution()

This action gets the restitution between the two colliding objects.

Return

number: the coefficient of restitution.

SetAngularComponentA(Libraries.Compute.Vector3 vector)

This action sets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object A.

Parameters

SetAngularComponentB(Libraries.Compute.Vector3 vector)

This action sets the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.

Parameters

SetAppliedImpulse(number impulse)

This action sets the impulse that is needed to separate the two colliding objects.

Parameters

SetAppliedPushImpulse(number impulse)

This action sets the impulse that is needed to stop the two colliding objects from penetrating each other.

Parameters

SetBodyIDA(integer id)

This action sets if the first object would be responding to forces/torques (id = -2) or not (id = -1).

Parameters

SetBodyIDB(integer id)

This action sets if the second object would be responding to forces/torques (id = -2) or not (id = -1).

Parameters

SetConstraintType(integer type)

This action sets whether the solver is going to be a friction solver or a contact solver.

Parameters

SetContactNormal(Libraries.Compute.Vector3 normal)

This action sets the collision normal between two colliding objects.

Parameters

SetFriction(number friction)

This action sets the friction between the two colliding objects.

Parameters

SetFrictionIndex(integer index)

This action sets the friction index.

Parameters

SetJacobianDiagonalABInverse(number jacobian)

This action sets a number that is used to scale the impulse that is used to avoid penetration of the two objects and the impulse that is used to move the two objects apart. These impulses will be applied along the collision normal between the two objects.

Parameters

SetOriginalContactPoint(Libraries.Game.Collision.CollisionPoint3D contactPoint)

This action stores a collision point inside this SolverConstraint3D class.

Parameters

SetPenetration(number penetration)

This action records what the current penetration between the two objects is.

Parameters

SetRelativePosition1CrossNormal(Libraries.Compute.Vector3 vector)

This action sets the cross product of a vector from the collision point to the center of the first object and the collision normal.

Parameters

SetRelativePosition2CrossNormal(Libraries.Compute.Vector3 vector)

This action sets the cross product of a vector from the collision point to the center of the second object and the collision normal.

Parameters

SetRestitution(number restitution)

This action sets the restitution between the two colliding objects.

Parameters