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 object

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
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 collisio
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.
GetHashCode()This action gets the hash code for an object.
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.
PrepareConstraints(Libraries.Game.Collision.LocalCollisionPoints3D manifold, Libraries.Game.Physics.CollisionSolverInformation3D info)This action calculates the constraints between two colliding bodies that share the same LocalCollisionPoints3
Reset()This action sets the starting point of a bunch of random numbers is
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 forc
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.
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 othe
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.
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
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
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 object
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 grou
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.
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 array
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 collisio

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 collisio

Parameters

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.

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.

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

PrepareConstraints(Libraries.Game.Collision.LocalCollisionPoints3D manifold, Libraries.Game.Physics.CollisionSolverInformation3D info)

This action calculates the constraints between two colliding bodies that share the same LocalCollisionPoints3

Parameters

Reset()

This action sets the starting point of a bunch of random numbers is

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 forc

Parameters

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" actio

Parameters

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 othe

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

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

Parameters

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

Parameters

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 object

Parameters

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 grou

Parameters

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

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 array

Parameters

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 collisio

Parameters

Return

number: