Libraries.Game.Physics.CollisionPersistentData Documentation

This class is used to record data of the forces, impulses, friction, penetration, and other information about a certain CollisionPoint3D. Note that at a CollisionPoint3D, since we are in 3D space, we would have a normal vector and two tangential vectors.

Inherits from: Libraries.Language.Object

Summary

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.
GetAccumulatedTangentImpulse0()This action returns the the total amount of impulse that is applied to the first tangent of collision at a certain CollisionPoint3D.
GetAccumulatedTangentImpulse1()This action returns the the total amount of impulse that is applied to the second tangent of collision at a certain CollisionPoint3D.
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 returns the direction (global coordinates) at which an angular impulse should be applied due to the normal impulse on object B.
GetAppliedImpulse()This action returns the impulse that is currently being applied at a certain CollisionPoint3D.
GetContactSolver()This action returns the container for all of the actions that can be used to bounce the two objects away from each other after they have collided.
GetFriction()This action returns the effective friction at the CollisionPoint3D between the two objects.
GetFrictionAngularComponent0A()This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the first tangent direction on object A.
GetFrictionAngularComponent0B()This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the first tangent direction on object B.
GetFrictionAngularComponent1A()This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the second tangent direction on object A.
GetFrictionAngularComponent1B()This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the second tangent direction on object B.
GetFrictionSolver()This action returns the container for all of the actions that can be used to solve for the correct tangential impulse to simulate friction.
GetFrictionWorldTangential0()This action returns the first tangent direction in global coordinates.
GetFrictionWorldTangential1()This action returns the second tangent direction in global coordinates.
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.
GetJacobianDiagonalABInverseTangent0()This action returns a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the first tangent direction.
GetJacobianDiagonalABInverseTangent1()This action returns a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the second tangent direction.
GetPenetration()This action returns what the current penetration between the two objects is.
GetPersistentLifeTime()This action returns how many times this CollisionPersistentData has been changed by the action "PrepareConstraints" in the class CollisionSolver3D.
GetPreviousAppliedImpulse()This action returns the impulse applied at a certain CollisionPoint3D before you calculated a new impulse to be applied at that CollisionPoint3D.
GetRestitution()This action returns the effective resistution at the CollisionPoint3D between the two objects.
Reset()This action sets all of the variables in this class to 0.
SetAccumulatedTangentImpulse0(number impulse)This action sets the the total amount of impulse that is applied to the first tangent of collision at a certain CollisionPoint3D.
SetAccumulatedTangentImpulse1(number impulse)This action sets the the total amount of impulse that is applied to the second tangent of collision at a certain CollisionPoint3D.
SetAngularComponentA(Libraries.Compute.Vector3 angularComponent)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 angularComponent)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 change the impulse applied at a certain CollisionPoint3D with the magnitude that you pass in.
SetFriction(number friction)This action sets the effective friction at the CollisionPoint3D between the two objects.
SetFrictionAngularComponent0A(Libraries.Compute.Vector3 angularComponent)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the friction in the first tangent direction on object A.
SetFrictionAngularComponent0B(Libraries.Compute.Vector3 angularComponent)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the friction in the first tangent direction on object B.
SetFrictionAngularComponent1A(Libraries.Compute.Vector3 angularComponent)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the friction in the second tangent direction on object A.
SetFrictionAngularComponent1B(Libraries.Compute.Vector3 angularComponent)This action sets the direction (global coordinates) at which an angular impulse should be applied due to the friction in the second tangent direction on object B.
SetFrictionWorldTangential0(Libraries.Compute.Vector3 tangential)This action sets the first tangent direction in global coordinates.
SetFrictionWorldTangential1(Libraries.Compute.Vector3 tangential)This action sets the second tangent direction in global coordinates.
SetJacobianDiagonalABInverse(number inverse)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.
SetJacobianDiagonalABInverseTangent0(number tangent)This action sets a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the first tangent direction.
SetJacobianDiagonalABInverseTangent1(number tangent)This action sets a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the second tangent direction.
SetPenetration(number penetration)This action records what the current penetration between the two objects is.
SetPersistentLifeTime(integer lifeTime)This action sets how many times this CollisionPersistentData has been changed by the action "PrepareConstraints" in the class CollisionSolver3D.
SetPreviousAppliedImpulse(number impulse)This action sets the impulse applied at a certain CollisionPoint3D before you calculated a new impulse to be applied at that CollisionPoint3D.
SetRestitution(number restitution)This action sets the effective resistution at the CollisionPoint3D between the two 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.

GetAccumulatedTangentImpulse0()

This action returns the the total amount of impulse that is applied to the first tangent of collision at a certain CollisionPoint3D.

Return

number: the impulse applied at the first tangent.

GetAccumulatedTangentImpulse1()

This action returns the the total amount of impulse that is applied to the second tangent of collision at a certain CollisionPoint3D.

Return

