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 vector

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
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 directio
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 directio
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
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 directio
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 directio
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 an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle

Parameters

Return

integer: 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(

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 tangen

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 tangen

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 applie

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 applie

GetAppliedImpulse()

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

Return

number: the impulse magnitid

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 solve

GetFriction()

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

Return

number: the friction between two object

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 applie

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 applie

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 applie

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 applie

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 solve

GetFrictionWorldTangential0()

This action returns the first tangent direction in global coordinates.

Return

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

GetFrictionWorldTangential1()

This action returns the second tangent direction in global coordinates.

Return

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

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 object

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 directio

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 directio

Return

number:

GetPenetration()

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

Return

number: the current penetration between the two object

GetPersistentLifeTime()

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

Return

integer: life time counte

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 ste

GetRestitution()

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

Return

number: the restitution between two object

Reset()

This action sets all of the variables in this class to

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 object

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 directio

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 directio

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