Libraries.Game.Collision.CollisionPoint3D Documentation

This class stores one of the points of contact during a collision. This class is used by LocalCollisionPoints3D.

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
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.
GetAppliedImpulse()This action returns the amount of linear impulse that is applied to this CollisionPoint3D.
GetAppliedImpulseLateralA()This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object A.
GetAppliedImpulseLateralB()This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object B.
GetCombinedFriction()This action returns the friction between the surfaces of objects A and B.
GetCombinedRestitution()This action returns the restitution between the surfaces of objects A and B.
GetDistance()This action gets the distance between objects A and B.
GetHashCode()This action gets the hash code for an object.
GetIndexA()This action returns a number that is not 0 if object A is also getting split into triangle shapes.
GetIndexB()This action returns a number that is not 0 if object B is also getting split into triangle shapes.
GetLateralFrictionDirectionA()This action returns which direction the friction impulse is applied to object A.
GetLateralFrictionDirectionB()This action returns which direction the friction impulse is applied to object B.
GetLifeTime()This action returns how many physics simulation iterations that this CollisionPoint3D has been in.
GetLocalPointA()This action returns the contact point on object A in local coordinates to A.
GetLocalPointB()This action returns the contact point on object B in local coordinates to B.
GetPartIDA()This action returns a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
GetPartIDB()This action returns a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
GetPersistentData()This action returns a data holder, which is the class CollisionPersistentData, that records all of the forces, impulses, friction, penetration, and other information about this CollisionPoint3D.
GetPositionWorldOnA(Libraries.Compute.Vector3 out)This action returns the contact point on object A in world coordinates.
GetPositionWorldOnB(Libraries.Compute.Vector3 out)This action returns the contact point on object B in world coordinates.
GetWorldNormalOnB()This action returns the normal vector from B to A that an impulse will be applied to to resolve the collision.
GetWorldPositionOnA()This action returns the contact point on object A in world coordinates but also allows you to change the contact point on object A in world coordinates stored in this class is you used actions such as SetX() on the returned point.
GetWorldPositionOnB()This action returns the contact point on object B in world coordinates but also allows you to change the contact point on object B in world coordinates stored in this class is you used actions such as SetX() on the returned point.
Initialize(Libraries.Compute.Vector3 pointA, Libraries.Compute.Vector3 pointB, Libraries.Compute.Vector3 normal, number distance)This action changes the values stored inside this CollisionPoint3D class using the points passed in.
IsLateralFrictionInitialized()This action returns true if the friction at this CollisionPoint3D is set.
Set(Libraries.Game.Collision.CollisionPoint3D point)This action sets the current CollisionPoint3D using another CollisionPoint3D.
SetAppliedImpulse(number impulse)This action sets the amount of linear impulse that is applied to this CollisionPoint3D.
SetAppliedImpulseLateralA(number lateral)This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object A.
SetAppliedImpulseLateralB(number lateral)This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object B.
SetCombinedFriction(number friction)This action sets the friction between the surfaces of objects A and B.
SetCombinedRestitution(number restitution)This action sets the restitution between the surfaces of objects A and B.
SetDistance(number distance)This action sets the distance between objects A and B.
SetIndexA(integer index)This action sets a number that is not 0 if object A is also getting split into triangle shapes.
SetIndexB(integer index)This action returns a number that is not 0 if object B is also getting split into triangle shapes.
SetLateralFrictionDirectionA(Libraries.Compute.Vector3 direction)This action sets which direction the friction impulse is applied to object A.
SetLateralFrictionDirectionB(Libraries.Compute.Vector3 direction)This action sets which direction the friction impulse is applied to object B.
SetLateralFrictionInitialized(boolean flag)This action either turns on or off the friction at this CollisionPoint3D.
SetLifeTime(integer lifeTime)This action sets how many physics simulation iterations that this CollisionPoint3D has been in.
SetLocalPointA(Libraries.Compute.Vector3 point)This action sets the contact point on object A in local coordinates to A.
SetLocalPointB(Libraries.Compute.Vector3 point)This action sets the contact point on object B in local coordinates to B.
SetPartIDA(integer id)This action sets a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
SetPartIDB(integer id)This action sets a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.
SetPersistentData(Libraries.Game.Physics.CollisionPersistentData data)This action sets a data holder, which is the class CollisionPersistentData.
SetWorldNormalOnB(Libraries.Compute.Vector3 normal)This action sets the normal vector from B to A that an impulse will be applied to to resolve the collision.
SetWorldPositionOnA(Libraries.Compute.Vector3 position)This action sets the contact point on object A in world coordinates.
SetWorldPositionOnB(Libraries.Compute.Vector3 position)This action sets the contact point on object B in world coordinates.

