Adds a child to the current Node, removing it from its current parent.
A child can only have a single Parent
The Node to add as a child to this Node.
true if successful, false if failed
Adds an item to the list.
The node hierarchy to add to the list.
Adds an item to the list.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
The node hierarchy to add to the list.
The item padding within the list.
Adds an item to the list.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
The node hierarchy to add to the list.
The item padding within the list.
The item alignment.
Adds an item to the list at the specific index.
If the index is out of bounds, the item will be added to the last index.
index at which item will be placed
The node hierarchy to add to the list.
Adds an item to the list at the specified index.
If the index is out of bounds, the item will be added to the last index. When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
index at which item will be placed
The node hierarchy to add to the list.
The item padding within the list.
Adds an item to the list at the specified index.
If the index is out of bounds, the item will be added to the last index. When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
index at which item will be placed
The node hierarchy to add to the list.
The item padding within the list.
The item alignment.
Adds a client-side callback event to the move list. When the event is reached during the animation playback, the ServerEventCallback function set in Client will be called with an event TransformAnimationEventData.
Adds this node to the specified node layer. Nodes can be members of multiple layers.
Clears all event sounds.
Clears the sound for the specifiec event.
The sound event to clear.
Adds a delay to the current move sequence.
How long to delay, in seconds.
default = 0
which animation track to add the delay to.
Find the first named child in the node hierarchy, including this Node.
Does a breadth-first search of the child node hierarchy for the specified named Node and will return the first encountered match, or nullptr if no named Node found.
The name to search for.
Does a breadth-first search of the child node hierarchy for the specified Node type.
The type of Node to find in the child hierarchy.
default = false
Flag to indicate if the child node must be the exact type or can be derived from the type (default false).
default = false
Flag to indicate if the search should include this Node (default false).
A vector of Node pointers containing the results.
Searches up the tree parentage for the specific Node type.
The type of Node to find in the parent hierarchy.
default = false
Flag to indicate if the parent node must be the exact type or can be derived from the type (default false).
The parent node, if found, null if not found.
Get the AABB of this Node's full hierarchy, including all descendants, with all Node transforms applied.
The returned AABB encompasses this Node and all descendant Nodes and is aligned to the coordinate system the Node resides within, i.e. the Node's parent coordinate system. Note, the returned AABB is not guaranteed to be the minimal, tightest fitting AABB to encompass the Node's descendant hierarchy, but it will fully enlose the Node's hierarchy.
The bounding box
Gets the UiNode's self alignment relative to Node position.
The alignment.
Returns the anchor position of the node.
The anchor position.
Gets the n'th child from this Node's children
The index of the child.
Child Node
Gets the number of immediate children this Node has
Count of immediate child Nodes
Get the Cached Prism Transform of this Node
Transform Matrix
Get the Cached World Transform of this Node
Transform Matrix
Get the cursor hover state for this Node.
the cursor state.
Gets the default item alignment within the list.
The default item alignment.
Gets the default padding for items within the linear layout.
the padding.
Gets the enabled state
the enabled state of the UiNode.
Gets whether this UiNode passes events through or not.
TRUE if pass through set, FALSE if not.
Gets the Sound for the specified event, if set. If no sound ID set for the specified event, nullptr will be returned.
The sound event to get the Sound for.
Pointer to the Sound object associated with the sound ID for the event or nullptr if no sound set.
Gets the sound ID to be played for the UI event.
the sound event.
the name of the sound to play for the sound event.
Gets the focus state
the focus state of the UiNode.
Gets whether the gravity well is enabled.
Gets the gravity well properties for this UiNode.
the GravityWellProperties.
Return whether or not this node, and its children, should be included in the bounds
bounds hidden or not
Gets the hover state
the hover state of the UiNode.
Gets the n'th item in the list.
If the index is out of bounds, nullptr will be returned.
The index of the item.
Item node pointer.
Gets the item alignment at the specified index.
The index of the item in the list.
Reference to receive the setting.
Gets the item alignment.
Pointer to the item Node.
Reference to receive the setting.
Gets the number of items in the list.
Item count.
Gets the item padding at the specified index.
The index of the item in the list.
Reference to receive the setting.
Gets the item padding.
Pointer to the item Node.
Reference to receive the setting.
Get the local AABB of this Node only, not including children, aligned to this Node's local coordinate system.
A local AABB of math::AABB::EMPTY indicates the Node either has no visual information or that local AABB is not supported for the Node.
Note: The local AABB for ModelNodes is currently not supported and will report math::AABB::EMPTY.
The bounding box.
Get the Local Position of this Node
Position
Get the Local Rotation of this Node
Rotation
Get the Local Scale of this Node
Scale
Get the Local Transform of this Node
Transform Matrix
Get the name of the Node.
This call returns EMPTY_STRING if the Node's name has not been set.
The name of the Node, if set.
Gets the Node Id of this Node
Every Node is assigned a unique ID per Prism
Node id of the current Node
Gets the OnActivateResponse properties of this UiNode.
Gets the horizontal or vertical orientation of this linear layout.
The Orientation.
Gets this Node's immediate parent
Parent Node, nullptr = no parent
When parented to a parents bone with setParentedBoneName
Parents bone name we are attached to
Returns the id of the prism the node belongs to.
the prism id (0 = invalid prism)
Get the Prism Position of this Node
Position
Gets the rendering layer of this UiNode.
Returns the PhysicsRigidBody attached to the node, if the node is participating in the physics system.
the rigid body
Gets the root node of the node tree this node belongs to.
The root node, or nullptr if none.
Gets the requested size of the layout area.
the requested size.
Gets whether this layout skips invisible items or not.
true if the layout skips invisible items, false if not.
Get the World Position of this Node
Position
Checks to see if node subscribes to the specified node layer.
The layer to test if this node is a member of.
True if this node subscribes to the specified layer.
Determines if this Node is within the subtree.
true if this Node is within the subtree, false if not.
Returns the skip raycast state of the node.
True if the node is skipped during raycasting.
Returns true if this node should handle trigger presses directly.
true if this node will handle trigger presses directly when focused, false if trigger press will instead enter prism placement mode.
Returns whether this Node's visibility is inherited by its children or not.
True if the Node's visiblity is inherited.
Returns the visibility state of the node. Note that only the local state is checked, the effect of a parent's visibility is ignored.
True if the Node is visible.
Returns the visibility of the Node in the hierarchy based on self visibility and any potential inherited visibility.
True if the Node is visible in the Prism.
The on click Event.
This event is dispatched when the element has been activated (clicked, selected).
The on deleted Event.
This event is dispatched when the element is about to be deleted.
The on disabled Event.
This event is dispatched when the element has been disabled.
The on enabled Event.
This event is dispatched when the element has been enabled.
The on focus gained Event.
This event is dispatched when the element has gained focus.
The on focus input Event.
This event is dispatched when the focused element should process input.
The on focus lost Event.
This event is dispatched when the element has lost focus.
The on hover enter Event.
This event is dispatched when the cursor starts hovering over the UiNode.
The on hover exit Event.
This event is dispatched when the cursor stops hovering over the UiNode.
The on hover move Event.
This event is dispatched when the cursor is hovering over the UiNode.
The on long press Event.
This event is dispatched when the element has been held down on.
The on pressed Event.
This event is dispatched when the element is pressed.
The on released Event.
This event is dispatched when the element is released (after being pressed).
The on update Event.
This event is dispatched during element update.
Remove a child from the current Node
The child Node to remove.
Removes this node from the specified node layer.
The layer this node will be removed from.
Removes the n'th item from the list.
The returned Node hierarchy will be orphaned (no longer attached to the scene graph) and must be handled by the caller.
If the index is out of bounds, nothing happens.
The index of the item.
Item node pointer.
Removes the item from the list.
The item Node hierarchy will be orphaned (no longer attached to the scene graph) and must be handled by the caller.
If the item is not found in the layout, nothing happens.
The item to remove.
TRUE if the removal is successful, FALSE otherwise.
Replaces the n'th item in the list.
The returned Node hierarchy will be orphaned (no longer attached to the scene graph) and must be handled by the caller.
If the index is out of bounds, nothing happens.
The index of the item to be replaced.
The pointer for the new new item replacing the Node in the n'th position
replaced item's pointer.
Replaces an existing item in the list with a new item
If either of the Node's are invalid - Null or not contained in the list - nothing happens.
The pointer for the list item you would like to replace
The pointer for the new item replacing the oldItem in the list
true if the newItem has successfully replaced the oldItem
Sets the UiNodes's self alignment relative to Node position.
Alignment is defined as what side the Node position is in relative to the planar, XY element bounds. A horizontal left alignment would result in the node position being on the left side of the bounds area. A vertical top alignment would result in the node position being on the top side of the bounds area.
The alignment.
Sets the anchor position of the Node's transform. Rotations, scaling, and translations of the transform will take place around this point. Changing the anchor point will recalculate the transform to the new anchor point.
Anchor position. This is relative to the default 0,0,0 position of the transform.
Set the cursor hover state for this Node.
Setting this will set the cursor state when this Node or any descendant Nodes, that are not explicitly set, are hovered over.
The cursor state
Sets the default item alignment within the grid.
Default item alignments are TOP_LEFT.
This will be set for any new items that are added that aren't explicitly specifying alignment. The alignment of each individual item can still be set later if needed. When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
The default item alignment.
Sets the default padding of each item within the grid, in scene units. The default is no padding (0,0,0,0).
The padding order is: top, right, bottom, left
This will be set for any new items that are added that aren't explicitly specifying padding. The padding of each individual item can still be set later if needed. When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
the padding vector for the 4 sides.
Sets the enabled state
Disabled UiNodes don't send out certain input events, such as OnPress, OnRelease, OnActivate, etc.
The enabled state of the UiNode.
Sets whether this UiNode passes events through to the next UiNode parent or processes them internally.
The UI events that will be passed through are the cursor interaction events like onHoverEnter, onHoverExit, and onActivate.
the event pass through flag.
Sets all descendant UiNodes to either pass through events or not.
This call is handy if this UiNode potentially has many internal UiNode children in the Node hierarchy but wants all input events to pass through them to be processed and dispatched by this UiNode parent.
the event pass through flag.
Sets the sound ID to be played for the UI event.
the sound event.
the name of the sound to play for the sound event.
Sets whether the gravity well is enabled.
Sets the gravity well properties for this UiNode.
The default gravity well properties for a UiNode are a sharp cornered rectangular BoundaryShape that matches the UiNode's local AABB that snaps to center of the shape. This should be sufficient in many situations and all that needs to be done to turn on the gravity well for the UiNode is to setGravityWellEnabled(true).
The default BoundaryShape size is (0,0), which instructs the UiNode to use its own local AABB for the shape size and offset. Setting a size greater than 0 in either X or Y will turn off the automatic use of local AABB and will use the specified size and offset of the BoundaryShape instead. Setting the size back to (0,0) will once again inform the UiNode to use the local AABB for shape parameters.
the GravityWellProperties.
Set whether or not this node, and its children, should be included in the bounds
flag indicating hide status
Sets the item alignment at the specified index.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
The index of the item in the list.
The item alignment.
Sets the item alignment.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
Pointer to the item Node.
The item alignment.
Sets the item padding at the specified index.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
The index of the item in the list.
The item padding.
Sets the item padding.
When the size of the linear layout is set to zero in a dimension, it grows in that dimension to fit the largest content and its padding, if any. When the size is set to greater than zero, the content might scale down to fit in the room left by the padding. In this case, alignment is ignored.
Pointer to the item Node.
The item padding.
Set the local position of this Node
new position
Set the local rotation of this Node
new rotation
Set the local scale of this Node
new scale
Set the local transform of this Node
transform matrix
Set the name of the Node
By default a Node has no name.
The new name of the Node.
true if the name of the Node was successfully set, false otherwise.
Sets the OnActivateResponse properties of this UiNode.
the OnActivateResponse.
Sets the horizontal or vertical orientation of this linear layout.
The default orientation is Vertical.
The Orientation.
Set the bone in the parent by name that this child will attach to This node must have a parent and the parent must be of type ModelNode.
bone name to attach to
true if successful, false if failed
Sets Custom RenderLayer on this UiNode. Which internally sets the render layer on all RenderNode Children
Of type uint16_t. Value will be clamped to kRenderingLayerMAX = 999, if more.
Note: Please use, "render::RenderingLayer" enum to set layers.
for eg. RenderNode->setRenderingLayer(render::RenderingLayer::kHUDLayer);
or you can also send in the layer value as well
eg. RenderNode->setRenderingLayer(static_cast
You can also create your own custom layering by using existing layers and your own.
eg. uint16_t customHUDLayer1 = static_cast
Sets Custom RenderLayer on this UiNode. Which internally sets the render layer on all RenderNode Children
Of type uint16_t. Value will be clamped to kRenderingLayerMAX = 999, if more.
Sets the requested size of the layout's rectangular area in scene units.
Setting a size of zero or less in either the X or Y dimension indicates the layout should grow to fit content in that dimension. Setting a size greater than zero, on the other hand, sets the layout size explicitly.
The default setting is (0,0), which will grow to fit content in both directions.
Currently, content will not be clipped if it is larger than the requested layout size (content will overflow).
the requested size of the layout area.
Skips invisble items.
Setting this value true will cause the layout to skip over any invisible items. The layout will check the visibility of each top-level item Node added and if invisible, along with inherited visibility, will skip that Node for layout.
Flag indicating whether to skip invis items or not.
Sets the skip raycast state of the node.
Raycast skip flag.
default = false
Flag to also set the raycast state of any children
Sets whether this node should handle trigger presses directly.
true if this node should handle trigger presses directly when focused, false if trigger press should instead enter prism placement mode.
Flags that the visibility state of this node should be inherited by its children. This does not change a child's visibility set by setVisible. A visibility of false will take precedence over a visibility of true. The tables below show the draw result for various combinations of node visibility and inheritance.
visible inherit drawn
node : false true no
child : true x no
visible inherit drawn
node : false false no
child : true x yes
visible inherit drawn
node : true true yes
child : false x no
visible inherit drawn
node : true false yes
child : false x no
Flag that this node's children should inherit its visibility.
Sets the visibility state of the node.
Visibility flag
default = false
Flag to also set the visibility state of any children
Stops all current property animations.
Swap two items in the list.
If either of the indices are out of bounds, nothing happens.
a valid index in the list
a valid index in the list
true if the two nodes at index1 and index2 have been sucessfully swapped
Swap two items in the list.
If the Node's are the same or invalid - Null or not contained in the list - nothing happens.
The pointer for a valid item in the list
The pointer for a valid item in the list
true if item1 and item2 have successfully been swapped
Updates the UiNode layout based on current component attributes.
Creates a new UiLinearLayout
The prism to create this node for.
New UiLinearLayout on success; nullptr on failure.
Client-side only: this static function is used to delete a node with its Prism's deleteNode function.
is the node to delete
Requests focus for a UiNode.
Pointer to the UiNode that needs focus.
Generated using TypeDoc
UiLinearLayout provides for automatic layout of elements in a horizontal or vertical orientation.