Libraries.Game.Collision.LocalCollisionPoints3D Documentation

This class records at max 4 collision points during one collision between two objects. When more collision points are calculated by the program, the program will keep the collision points that causes the deepest penetration. This class is also known as the persistent manifol

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer MAX_COLLISION_POINTS

Actions Summary Table

ActionsDescription
AddCollisionPoint(Libraries.Game.Collision.CollisionPoint3D newPoint)This action adds a new collision point to this LocalCollisionPoints3D.
ClearCollisionPoints()This action deletes all of the collision points that is stored inside this LocalCollisionPoints3D clas
ClearPersistentData(Libraries.Game.Collision.CollisionPoint3D point)This action clears all of the data about forces, impulses, etc.
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.
GetBody0()This action returns the first 3D object that is involved in the collision recorded in this LocalCollisionPoints3D.
GetBody1()This action returns the second 3D object that is involved in the collision recorded in this LocalCollisionPoints3D.
GetCacheEntry(Libraries.Game.Collision.CollisionPoint3D newPoint)This action returns the index of a collision point stored inside this LocalCollisionPoints3D that is closest to the "CollisionPoint3D newPoint" that you passed in.
GetCollisionBreakingThreshold()This action returns the maximum distance between the two objects for the two objects to still be considered as touching or colliding.
GetCollisionPoint(integer index)This action returns a specific collision point based on the array index that you passed in.
GetHashCode()This action gets the hash code for an object.
GetIndexA()This action returns what index this LocalCollisionPoints3D resides in an array if this LocalCollisionPoints3D was ever push into an array of LocalCollisionPoints3Ds.
GetPointCount()This action returns number of collision points being recorded by this LocalCollisionPoints3D.
RefreshCollisionPoints(Libraries.Game.Collision.PhysicsPosition3D transformA, Libraries.Game.Collision.PhysicsPosition3D transformB)This action changes the global coordinates of the collision points on objects A and B.
RemoveCollisionPoint(integer index)This action deletes a collision point from this LocalCollisionPoints3D.
ReplaceCollisionPoint(Libraries.Game.Collision.CollisionPoint3D newPoint, integer insertIndex)This action switches out a collision point stored at the "insertIndex" of this LocalCollisionPoints3D with a "newPoint" that you passed in.
Set(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)This action records the 3D objects that are involved in the collision into this LocalCollisionPoints3D class and reset the number of collision points recorded to 0 and the index of this LocalCollisionPoints3D (if there is ever an array of LocalCollisionPoints3D) to 0.
SetBodies(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)This action records the 3D objects that are involved in the collision into this LocalCollisionPoints3D class.
SetIndexA(integer index)This action sets what index this LocalCollisionPoints3D resides in an array when this LocalCollisionPoints3D is inserted into an array of LocalCollisionPoints3D.

Actions Documentation

AddCollisionPoint(Libraries.Game.Collision.CollisionPoint3D newPoint)

This action adds a new collision point to this LocalCollisionPoints3D.

Parameters

Return

integer:

ClearCollisionPoints()

This action deletes all of the collision points that is stored inside this LocalCollisionPoints3D clas

ClearPersistentData(Libraries.Game.Collision.CollisionPoint3D point)

This action clears all of the data about forces, impulses, etc. applied at a collision point.

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.

GetBody0()

This action returns the first 3D object that is involved in the collision recorded in this LocalCollisionPoints3D.

Return

Libraries.Interface.Item3D: the first 3D object that is involved in the collision recorded in this LocalCollisionPoints3

GetBody1()

This action returns the second 3D object that is involved in the collision recorded in this LocalCollisionPoints3D.

Return

Libraries.Interface.Item3D: the second 3D object that is involved in the collision recorded in this LocalCollisionPoints3

GetCacheEntry(Libraries.Game.Collision.CollisionPoint3D newPoint)

This action returns the index of a collision point stored inside this LocalCollisionPoints3D that is closest to the "CollisionPoint3D newPoint" that you passed in.

Parameters

Return

integer: the index of a collision point stored inside this LocalCollisionPoints3D that is closest to the "CollisionPoint3D newPoint

GetCollisionBreakingThreshold()

This action returns the maximum distance between the two objects for the two objects to still be considered as touching or colliding.

Return

number: 0

GetCollisionPoint(integer index)

This action returns a specific collision point based on the array index that you passed in.

Parameters

Return

Libraries.Game.Collision.CollisionPoint3D: the specific collision point based on the array index that you passed i

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 what index this LocalCollisionPoints3D resides in an array if this LocalCollisionPoints3D was ever push into an array of LocalCollisionPoints3Ds.

Return

integer: what index this LocalCollisionPoints3D resides in an arra

GetPointCount()

This action returns number of collision points being recorded by this LocalCollisionPoints3D.

Return

integer: the number of collision points being recorded by this LocalCollisionPoints3

RefreshCollisionPoints(Libraries.Game.Collision.PhysicsPosition3D transformA, Libraries.Game.Collision.PhysicsPosition3D transformB)

This action changes the global coordinates of the collision points on objects A and B.

Parameters

RemoveCollisionPoint(integer index)

This action deletes a collision point from this LocalCollisionPoints3D.

Parameters

ReplaceCollisionPoint(Libraries.Game.Collision.CollisionPoint3D newPoint, integer insertIndex)

This action switches out a collision point stored at the "insertIndex" of this LocalCollisionPoints3D with a "newPoint" that you passed in.

Parameters

Set(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)

This action records the 3D objects that are involved in the collision into this LocalCollisionPoints3D class and reset the number of collision points recorded to 0 and the index of this LocalCollisionPoints3D (if there is ever an array of LocalCollisionPoints3D) to 0.

Parameters

SetBodies(Libraries.Interface.Item3D body0, Libraries.Interface.Item3D body1)

This action records the 3D objects that are involved in the collision into this LocalCollisionPoints3D class.

Parameters

SetIndexA(integer index)

This action sets what index this LocalCollisionPoints3D resides in an array when this LocalCollisionPoints3D is inserted into an array of LocalCollisionPoints3D.

Parameters