Actions Documentation

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.

GetAppliedImpulse()

This action returns the amount of linear impulse that is applied to this CollisionPoint3D.

Return

number: the amount of linear impulse that is applied to this CollisionPoint3D.

GetAppliedImpulseLateralA()

This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object A.

Return

number: the impulse that is applied to simulate friction to object A.

GetAppliedImpulseLateralB()

This action returns the impulse that is applied to simulate friction at this CollisionPoint3D to object B.

Return

number: the impulse that is applied to simulate friction to object B.

GetCombinedFriction()

This action returns the friction between the surfaces of objects A and B.

Return

number: the friction between the surfaces of objects A and B.

GetCombinedRestitution()

This action returns the restitution between the surfaces of objects A and B.

Return

number: the restitution between the surfaces of objects A and B.s

GetDistance()

This action gets the distance between objects A and B.

Return

number: the distance between objects A and B.

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.

GetIndexA()

This action returns a number that is not 0 if object A is also getting split into triangle shapes. The number that this action returns identifies which triangle of object A we are referring to.

Return

integer: the index of object A.

GetIndexB()

This action returns a number that is not 0 if object B is also getting split into triangle shapes. The number that this action returns identifies which triangle of object B we are referring to.

Return

integer: the index of object B.

GetLateralFrictionDirectionA()

This action returns which direction the friction impulse is applied to object A.

Return

Libraries.Compute.Vector3: which direction the friction impulse is applied to object A.

GetLateralFrictionDirectionB()

This action returns which direction the friction impulse is applied to object B.

Return

Libraries.Compute.Vector3: which direction the friction impulse is applied to object B.

GetLifeTime()

This action returns how many physics simulation iterations that this CollisionPoint3D has been in.

Return

integer: number of iterations.

GetLocalPointA()

This action returns the contact point on object A in local coordinates to A.

Return

Libraries.Compute.Vector3: the contact point on object A in local coordinates to A.

GetLocalPointB()

This action returns the contact point on object B in local coordinates to B.

Return

Libraries.Compute.Vector3: the contact point on object B in local coordinates to B.

GetPartIDA()

This action returns a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker. The number that is action returns would be used to identify which convex piece of object A we are referring to.

Return

integer: id of object A

GetPartIDB()

This action returns a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker. The number that is action returns would be used to identify which convex piece of object B we are referring to.

Return

integer: id of object B.

GetPersistentData()

This action returns a data holder, which is the class CollisionPersistentData, that records all of the forces, impulses, friction, penetration, and other information about this CollisionPoint3D.

Return

Libraries.Game.Physics.CollisionPersistentData: a data holder.

GetPositionWorldOnA(Libraries.Compute.Vector3 out)

This action returns the contact point on object A in world coordinates.

Parameters

Return

Libraries.Compute.Vector3: the contact point on object A in world coordinates.

GetPositionWorldOnB(Libraries.Compute.Vector3 out)

This action returns the contact point on object B in world coordinates.

Parameters

Return

Libraries.Compute.Vector3: the contact point on object B in world coordinates.

GetWorldNormalOnB()

This action returns the normal vector from B to A that an impulse will be applied to to resolve the collision.

Return

