Libraries.Game.Physics.CollisionSolverInformation3D Documentation
This class records the values that is used by actions in the CollisionSolver3D class.
Inherits from: Libraries.Language.Object
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.
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)
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.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
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
- boolean flag
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
- number damping
SetErp(number erp)
This action sets the Baumgarte factor that is used to make sure we can surely push two colliding objects apart.
Parameters
- number erp
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
- number erp2
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
- number linearSlop
SetNumberIterations(integer iterations)
This action sets the maximum number of repeats a solver can take to find a solution.
Parameters
- integer iterations
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
- boolean flag
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
- boolean flag
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
- number timestep
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
- boolean flag
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
- number factor
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:
On this page
Variables TableAction Documentation- CacheFriendly()
- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetDamping()
- GetErp()
- GetErp2()
- GetHashCode()
- GetLinearSlop()
- GetNumberIterations()
- GetSplitImpulsePenetrationThreshold()
- GetTimeStep()
- GetWarmStartingFactor()
- IsWarmStarting()
- RandomizeOrder()
- Set(Libraries.Game.Physics.CollisionSolverInformation3D information)
- SetCacheFriendly(boolean flag)
- SetDamping(number damping)
- SetErp(number erp)
- SetErp2(number erp2)
- SetLinearSlop(number linearSlop)
- SetNumberIterations(integer iterations)
- SetRandomizeOrder(boolean flag)
- SetSplitImpulse(boolean flag)
- SetTimeStep(number timestep)
- SetWarmStarting(boolean flag)
- SetWarmStartingFactor(number factor)
- SplitImpulse()