Libraries.Game.Graphics.ModelData.Node Documentation

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
Libraries.Compute.Vector3 translation
boolean inheritTransform
Libraries.Containers.Array parts
Libraries.Compute.Matrix4 globalTransform
Libraries.Compute.Vector3 scale
Libraries.Compute.Matrix4 localTransform
text id
Libraries.Compute.Quaternion rotation

Actions Documentation

Add(integer index, Libraries.Game.Graphics.ModelData.Node node)

This action will insert a new node in this node's children hierarchy at the given index.

Parameters

Add(Libraries.Game.Graphics.ModelData.Node node)

This action will add a new node to this node's children hierarchy.

Parameters

CalculateAllBoneTransforms()

This action calculates the bone transforms of this node and for its entire children hiearchy.

CalculateAllTransforms()

This action calculates the local and world transforms of this node and for its entire children hiearchy.

CalculateBoneTransforms()

This action calculates the bone transforms for this node. This does not calculate the bone transforms of children nodes -- to do that, use CalculateAllBoneTransforms().

CalculateBoundingBox(Libraries.Game.BoundingBox box)

This action will set the given BoundingBox to contain the bounds of this node. Any data that was in the BoundingBox before this action will be overwritten.

Parameters

Return

Libraries.Game.BoundingBox:

CalculateBoundingBox()

This action will create a new BoundingBox object that contains the bounds of this node.

Return

Libraries.Game.BoundingBox:

CalculateBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)

This action will set the given BoundingBox to contain the bounds of this node. The boolean parameter will determine whether to apply the node's global transform to the BoundingBox. If the value is true, the transform will be applied.

Parameters

Return

Libraries.Game.BoundingBox:

CalculateLocalTransform()

This action will calculate the node's local transform based on its translation, scale, and rotation. It then returns the local transform.

Return

Libraries.Compute.Matrix4:

CalculateTransforms()

This action calculates the local and world transforms for this node. This does not calculate the transforms of children nodes -- to do that, use CalculateAllTransforms().

CalculateWorldTransform()

This action will calculate the node's world transform, which is the product of its local transform and its parent's world transform. It then returns the world transform. In the case that this node has no parent, the local transform will be returned.

Return

Libraries.Compute.Matrix4:

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

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

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)

ExtendBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)

This action will extend the given BoundingBox to contain the bounds of this node. The boolean parameter dictates whether or not to use the global transform - if the boolean is true, the bounds will be offset by the global transform. If it is false, the global transform will be ignored.

Parameters

Return

Libraries.Game.BoundingBox:

ExtendBoundingBox(Libraries.Game.BoundingBox box)

This action will extend the given BoundingBox to contain the bounds of this node. The global transform of this node will be applied when calculating the bounds.

Parameters

Return

Libraries.Game.BoundingBox:

GetChild(text id)

This action will search the entire children hierarchy of this node, and return the child node with the given ID. The case of the ID is ignored. If no node is found, undefined is returned.

Parameters

  • text id

Return

Libraries.Game.Graphics.ModelData.Node:

GetChild(integer index)

This action returns the child stored at the given index in this node's children hierarchy.

Parameters

  • integer index

Return

Libraries.Game.Graphics.ModelData.Node:

GetChildren()

This action returns an iterator containing all of the direct children of this node, i.e., they have been specifically added to this node.

Return

Libraries.Containers.Iterator:

GetChildrenCount()

This action will return the number of nodes that are direct children of this node, i.e., they have been specifically added to this node.

Return

integer:

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()

GetImmediateChild(text id)

This action will return the child node with the given ID in this node's immediate children hierarchy. The case of the ID is ignored. If no node is found, undefined is returned.

Parameters

  • text id

Return

Libraries.Game.Graphics.ModelData.Node:

GetParent()

This action returns this node's parent node.

Return

Libraries.Game.Graphics.ModelData.Node:

HasChildren()

This action returns whether or not this node has any children nodes that have been added to it.

Return

boolean:

HasParent()

This action returns whether or not this node has a parent node.

Return

boolean:

Remove(Libraries.Game.Graphics.ModelData.Node node)

This action removes a node from the children hierarchy.

Parameters

Return

boolean:

SetParent(Libraries.Game.Graphics.ModelData.Node node)

This action will set the parent of this node. This information is automatically set when the node is added to another node.

Parameters