Libraries.Game.Physics.CollisionSolver3D Documentation
This class contains actions that is necessary to compute how objects will react after a collision or after the objects have been constrained by a joint. The objects' reaction to physics is simulated by applying impulses to the objects based on collision and constraints on the objects.
Inherits from: Libraries.Language.Object
Actions Documentation
AddFrictionConstraint(Libraries.Compute.Vector3 normalAxis, integer solverBodyIDA, integer solverBodyIDB, integer frictionIndex, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, number relaxation)
This action makes a solver to take into account of the effects of friction during a collision.
Parameters
- Libraries.Compute.Vector3
- integer solverBodyIDA
- integer solverBodyIDB
- integer frictionIndex
- Libraries.Game.Collision.CollisionPoint3D
- Libraries.Compute.Vector3
- Libraries.Compute.Vector3
- Libraries.Interface.Item3D
- Libraries.Interface.Item3D
- number relaxation
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)
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()
InitializeSolverItem(Libraries.Game.Physics.SolverItem3D solverItem, Libraries.Interface.Item3D originalItem)
This action stores properties inside an Item3D class into a SolverItem3D so that you can access these properties quicker from the SolverItem3D.
Parameters
- Libraries.Game.Physics.SolverItem3D: The SolverItem3D that will store the properties.
- Libraries.Interface.Item3D: The 3D object from which properties will be extracted from.
PrepareConstraints(Libraries.Game.Collision.LocalCollisionPoints3D manifold, Libraries.Game.Physics.CollisionSolverInformation3D info)
This action calculates the constraints between two colliding bodies that share the same LocalCollisionPoints3D.
Parameters
Reset()
This action sets the starting point of a bunch of random numbers is 0.
ResolveSingleCollisionCombined(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo)
This action finds the impulse that should be applied to resolve collision for two objects by taking into account of friction and normal force.
Parameters
- Libraries.Game.Physics.SolverItem3D
- Libraries.Game.Physics.SolverItem3D
- Libraries.Game.Physics.SolverConstraint3D
- Libraries.Game.Physics.CollisionSolverInformation3D
Return
number:
ResolveSingleFriction(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo, number appliedNormalImpulse)
This action finds the frictional impulse that should be applied at a point to separate the two colliding objects. This action is used by the "SolveGroupIterations" action and the "SolveFriction" action.
Parameters
- Libraries.Game.Physics.SolverItem3D
- Libraries.Game.Physics.SolverItem3D
- Libraries.Game.Physics.SolverConstraint3D
- Libraries.Game.Physics.CollisionSolverInformation3D
- number appliedNormalImpulse
Return
number:
ResolveSplitPenetrationImpulse(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo)
This action finds the impulse to stop the two 3D objects from penetrating each other.
Parameters
RestitutionCurve(number relativeVelocity, number restitution)
This action returns a restitution value that is correlated with the relative velocity for a more realistic simulation of physics.
Parameters
- number relativeVelocity: The relative velocity between two objects.
- number restitution: The original restitution.
Return
number:
Solve(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
This action finds the impulse that should be applied to resolve collision for two objects without taking into account of friction such that the impulse can only be greater than 0.
Parameters
- Libraries.Interface.Item3D
- Libraries.Interface.Item3D
- Libraries.Game.Collision.CollisionPoint3D
- Libraries.Game.Physics.CollisionSolverInformation3D
- integer iteration
Return
number:
SolveCombinedContactFriction(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
This action finds the impulse that should be applied to resolve collision for two objects taking into account of friction and normal force such that the impulse can only be greater than or equal to 0.
Parameters
- Libraries.Interface.Item3D
- Libraries.Interface.Item3D
- Libraries.Game.Collision.CollisionPoint3D
- Libraries.Game.Physics.CollisionSolverInformation3D
- integer iteration
Return
number:
SolveFriction(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
This action finds the frictional impulse that should be applied at a point to separate the two colliding objects.
Parameters
- Libraries.Interface.Item3D
- Libraries.Interface.Item3D
- Libraries.Game.Collision.CollisionPoint3D
- Libraries.Game.Physics.CollisionSolverInformation3D
- integer iteration
Return
number:
SolveGroup(Libraries.Containers.Array<Libraries.Interface.Item3D> bodies, integer numBodies, Libraries.Containers.Array<Libraries.Game.Collision.LocalCollisionPoints3D> manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array<Libraries.Game.Physics.Joints.Joint3D> joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal)
This action solves the collision for a collision group.
Parameters
- Libraries.Containers.Array
- integer numBodies
- Libraries.Containers.Array
- integer manifold_offset
- integer numManifolds
- Libraries.Containers.Array
- integer joints_offset
- integer numJoints
- Libraries.Game.Physics.CollisionSolverInformation3D
Return
number:
SolveGroupInternal(Libraries.Containers.Array<Libraries.Interface.Item3D> bodies, integer numBodies, Libraries.Containers.Array<Libraries.Game.Collision.LocalCollisionPoints3D> manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array<Libraries.Game.Physics.Joints.Joint3D> joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal)
This action is used to solve collision of objects inside a CollisionGroup3D. This action is used by the action "SolveGroup."
Parameters
- Libraries.Containers.Array
- integer numBodies
- Libraries.Containers.Array
- integer manifold_offset
- integer numManifolds
- Libraries.Containers.Array
- integer joints_offset
- integer numJoints
- Libraries.Game.Physics.CollisionSolverInformation3D
Return
number:
SolveGroupIterations(Libraries.Containers.Array<Libraries.Interface.Item3D> bodies, integer numBodies, Libraries.Containers.Array<Libraries.Game.Collision.LocalCollisionPoints3D> manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array<Libraries.Game.Physics.Joints.Joint3D> joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal)
This action is used by the action "SolveGroupInternal" to randomize the collision points and the constraints at these collision points in arrays.
Parameters
- Libraries.Containers.Array
- integer numBodies
- Libraries.Containers.Array
- integer manifold_offset
- integer numManifolds
- Libraries.Containers.Array
- integer joints_offset
- integer numJoints
- Libraries.Game.Physics.CollisionSolverInformation3D
Return
number:
SolveGroupSetup(Libraries.Containers.Array<Libraries.Interface.Item3D> bodies, integer numBodies, Libraries.Containers.Array<Libraries.Game.Collision.LocalCollisionPoints3D> manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array<Libraries.Game.Physics.Joints.Joint3D> joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal)
This action computes the constraints of objects inside a CollisionGroup3D during a collision.
Parameters
- Libraries.Containers.Array
- integer numBodies
- Libraries.Containers.Array
- integer manifold_offset
- integer numManifolds
- Libraries.Containers.Array
- integer joints_offset
- integer numJoints
- Libraries.Game.Physics.CollisionSolverInformation3D
Return
number:
On this page
Variables TableAction Documentation- AddFrictionConstraint(Libraries.Compute.Vector3 normalAxis, integer solverBodyIDA, integer solverBodyIDB, integer frictionIndex, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Compute.Vector3 relativePosition1, Libraries.Compute.Vector3 relativePosition2, Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, number relaxation)
- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetHashCode()
- InitializeSolverItem(Libraries.Game.Physics.SolverItem3D solverItem, Libraries.Interface.Item3D originalItem)
- PrepareConstraints(Libraries.Game.Collision.LocalCollisionPoints3D manifold, Libraries.Game.Physics.CollisionSolverInformation3D info)
- Reset()
- ResolveSingleCollisionCombined(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo)
- ResolveSingleFriction(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo, number appliedNormalImpulse)
- ResolveSplitPenetrationImpulse(Libraries.Game.Physics.SolverItem3D body1, Libraries.Game.Physics.SolverItem3D body2, Libraries.Game.Physics.SolverConstraint3D contactConstraint, Libraries.Game.Physics.CollisionSolverInformation3D solverInfo)
- RestitutionCurve(number relativeVelocity, number restitution)
- Solve(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
- SolveCombinedContactFriction(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
- SolveFriction(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1, Libraries.Game.Collision.CollisionPoint3D cp, Libraries.Game.Physics.CollisionSolverInformation3D info, integer iteration)
- SolveGroup(Libraries.Containers.Array
bodies, integer numBodies, Libraries.Containers.Array manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal) - SolveGroupInternal(Libraries.Containers.Array
bodies, integer numBodies, Libraries.Containers.Array manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal) - SolveGroupIterations(Libraries.Containers.Array
bodies, integer numBodies, Libraries.Containers.Array manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal) - SolveGroupSetup(Libraries.Containers.Array
bodies, integer numBodies, Libraries.Containers.Array manifoldPtr, integer manifold_offset, integer numManifolds, Libraries.Containers.Array joints, integer joints_offset, integer numJoints, Libraries.Game.Physics.CollisionSolverInformation3D infoGlobal)