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
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.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
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.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
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
- number impulse: The impulse applied at the first tangent.
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
- number impulse: The impulse applied at the second tangent.
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
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
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
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
SetAppliedImpulse(number impulse)
This action change the impulse applied at a certain CollisionPoint3D with the magnitude that you pass in.
Parameters
- number impulse: The magnitude of the impulse applied.
SetFriction(number friction)
This action sets the effective friction at the CollisionPoint3D between the two objects.
Parameters
- number friction: The friction between 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.
Parameters
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
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
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
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
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
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
- Libraries.Compute.Vector3: The direction (global coordinates) at which an angular impulse should be applied.
SetFrictionWorldTangential0(Libraries.Compute.Vector3 tangential)
This action sets the first tangent direction in global coordinates.
Parameters
- Libraries.Compute.Vector3: The first tangent direction in global coordinates.
SetFrictionWorldTangential1(Libraries.Compute.Vector3 tangential)
This action sets the second tangent direction in global coordinates.
Parameters
- Libraries.Compute.Vector3: 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. These impulses will be applied along the collision normal between the two objects.
Parameters
- number inverse
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
- number tangent
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
- number tangent
SetPenetration(number penetration)
This action records what the current penetration between the two objects is.
Parameters
- number penetration: The current penetration between the two objects.
SetPersistentLifeTime(integer lifeTime)
This action sets how many times this CollisionPersistentData has been changed by the action "PrepareConstraints" in the class CollisionSolver3D.
Parameters
- integer lifeTime
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
- number impulse: The impulse applied at the previous time step.
SetRestitution(number restitution)
This action sets the effective resistution at the CollisionPoint3D between the two objects.
Parameters
- number restitution: The restitution between two objects.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetAccumulatedTangentImpulse0()
- GetAccumulatedTangentImpulse1()
- GetAngularComponentA()
- GetAngularComponentB()
- GetAppliedImpulse()
- GetContactSolver()
- GetFriction()
- GetFrictionAngularComponent0A()
- GetFrictionAngularComponent0B()
- GetFrictionAngularComponent1A()
- GetFrictionAngularComponent1B()
- GetFrictionSolver()
- GetFrictionWorldTangential0()
- GetFrictionWorldTangential1()
- GetHashCode()
- GetJacobianDiagonalABInverse()
- GetJacobianDiagonalABInverseTangent0()
- GetJacobianDiagonalABInverseTangent1()
- GetPenetration()
- GetPersistentLifeTime()
- GetPreviousAppliedImpulse()
- GetRestitution()
- Reset()
- SetAccumulatedTangentImpulse0(number impulse)
- SetAccumulatedTangentImpulse1(number impulse)
- SetAngularComponentA(Libraries.Compute.Vector3 angularComponent)
- SetAngularComponentB(Libraries.Compute.Vector3 angularComponent)
- SetAppliedImpulse(number impulse)
- SetFriction(number friction)
- SetFrictionAngularComponent0A(Libraries.Compute.Vector3 angularComponent)
- SetFrictionAngularComponent0B(Libraries.Compute.Vector3 angularComponent)
- SetFrictionAngularComponent1A(Libraries.Compute.Vector3 angularComponent)
- SetFrictionAngularComponent1B(Libraries.Compute.Vector3 angularComponent)
- SetFrictionWorldTangential0(Libraries.Compute.Vector3 tangential)
- SetFrictionWorldTangential1(Libraries.Compute.Vector3 tangential)
- SetJacobianDiagonalABInverse(number inverse)
- SetJacobianDiagonalABInverseTangent0(number tangent)
- SetJacobianDiagonalABInverseTangent1(number tangent)
- SetPenetration(number penetration)
- SetPersistentLifeTime(integer lifeTime)
- SetPreviousAppliedImpulse(number impulse)
- SetRestitution(number restitution)