Libraries.Game.Physics.CollisionGroup3D Documentation

When the physics algorithm groups objects together, they will be stored inside the same group. This class groups items together so that collisions between these items in this group can be treated independent of other groups. Usually, we only have one CollisionGroup3D per one physics worl

Inherits from: Libraries.Language.Object

Summary

Actions Summary Table

ActionsDescription
Add(Libraries.Interface.Events.CollisionEvent3D collision)This action records a collision that involves one of the items/joints in this CollisionGroup3D.
Add(Libraries.Game.Physics.Joints.Joint3D joint)This action adds a joint to this CollisionGroup3D.
Add(Libraries.Interface.Item3D item)This action adds a 3D object to this CollisionGroup3D.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Empty()This action sets all of the class variables to 0.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetCollision(integer index)This action returns a container for all of the properties of a collision involving one of the items/joints in this CollisionGroup3D at an array index of "integer index.
GetCollisionCount()This action returns how many collisions have been recorded that involves an item/joint that is inside this CollisionGroup3D.
GetHashCode()This action gets the hash code for an object.
GetItem(integer index)This action returns a 3D object that is inside this CollisionGroup3D at an array index of "integer index.
GetItemCount()This action returns how many 3D objects are inside this CollisionGroup3D.
GetJoint(integer index)This action returns a Joint3D that is inside this CollisionGroup3D at an array index of "integer index.
GetJointCount()This action returns how many joints are inside this CollisionGroup3D.
SetSolverInformation(Libraries.Game.Physics.CollisionSolverInformation3D solverInformation)This action connects a container for all of the constants/variables that a solver needs to this CollisionGroup3D to be used by this CollisionGroup3D.
Solve(number seconds, Libraries.Compute.Vector3 gravity, boolean requireSimulation)This action updates the positions of objects that is inside this CollisionGroup3D by solving physics.

Actions Documentation

Add(Libraries.Interface.Events.CollisionEvent3D collision)

This action records a collision that involves one of the items/joints in this CollisionGroup3D.

Parameters

Add(Libraries.Game.Physics.Joints.Joint3D joint)

This action adds a joint to this CollisionGroup3D.

Parameters

Add(Libraries.Interface.Item3D item)

This action adds a 3D object to this CollisionGroup3D.

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.

Empty()

This action sets all of the class variables to 0. This action needs to be called everytime you want to use the same CollisionGroup3D object for a different collision grou

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.

GetCollision(integer index)

This action returns a container for all of the properties of a collision involving one of the items/joints in this CollisionGroup3D at an array index of "integer index."

Parameters

Return

Libraries.Interface.Events.CollisionEvent3D: the 3D collision even

GetCollisionCount()

This action returns how many collisions have been recorded that involves an item/joint that is inside this CollisionGroup3D.

Return

integer: the number of collision count

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.

GetItem(integer index)

This action returns a 3D object that is inside this CollisionGroup3D at an array index of "integer index."

Parameters

Return

Libraries.Interface.Item3D: the 3D objec

GetItemCount()

This action returns how many 3D objects are inside this CollisionGroup3D.

Return

integer: the number of 3D object

GetJoint(integer index)

This action returns a Joint3D that is inside this CollisionGroup3D at an array index of "integer index."

Parameters

Return

Libraries.Game.Physics.Joints.Joint3D: the 3D join

GetJointCount()

This action returns how many joints are inside this CollisionGroup3D.

Return

integer: the number of joint count

SetSolverInformation(Libraries.Game.Physics.CollisionSolverInformation3D solverInformation)

This action connects a container for all of the constants/variables that a solver needs to this CollisionGroup3D to be used by this CollisionGroup3D.

Parameters

Solve(number seconds, Libraries.Compute.Vector3 gravity, boolean requireSimulation)

This action updates the positions of objects that is inside this CollisionGroup3D by solving physics.

Parameters