Libraries.Game.Physics.CollisionSolver3D Documentation

This class contains actions that is necessary to compute how objects will react after a collision.

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 collision.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
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 LocalCollisionPoints3D.
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 taking into account of friction and normal force.
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 other.
RestitutionCurve(number relativeVelocity, number restitution)This action returns a restitution value that is correlated with the relative velocity and negated.
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.
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.
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.
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.
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 arrays.
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.

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

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns a CompareResult. The compare result is either larger if this hash code is larger than the object passed as a parameter, smaller, or equal.

Example Code

use Libraries.Language.Support.CompareResult
        Object o
        Object t
        CompareResult result = o:Compare(t)

Parameters

Return

Libraries.Language.Support.CompareResult: 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.

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 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 taking into account of friction and normal force.

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" action.

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 other.

Parameters

RestitutionCurve(number relativeVelocity, number restitution)

This action returns a restitution value that is correlated with the relative velocity and negated.

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 0.

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 0.

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 objects.

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 group.

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 arrays.

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 collision.

Parameters

Return

number: