Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D Documentation
The DynamicBoundingVolumeTreeNode3D represents a node in the DynamicBoundingVolumeTree3D class. A DynamicBoundingVolumeTreeNode3D represents a BoundingBox3D which represents an item in the game. This node stores its parent in the tree as well as any children of the node. Additionally, the node's height in the tree and ID in integer are stored. By default, the node's treeParent, itemNode, leftChild, and rightChild are undefined. The node id and height are, by default, -1. This class is used internally by DynamicBoundingVolumeTree3D.
Inherits from: Libraries.Language.Object
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.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetBoundingBox()
This action returns the BoundingBox3D which this node represents. This action is used internally.
Return
Libraries.Game.BoundingBox: The BoundingBox3D represented by this tree node.
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetHeight()
This action returns the integer height of this node in the DynamicBoundingVolumeTree3D. This action is used internally.
Return
integer: The integer height of this tree node.
GetID()
This action gets the id of this node. This action is used internally.
Return
integer: The id of this node.
GetItemNode()
This action returns the Item3DNode in the Dynamic Bounding Volume Tree Node (3D), which has among its data members a BoundingBox3D and an Item3D. This action is used internally.
Return
Libraries.Game.Collision.Item3DNode: The item3DNode in this tree node.
GetLeftChild()
This action returns the DynamicBoundingVolumeTreeNode3D which is the left child of this node. This action is used internally.
Return
Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D left child of this node.
GetParent()
This action returns the DynamicBoundingVolumeTreeNode3D which is the parent of this node. This action is used internally.
Return
Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D parent of this node.
GetRightChild()
This action returns the DynamicBoundingVolumeTreeNode3D which is the right child of this node. This action is used internally.
Return
Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D right child of this node.
IsLeaf()
This action returns true if this node is a leaf (i.e. has no children) and false if this node has children. Attribute Returns boolean The boolean that indicates whether or not this node is a leaf
Return
boolean:
SetBoundingBox(Libraries.Game.BoundingBox boundingBox)
This action sets the BoundingBox3D which this node is to represent. This action is used internally.
Parameters
- Libraries.Game.BoundingBox: The BoundingBox3D to be represented by this tree node.
SetHeight(integer height)
This action sets the height of the Dynamic Bounding Volume Tree Node (3D) in the DynamicBoundingVolumeTree3D. This action is used internally.
Parameters
- integer height: The integer height at which this node should be.
SetID(integer id)
This action sets the id of the Dynamic Bounding Volume Tree Node (3D). This action is used internally.
Parameters
- integer id: The integer that will be the node id.
SetItemNode(Libraries.Game.Collision.Item3DNode itemNode)
This action sets the Item3DNode of the Dynamic Bounding Volume Tree Node (3D), which has among its data members a BoundingBox3D and an Item3D. This action is used internally.
Parameters
- Libraries.Game.Collision.Item3DNode: The item3DNode that this node will represent.
SetLeftChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D leftChild)
This action sets the DynamicBoundingVolumeTreeNode3D which is to be the left child of this node. This action is used internally.
Parameters
- Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D which is to be the left child of this node.
SetParent(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D treeParent)
This action sets the DynamicBoundingVolumeTreeNode3D which is to be the parent of this node. This action is used internally.
Parameters
- Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D which is to be the parent of this node.
SetRightChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D rightChild)
This action sets the DynamicBoundingVolumeTreeNode3D which is to be the right child of this node. This action is used internally.
Parameters
- Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D: The DynamicBoundingVolumeTreeNode3D which is to be the right child of this node.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetBoundingBox()
- GetHashCode()
- GetHeight()
- GetID()
- GetItemNode()
- GetLeftChild()
- GetParent()
- GetRightChild()
- IsLeaf()
- SetBoundingBox(Libraries.Game.BoundingBox boundingBox)
- SetHeight(integer height)
- SetID(integer id)
- SetItemNode(Libraries.Game.Collision.Item3DNode itemNode)
- SetLeftChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D leftChild)
- SetParent(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D treeParent)
- SetRightChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D rightChild)