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

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.
GetBoundingBox()This action returns the BoundingBox3D which this node represents.
GetHashCode()This action gets the hash code for an object.
GetHeight()This action returns the integer height of this node in the DynamicBoundingVolumeTree3D.
GetID()This action gets 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.
GetLeftChild()This action returns the DynamicBoundingVolumeTreeNode3D which is the left child of this node.
GetParent()This action returns the DynamicBoundingVolumeTreeNode3D which is the parent of this node.
GetRightChild()This action returns the DynamicBoundingVolumeTreeNode3D which is the right child of this node.
IsLeaf()This action returns true if this node is a leaf (i.
SetBoundingBox(Libraries.Game.BoundingBox boundingBox)This action sets the BoundingBox3D which this node is to represent.
SetHeight(integer height)This action sets the height of the Dynamic Bounding Volume Tree Node (3D) in the DynamicBoundingVolumeTree3D.
SetID(integer id)This action sets the id of the Dynamic Bounding Volume Tree Node (3D).
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.
SetLeftChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D leftChild)This action sets 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.
SetRightChild(Libraries.Game.Collision.DynamicBoundingVolumeTreeNode3D rightChild)This action sets the DynamicBoundingVolumeTreeNode3D which is to be the right child of this node.

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.

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.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

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

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

SetID(integer id)

This action sets the id of the Dynamic Bounding Volume Tree Node (3D). This action is used internally.

Parameters

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

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

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

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