Libraries.Game.Graphics.ModelData.Node Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

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

Actions Summary Table

ActionsDescription
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.
Add(Libraries.Game.Graphics.ModelData.Node node)This action will add a new node to this node's children hierarchy.
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.
CalculateBoundingBox(Libraries.Game.BoundingBox box)This action will set the given BoundingBox to contain the bounds of this node.
CalculateBoundingBox()This action will create a new BoundingBox object that contains the bounds of this node.
CalculateBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)This action will set the given BoundingBox to contain the bounds of this node.
CalculateLocalTransform()This action will calculate the node's local transform based on its translation, scale, and rotation.
CalculateTransforms()This action calculates the local and world transforms for this node.
CalculateWorldTransform()This action will calculate the node's world transform, which is the product of its local transform and its parent's world transform.
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns a CompareResult.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
ExtendBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)This action will extend the given BoundingBox to contain the bounds of this node.
ExtendBoundingBox(Libraries.Game.BoundingBox box)This action will extend the given BoundingBox to contain the bounds of this node.
GetChild(text id)This action will search the entire children hierarchy of this node, and return the child node with the given ID.
GetChild(integer index)This action returns the child stored at the given index in this node's children hierarchy.
GetChildren()This action returns an iterator containing all of the direct children of this node, i.
GetChildrenCount()This action will return the number of nodes that are direct children of this node, i.
GetHashCode()This action gets the hash code for an object.
GetImmediateChild(text id)This action will return the child node with the given ID in this node's immediate children hierarchy.
GetParent()This action returns this node's parent node.
HasChildren()This action returns whether or not this node has any children nodes that have been added to it.
HasParent()This action returns whether or not this node has a parent node.
Remove(Libraries.Game.Graphics.ModelData.Node node)This action removes a node from the children hierarchy.
SetParent(Libraries.Game.Graphics.ModelData.Node node)This action will set the parent of this node.

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

Return

Libraries.Language.Support.CompareResult: 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.

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

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

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.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

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

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