number: the impulse applied at the second tangent.

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.

GetAngularComponentB()

This action returns 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.

GetAppliedImpulse()

This action returns the impulse that is currently being applied at a certain CollisionPoint3D.

Return

number: the impulse magnitide.

GetContactSolver()

This action returns the container for all of the actions that can be used to bounce the two objects away from each other after they have collided.

Return

Libraries.Game.Physics.CollisionConstraint3D: a contact solver.

GetFriction()

This action returns the effective friction at the CollisionPoint3D between the two objects.

Return

number: the friction between two objects.

GetFrictionAngularComponent0A()

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

Return

Libraries.Compute.Vector3: the direction (global coordinates) at which an angular impulse should be applied.

GetFrictionAngularComponent0B()

This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the first tangent direction on object B.

Return

Libraries.Compute.Vector3: the direction (global coordinates) at which an angular impulse should be applied.

GetFrictionAngularComponent1A()

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

Return

Libraries.Compute.Vector3: the direction (global coordinates) at which an angular impulse should be applied.

GetFrictionAngularComponent1B()

This action returns the direction (global coordinates) at which an angular impulse should be applied due to the friction in the second tangent direction on object B.

Return

Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.

GetFrictionSolver()

This action returns the container for all of the actions that can be used to solve for the correct tangential impulse to simulate friction.

Return

Libraries.Game.Physics.CollisionConstraint3D: a friction solver.

GetFrictionWorldTangential0()

This action returns the first tangent direction in global coordinates.

Return

Libraries.Compute.Vector3: the first tangent direction in global coordinates.

GetFrictionWorldTangential1()

This action returns the second tangent direction in global coordinates.

Return

Libraries.Compute.Vector3: the second tangent direction in global coordinates.

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:

GetJacobianDiagonalABInverseTangent0()

This action returns a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the first tangent direction.

Return

number:

GetJacobianDiagonalABInverseTangent1()

This action returns a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the second tangent direction.

Return

number:

GetPenetration()

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

Return

number: the current penetration between the two objects.

GetPersistentLifeTime()

This action returns how many times this CollisionPersistentData has been changed by the action "PrepareConstraints" in the class CollisionSolver3D.

Return

integer: life time counter.

GetPreviousAppliedImpulse()

This action returns the impulse applied at a certain CollisionPoint3D before you calculated a new impulse to be applied at that CollisionPoint3D.

Return

number: the impulse applied at the previous time step.

GetRestitution()

This action returns the effective resistution at the CollisionPoint3D between the two objects.

Return

number: the restitution between two objects.

Reset()

This action sets all of the variables in this class to 0.

SetAccumulatedTangentImpulse0(number impulse)

This action sets the the total amount of impulse that is applied to the first tangent of collision at a certain CollisionPoint3D.

Parameters

SetAccumulatedTangentImpulse1(number impulse)

This action sets the the total amount of impulse that is applied to the second tangent of collision at a certain CollisionPoint3D.

Parameters

SetAngularComponentA(Libraries.Compute.Vector3 angularComponent)

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 angularComponent)

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 change the impulse applied at a certain CollisionPoint3D with the magnitude that you pass in.

Parameters

SetFriction(number friction)

This action sets the effective friction at the CollisionPoint3D between the two objects.

Parameters

SetFrictionAngularComponent0A(Libraries.Compute.Vector3 angularComponent)

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

Parameters

SetFrictionAngularComponent0B(Libraries.Compute.Vector3 angularComponent)

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

Parameters

SetFrictionAngularComponent1A(Libraries.Compute.Vector3 angularComponent)

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

Parameters

SetFrictionAngularComponent1B(Libraries.Compute.Vector3 angularComponent)

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

Parameters

SetFrictionWorldTangential0(Libraries.Compute.Vector3 tangential)

This action sets the first tangent direction in global coordinates.

Parameters

SetFrictionWorldTangential1(Libraries.Compute.Vector3 tangential)

This action sets the second tangent direction in global coordinates.

Parameters

SetJacobianDiagonalABInverse(number inverse)

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

SetJacobianDiagonalABInverseTangent0(number tangent)

This action sets a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the first tangent direction.

Parameters

SetJacobianDiagonalABInverseTangent1(number tangent)

This action sets a number that is used to scale the velocity of object A seen from the perspective of object B such that this relative velocity will become closer to 0 in the second tangent direction.

Parameters

SetPenetration(number penetration)

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

Parameters

SetPersistentLifeTime(integer lifeTime)

This action sets how many times this CollisionPersistentData has been changed by the action "PrepareConstraints" in the class CollisionSolver3D.

Parameters

SetPreviousAppliedImpulse(number impulse)

This action sets the impulse applied at a certain CollisionPoint3D before you calculated a new impulse to be applied at that CollisionPoint3D.

Parameters

SetRestitution(number restitution)

This action sets the effective resistution at the CollisionPoint3D between the two objects.

Parameters