Libraries.Compute.Vector3: the normal vector from B to A.

GetWorldPositionOnA()

This action returns the contact point on object A in world coordinates but also allows you to change the contact point on object A in world coordinates stored in this class is you used actions such as SetX() on the returned point.

Return

Libraries.Compute.Vector3: the contact point on object A in world coordinates.

GetWorldPositionOnB()

This action returns the contact point on object B in world coordinates but also allows you to change the contact point on object B in world coordinates stored in this class is you used actions such as SetX() on the returned point.

Return

Libraries.Compute.Vector3: the contact point on object B in world coordinates.

Initialize(Libraries.Compute.Vector3 pointA, Libraries.Compute.Vector3 pointB, Libraries.Compute.Vector3 normal, number distance)

This action changes the values stored inside this CollisionPoint3D class using the points passed in.

Parameters

IsLateralFrictionInitialized()

This action returns true if the friction at this CollisionPoint3D is set. This action is used in the CollisionSolver3D class.

Return

boolean: true if the friction at this CollisionPoint3D is set

Set(Libraries.Game.Collision.CollisionPoint3D point)

This action sets the current CollisionPoint3D using another CollisionPoint3D.

Parameters

SetAppliedImpulse(number impulse)

This action sets the amount of linear impulse that is applied to this CollisionPoint3D.

Parameters

SetAppliedImpulseLateralA(number lateral)

This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object A.

Parameters

SetAppliedImpulseLateralB(number lateral)

This action sets the impulse that is applied to simulate friction at this CollisionPoint3D to object B.

Parameters

SetCombinedFriction(number friction)

This action sets the friction between the surfaces of objects A and B.

Parameters

SetCombinedRestitution(number restitution)

This action sets the restitution between the surfaces of objects A and B.

Parameters

SetDistance(number distance)

This action sets the distance between objects A and B.

Parameters

SetIndexA(integer index)

This action sets a number that is not 0 if object A is also getting split into triangle shapes.

Parameters

SetIndexB(integer index)

This action returns a number that is not 0 if object B is also getting split into triangle shapes.

Parameters

SetLateralFrictionDirectionA(Libraries.Compute.Vector3 direction)

This action sets which direction the friction impulse is applied to object A.

Parameters

SetLateralFrictionDirectionB(Libraries.Compute.Vector3 direction)

This action sets which direction the friction impulse is applied to object B.

Parameters

SetLateralFrictionInitialized(boolean flag)

This action either turns on or off the friction at this CollisionPoint3D.

Parameters

SetLifeTime(integer lifeTime)

This action sets how many physics simulation iterations that this CollisionPoint3D has been in. When this CollisionPoint3D is no longer a collision point between objects A and B, its life time will degrade to 0. This action is used by the action "RefreshCollisionPoints" inside the LocalCollisionPoints3D class.

Parameters

SetLocalPointA(Libraries.Compute.Vector3 point)

This action sets the contact point on object A in local coordinates to A.

Parameters

SetLocalPointB(Libraries.Compute.Vector3 point)

This action sets the contact point on object B in local coordinates to B.

Parameters

SetPartIDA(integer id)

This action sets a number that is not 0 if object A is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.

Parameters

SetPartIDB(integer id)

This action sets a number that is not 0 if object B is an convex piece of a concave shape because we have to split the concave shape into convex pieces in order to make the calculation for the collision between two objects quicker.

Parameters

SetPersistentData(Libraries.Game.Physics.CollisionPersistentData data)

This action sets a data holder, which is the class CollisionPersistentData.

Parameters

SetWorldNormalOnB(Libraries.Compute.Vector3 normal)

This action sets the normal vector from B to A that an impulse will be applied to to resolve the collision.

Parameters

SetWorldPositionOnA(Libraries.Compute.Vector3 position)

This action sets the contact point on object A in world coordinates.

Parameters

SetWorldPositionOnB(Libraries.Compute.Vector3 position)

This action sets the contact point on object B in world coordinates.

Parameters