Libraries.Game.Physics.CollisionSolverInformation3D Documentation

This class records the values that is used by actions in the CollisionSolver3D class.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
CacheFriendly()This action returns whether you've turned on a faster mode for the solver.
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.
GetDamping()This action returns a number that will scale the impulse that will be applied to the objects to separate two objects in collision.
GetErp()This action returns the Baumgarte factor that is used to make sure we can surely push two colliding objects apart.
GetErp2()This action returns a factor to multiply to the position error in another action that solves the position error first so that the two objects won't penetrate each other.
GetHashCode()This action gets the hash code for an object.
GetLinearSlop()This action returns the likely difference between the penetration in the next time step (if we don't correct the current penetration) and the current penetration.
GetNumberIterations()This action returns the maximum number of repeats a solver can take to find a solution.
GetSplitImpulsePenetrationThreshold()This action returns the maximum penetration two objects can have that we consider as acceptable for simulation.
GetTimeStep()This action returns the fraction of a physics step that we should update the physics calculation.
GetWarmStartingFactor()This action returns a number that will be multiplied to the impulse that the current object is experiencing at a certain CollisionPoint3D to guess an impulse that will separate the two objects involved in a collision.
IsWarmStarting()This action returns whether you have an initial guess of the impulse that will separate the two objects that is involved in a collision apart.
RandomizeOrder()This action returns an indicator to the CollisionSolver3D to solve the constraints in random order because solving in random order can improve stability.
Set(Libraries.Game.Physics.CollisionSolverInformation3D information)This action sets the current CollisionSolverInformation3D using another CollisionSolverInformation3D.
SetCacheFriendly(boolean flag)This action sets whether you want a faster mode for the solver or not.
SetDamping(number damping)This action sets a number that will scale the impulse that will be applied to the objects to separate two objects in collision.
SetErp(number erp)This action sets the Baumgarte factor that is used to make sure we can surely push two colliding objects apart.
SetErp2(number erp2)This action sets a factor to multiply to the position error in another action that solves the position error first so that the two objects won't penetrate each other.
SetLinearSlop(number linearSlop)This action sets the likely difference between the penetration in the next time step (if we don't correct the current penetration) and the current penetration.
SetNumberIterations(integer iterations)This action sets the maximum number of repeats a solver can take to find a solution.
SetRandomizeOrder(boolean flag)This action sets the indicator to the CollisionSolver3D to solve the constraints in random order because solving in random order can improve stability.
SetSplitImpulse(boolean flag)This action sets whether you want to solve for the position error first before trying to find the right impulse to separate the objects.
SetTimeStep(number timestep)This action sets the fraction of a physics step that we should update the physics calculation.
SetWarmStarting(boolean flag)This action allows you to choose to have an initial guess or not of the impulse that will separate the two objects that is involved in a collision apart.
SetWarmStartingFactor(number factor)This action sets a number that will be multiplied to the impulse that the current object is experiencing at a certain CollisionPoint3D to guess an impulse that will separate the two objects involved in a collision.
SplitImpulse()This action returns whether you want to solve for the position error first before trying to find the right impulse to separate the objects.

Actions Documentation

CacheFriendly()

This action returns whether you've turned on a faster mode for the solver.

Return

boolean:

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 (smaller)

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(t)

Parameters

Return

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

GetDamping()

This action returns a number that will scale the impulse that will be applied to the objects to separate two objects in collision. If the damping number is less than 1, that means we are allowing some error in the solution of the impulse.

Return

number:

GetErp()

This action returns the Baumgarte factor that is used to make sure we can surely push two colliding objects apart.

Return

number:

GetErp2()

This action returns a factor to multiply to the position error in another action that solves the position error first so that the two objects won't penetrate each other. Then, the other action will also calculate the necessary impulse so that we can get the objects to move with the velocity that we want.

Return

number:

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.

GetLinearSlop()

This action returns the likely difference between the penetration in the next time step (if we don't correct the current penetration) and the current penetration.

Return

number:

GetNumberIterations()

This action returns the maximum number of repeats a solver can take to find a solution.

Return

integer:

GetSplitImpulsePenetrationThreshold()

This action returns the maximum penetration two objects can have that we consider as acceptable for simulation.

Return

number:

GetTimeStep()

This action returns the fraction of a physics step that we should update the physics calculation. Time is between 0 and 1.

Return

number:

GetWarmStartingFactor()

This action returns a number that will be multiplied to the impulse that the current object is experiencing at a certain CollisionPoint3D to guess an impulse that will separate the two objects involved in a collision.

Return

number:

IsWarmStarting()

This action returns whether you have an initial guess of the impulse that will separate the two objects that is involved in a collision apart.

Return

boolean:

RandomizeOrder()

This action returns an indicator to the CollisionSolver3D to solve the constraints in random order because solving in random order can improve stability.

Return

boolean:

Set(Libraries.Game.Physics.CollisionSolverInformation3D information)

This action sets the current CollisionSolverInformation3D using another CollisionSolverInformation3D.

Parameters

SetCacheFriendly(boolean flag)

This action sets whether you want a faster mode for the solver or not.

Parameters

SetDamping(number damping)

This action sets a number that will scale the impulse that will be applied to the objects to separate two objects in collision. If the damping number is less than 1, that means we are allowing some error in the solution of the impulse.

Parameters

SetErp(number erp)

This action sets the Baumgarte factor that is used to make sure we can surely push two colliding objects apart.

Parameters

SetErp2(number erp2)

This action sets a factor to multiply to the position error in another action that solves the position error first so that the two objects won't penetrate each other. Then, the other action will also calculate the necessary impulse so that we can get the objects to move with the velocity that we want.

Parameters

SetLinearSlop(number linearSlop)

This action sets the likely difference between the penetration in the next time step (if we don't correct the current penetration) and the current penetration.

Parameters

SetNumberIterations(integer iterations)

This action sets the maximum number of repeats a solver can take to find a solution.

Parameters

SetRandomizeOrder(boolean flag)

This action sets the indicator to the CollisionSolver3D to solve the constraints in random order because solving in random order can improve stability.

Parameters

SetSplitImpulse(boolean flag)

This action sets whether you want to solve for the position error first before trying to find the right impulse to separate the objects. By setting this to "true," another action in CollisionSolver3D will also use "GetErp2" action from this class.

Parameters

SetTimeStep(number timestep)

This action sets the fraction of a physics step that we should update the physics calculation. Time is between 0 and 1.

Parameters

SetWarmStarting(boolean flag)

This action allows you to choose to have an initial guess or not of the impulse that will separate the two objects that is involved in a collision apart.

Parameters

SetWarmStartingFactor(number factor)

This action sets a number that will be multiplied to the impulse that the current object is experiencing at a certain CollisionPoint3D to guess an impulse that will separate the two objects involved in a collision.

Parameters

SplitImpulse()

This action returns whether you want to solve for the position error first before trying to find the right impulse to separate the objects.

Return

boolean: