Libraries.Game.Graphics.ModelData.Node Documentation
Inherits from: Libraries.Language.Object
Variables Table
Variables | Description |
---|---|
Libraries.Compute.Quaternion rotation | |
Libraries.Compute.Vector3 translation | |
Libraries.Compute.Matrix4 localTransform | |
Libraries.Containers.Array parts | |
Libraries.Compute.Matrix4 globalTransform | |
Libraries.Compute.Vector3 scale | |
text id | |
boolean inheritTransform |
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
- integer index
- Libraries.Game.Graphics.ModelData.Node
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
CalculateBoundingBox()
This action will create a new BoundingBox object that contains the bounds of this node.
Return
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
- Libraries.Game.BoundingBox
- boolean applyTransform
Return
CalculateLocalTransform()
This action will calculate the node's local transform based on its translation, scale, and rotation. It then returns the local transform.
Return
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
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)
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
- Libraries.Game.BoundingBox
- boolean applyTransform
Return
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
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
GetChild(integer index)
This action returns the child stored at the given index in this node's children hierarchy.
Parameters
- integer index
Return
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
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
GetParent()
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
On this page
Variables TableAction Documentation- Add(integer index, Libraries.Game.Graphics.ModelData.Node node)
- Add(Libraries.Game.Graphics.ModelData.Node node)
- CalculateAllBoneTransforms()
- CalculateAllTransforms()
- CalculateBoneTransforms()
- CalculateBoundingBox(Libraries.Game.BoundingBox box)
- CalculateBoundingBox()
- CalculateBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)
- CalculateLocalTransform()
- CalculateTransforms()
- CalculateWorldTransform()
- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- ExtendBoundingBox(Libraries.Game.BoundingBox box, boolean applyTransform)
- ExtendBoundingBox(Libraries.Game.BoundingBox box)
- GetChild(text id)
- GetChild(integer index)
- GetChildren()
- GetChildrenCount()
- GetHashCode()
- GetImmediateChild(text id)
- GetParent()
- HasChildren()
- HasParent()
- Remove(Libraries.Game.Graphics.ModelData.Node node)
- SetParent(Libraries.Game.Graphics.ModelData.Node node)