Libraries.Game.Physics.CollisionGroup3D Documentation
This class groups items/joints together so that collisions between these items/joints in this group can be treated differently.
Inherits from: Libraries.Language.Object
Summary
Actions Summary Table
Actions | Description |
---|---|
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 a CompareResult. |
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 computes how objects inside this CollisionGroup3D will react after a collision with the help of the action "SolveGroupSetup" in the class CollisionSolver3D. |
Actions Documentation
Add(Libraries.Interface.Events.CollisionEvent3D collision)
This action records a collision that involves one of the items/joints in this CollisionGroup3D.
Parameters
- Libraries.Interface.Events.CollisionEvent3D: The collision event to add.
Add(Libraries.Game.Physics.Joints.Joint3D joint)
This action adds a joint to this CollisionGroup3D.
Parameters
- Libraries.Game.Physics.Joints.Joint3D: The joint to add.
Add(Libraries.Interface.Item3D item)
This action adds a 3D object to this CollisionGroup3D.
Parameters
- Libraries.Interface.Item3D: The 3D object to add.
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
- Libraries.Language.Object: The object to compare to.
Return
Libraries.Language.Support.CompareResult: The Compare result, Smaller, Equal, or Larger.
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.
Example Code
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
Parameters
- Libraries.Language.Object: The to be compared.
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
- integer index: The index of interest.
Return
Libraries.Interface.Events.CollisionEvent3D: the 3D collision event.
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 counts.
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
- integer index: The index of interest.
Return
Libraries.Interface.Item3D: the 3D object.
GetItemCount()
This action returns how many 3D objects are inside this CollisionGroup3D.
Return
integer: the number of 3D objects.
GetJoint(integer index)
This action returns a Joint3D that is inside this CollisionGroup3D at an array index of "integer index."
Parameters
- integer index: The index of interest.
Return
Libraries.Game.Physics.Joints.Joint3D: the 3D joint.
GetJointCount()
This action returns how many joints are inside this CollisionGroup3D.
Return
integer: the number of joint counts.
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
- Libraries.Game.Physics.CollisionSolverInformation3D: The data holder for information of the solver.
Solve(number seconds, Libraries.Compute.Vector3 gravity, boolean requireSimulation)
This action computes how objects inside this CollisionGroup3D will react after a collision with the help of the action "SolveGroupSetup" in the class CollisionSolver3D.
Parameters
- number seconds: Amount of time to simulate.
- Libraries.Compute.Vector3: The gravitational force.
- boolean requireSimulation: Whether this object will react to forces or sleep.