## Libraries.Game.Graphics.ModelData.Node Documentation

*Inherits from: *Libraries.Language.Object

## Summary

### Variable Summary Table

Variables | Description |
---|---|

Libraries.Compute.Vector3 scale | |

Libraries.Compute.Vector3 translation | |

boolean inheritTransform | |

Libraries.Compute.Matrix4 globalTransform | |

Libraries.Compute.Matrix4 localTransform | |

text id | |

Libraries.Containers.Array parts | |

Libraries.Compute.Quaternion rotation |

### Actions Summary Table

Actions | Description |
---|---|

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

Add(Libraries.Game.Graphics.ModelData.Node node) | This action will add a new node to this node's children hierarch |

CalculateAllBoneTransforms() | This action calculates the bone transforms of this node and for its entire children hiearch |

CalculateAllTransforms() | This action calculates the local and world transforms of this node and for its entire children hiearch |

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

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 an integer. |

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

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

HasChildren() | This action returns whether or not this node has any children nodes that have been added to i |

HasParent() | This action returns whether or not this node has a parent nod |

Remove(Libraries.Game.Graphics.ModelData.Node node) | This action removes a node from the children hierarch |

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 inde

#### Parameters

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

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

#### Parameters

### CalculateAllBoneTransforms()

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

### CalculateAllTransforms()

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

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

#### Parameters

#### Return

### CalculateBoundingBox()

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

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

#### Parameters

#### Return

### CalculateLocalTransform()

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

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

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

**Example Code**

```
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smalle
```

#### Parameters

- Libraries.Language.Object: The object to compare to.

#### 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(
```

#### Parameters

- Libraries.Language.Object: The to be compared.

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

#### Parameters

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

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

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

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

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

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

#### Parameters

#### Return

Libraries.Game.Graphics.ModelData.Node:

### GetParent()

This action returns this node's parent nod

#### Return

Libraries.Game.Graphics.ModelData.Node:

### HasChildren()

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

#### Return

boolean:

### HasParent()

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

#### Return

boolean:

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

This action removes a node from the children hierarch

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