UiGridLayout

lumin.ui. UiGridLayout

UiGridLayout provides for automatic layout of elements
in a grid.

The UiGridLayout will grow to accommodate items as they
are added based on the row and column settings. Setting
the number of rows or columns to be non-zero will lock
that grid dimension to the provided value while the other
dimension grows to fit content. If both are set to be
non-zero, the columns will take precedence.

Constructor

new UiGridLayout()

Extends

Methods

addChild(a_pChild) → {boolean}

Inherited From:

Adds a child to the current Node, removing it from its current parent.

A child can only have a single Parent

Parameters:
Name Type Description
a_pChild lumin.Node

The Node to add as a child to this Node.

Returns:

true if successful, false if failed

Type
boolean

addItem(item, padding, alignment)

Adds an item to the grid.

Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.
Also for the right and the bottom alignments
to kick in, the containing cell should be, respectively,
wider and higher than its content.

Parameters:
Name Type Description
item lumin.TransformNode

The node hierarchy to add to the grid.

padding vec4

The item padding within the grid.

alignment lumin.ui.Alignment

The item alignment.

addItem(item)

Adds an item to the grid.

Parameters:
Name Type Description
item lumin.TransformNode

The node hierarchy to add to the grid.

addItem(item, padding)

Adds an item to the grid.

Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.

Parameters:
Name Type Description
item lumin.TransformNode

The node hierarchy to add to the grid.

padding vec4

The item padding within the grid.

addItemAt(index, item, padding, alignment)

Adds an item to the grid at the specified index.

If the index is out of bounds, the item will be added
to the last index.
Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.
Also for the right and the bottom alignments
to kick in, the containing cell should be, respectively,
wider and higher than its content.

Parameters:
Name Type Description
index number

index at which item will be placed

item lumin.TransformNode

The node hierarchy to add to the grid.

padding vec4

The item padding within the grid.

alignment lumin.ui.Alignment

The item alignment.

addItemAt(index, item, padding)

Adds an item to the grid at the specified index.

If the index is out of bounds, the item will be added
to the last index.
Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.

Parameters:
Name Type Description
index number

index at which item will be placed

item lumin.TransformNode

The node hierarchy to add to the grid.

padding vec4

The item padding within the grid.

addItemAt(index, item)

Adds an item to the grid at the specific index.

If the index is out of bounds, the item will be added
to the last index.

Parameters:
Name Type Description
index number

index at which item will be placed

item lumin.TransformNode

The node hierarchy to add to the grid.

addMoveCallback(trackopt)

Inherited From:

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.

Parameters:
Name Type Attributes Default Description
track number <optional>
0

addToLayer(a_layer)

Inherited From:

Adds this node to the specified node layer. Nodes can be members of multiple layers.

Parameters:
Name Type Description
a_layer number

clearAllEventSounds()

Inherited From:

Clears all event sounds.

clearEventSound(event)

Inherited From:

Clears the sound for the specifiec event.

Parameters:
Name Type Description
event lumin.ui.SoundEvent

The sound event to clear.

(static) Create(prism) → {lumin.ui.UiGridLayout}

Creates a new UiGridLayout.

Parameters:
Name Type Description
prism lumin.Prism

The prism to create this node for.

Returns:

New UiGridLayout on success; nullptr on failure.

Type
lumin.ui.UiGridLayout

delayMove(durationSecs, trackopt)

Inherited From:

Adds a delay to the current move sequence.

Parameters:
Name Type Attributes Default Description
durationSecs number

How long to delay, in seconds.

track number <optional>
0

which animation track to add the delay to.

findChild(name) → {lumin.Node}

Inherited From:

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.

Parameters:
Name Type Description
name string

The name to search for.

Returns:
Type
lumin.Node

findChildren(a_type, a_bExactTypeopt, a_bIncludeSelfopt) → {Array.<lumin.Node>}

Inherited From:

Does a breadth-first search of the child node hierarchy
for the specified Node type.

Parameters:
Name Type Attributes Default Description
a_type number

The type of Node to find in the child hierarchy.

a_bExactType boolean <optional>
false

Flag to indicate if the child node must be the exact type or can be derived from the type (default false).

a_bIncludeSelf boolean <optional>
false

Flag to indicate if the search should include this Node (default false).

Returns:

A vector of Node pointers containing the results.

Type
Array.<lumin.Node>

findParent(a_type, a_bExactTypeopt) → {lumin.Node}

Inherited From:

Searches up the tree parentage for the specific Node type.

Parameters:
Name Type Attributes Default Description
a_type number

The type of Node to find in the parent hierarchy.

a_bExactType boolean <optional>
false

Flag to indicate if the parent node must be the exact type or can be derived from the type (default false).

Returns:

The parent node, if found, null if not found.

Type
lumin.Node

getAABB() → {lumin.math.AABB}

Inherited From:

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.

Returns:

The bounding box

Type
lumin.math.AABB

getAlignment() → {lumin.ui.Alignment}

Inherited From:

Gets the UiNode's self alignment relative to Node position.

Returns:

The alignment.

Type
lumin.ui.Alignment

getAnchorPosition() → {vec3}

Inherited From:

Returns the anchor position of the node.

Returns:

The anchor position.

Type
vec3

getChild(a_iIndex) → {lumin.Node}

Inherited From:

Gets the n'th child from this Node's children

Parameters:
Name Type Description
a_iIndex number

The index of the child.

Returns:

Child Node

Type
lumin.Node

getChildCount() → {number}

Inherited From:

Gets the number of immediate children this Node has

Returns:

Count of immediate child Nodes

Type
number

getColumns() → {number}

Gets the number of columns set for the grid.

Returns:

the number of set columns.

Type
number

getCurrentColumns() → {number}

Gets the current calculated columns based on row and column
settings and the number of items currently added.

Returns:
Type
number

getCurrentPrismTransform() → {mat4}

Inherited From:

Get the Cached Prism Transform of this Node

Returns:

Transform Matrix

Type
mat4

getCurrentRows() → {number}

Gets the current calculated rows based on row and column
settings and the number of items currently added.

Returns:
Type
number

getCurrentWorldTransform() → {mat4}

Inherited From:

Get the Cached World Transform of this Node

Returns:

Transform Matrix

Type
mat4

getCursorHoverState() → {lumin.CursorHoverState}

Inherited From:

Get the cursor hover state for this Node.

Returns:

the cursor state.

Type
lumin.CursorHoverState

getDefaultItemAlignment() → {lumin.ui.Alignment}

Gets the default item alignment within the list.

Returns:

The default item alignment.

Type
lumin.ui.Alignment

getDefaultItemPadding() → {vec4}

Gets the default padding for items within the linear layout.

Returns:

the padding.

Type
vec4

getEnabled() → {boolean}

Inherited From:

Gets the enabled state

Returns:

the enabled state of the UiNode.

Type
boolean

getEventPassThrough() → {boolean}

Inherited From:

Gets whether this UiNode passes events through or not.

Returns:

TRUE if pass through set, FALSE if not.

Type
boolean

getEventSound(event) → {lumin.Sound}

Inherited From:

Gets the Sound for the specified event, if set. If no sound ID set for
the specified event, nullptr will be returned.

Parameters:
Name Type Description
event lumin.ui.SoundEvent

The sound event to get the Sound for.

Returns:

Pointer to the Sound object associated with the sound ID for the event or nullptr if no sound set.

Type
lumin.Sound

getEventSoundID(event) → {string}

Inherited From:

Gets the sound ID to be played for the UI event.

Parameters:
Name Type Description
event lumin.ui.SoundEvent

the sound event.

Returns:

the name of the sound to play for the sound event.

Type
string

getFocused() → {boolean}

Inherited From:

Gets the focus state

Returns:

the focus state of the UiNode.

Type
boolean

getGravityWellEnabled() → {boolean}

Inherited From:

Gets whether the gravity well is enabled.

Returns:
Type
boolean

getGravityWellProperties() → {lumin.ui.GravityWellProperties}

Inherited From:

Gets the gravity well properties for this UiNode.

Returns:

the GravityWellProperties.

Type
lumin.ui.GravityWellProperties

getHovered() → {boolean}

Inherited From:

Gets the hover state

Returns:

the hover state of the UiNode.

Type
boolean

getItem(row, col) → {lumin.TransformNode}

Gets the item at the row and col position.

If the row and column are out of bounds, nullptr will be returned.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

Returns:

Item node pointer.

Type
lumin.TransformNode

getItemAlignment(item) → {lumin.ui.Alignment}

Gets the item alignment.

Parameters:
Name Type Description
item lumin.TransformNode

Pointer to the item Node.

Returns:

Reference to receive the setting.

Type
lumin.ui.Alignment

getItemAlignment(row, col) → {lumin.ui.Alignment}

Gets the item alignment at the specified row and col position.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

Returns:

Reference to receive the setting.

Type
lumin.ui.Alignment

getItemCount() → {number}

Gets the number of items in the grid.

Returns:

Item count.

Type
number

getItemPadding(item) → {vec4}

Gets the item padding.

Parameters:
Name Type Description
item lumin.TransformNode

Pointer to the item Node.

Returns:

Reference to receive the setting.

Type
vec4

getItemPadding(row, col) → {vec4}

Gets the item padding at the specified row and col position.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

Returns:

Reference to receive the setting.

Type
vec4

getLocalAABB() → {lumin.math.AABB}

Inherited From:

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.

Returns:

The bounding box.

Type
lumin.math.AABB

getLocalPosition() → {vec3}

Inherited From:

Get the Local Position of this Node

Returns:

Position

Type
vec3

getLocalRotation() → {quat}

Inherited From:

Get the Local Rotation of this Node

Returns:

Rotation

Type
quat

getLocalScale() → {vec3}

Inherited From:

Get the Local Scale of this Node

Returns:

Scale

Type
vec3

getLocalTransform() → {mat4}

Inherited From:

Get the Local Transform of this Node

Returns:

Transform Matrix

Type
mat4

getName() → {string}

Inherited From:

Get the name of the Node.

This call returns EMPTY_STRING if the Node's
name has not been set.

Returns:

The name of the Node, if set.

Type
string

getNodeId() → {number}

Inherited From:

Gets the Node Id of this Node

Every Node is assigned a unique ID per Prism

Returns:

Node id of the current Node

Type
number

getOnActivateResponse() → {lumin.ui.OnActivateResponse}

Inherited From:

Gets the OnActivateResponse properties of this UiNode.

Returns:
Type
lumin.ui.OnActivateResponse

getParent() → {lumin.Node}

Inherited From:

Gets this Node's immediate parent

Returns:

Parent Node, nullptr = no parent

Type
lumin.Node

getParentedBoneName() → {string}

Inherited From:

When parented to a parents bone with setParentedBoneName

Returns:

Parents bone name we are attached to

Type
string

getPrismId() → {number}

Inherited From:

Returns the id of the prism the node belongs to.

Returns:

the prism id (0 = invalid prism)

Type
number

getPrismPosition() → {vec3}

Inherited From:

Get the Prism Position of this Node

Returns:

Position

Type
vec3

getRenderingLayer() → {number}

Inherited From:

Gets the rendering layer of this UiNode.

Returns:

: the uint16_t value of the layer.

Type
number

getRigidBody() → {lumin.PhysicsRigidBody}

Inherited From:

Returns the PhysicsRigidBody attached to the node, if the node is participating in the physics
system.

Returns:

the rigid body

Type
lumin.PhysicsRigidBody

getRoot() → {lumin.RootNode}

Inherited From:

Gets the root node of the node tree this node belongs to.

Returns:

The root node, or nullptr if none.

Type
lumin.RootNode

getRows() → {number}

Gets the number of rows set for the grid.

Returns:

the number of set rows.

Type
number

getSize() → {vec2}

Inherited From:

Gets the requested size of the layout area.

Returns:

the requested size.

Type
vec2

getSkipInvisibleItems() → {boolean}

Gets whether this layout skips invisible items or not.

Returns:

true if the layout skips invisible items, false if not.

Type
boolean

getWorldPosition() → {vec3}

Inherited From:

Get the World Position of this Node

Returns:

Position

Type
vec3

isInLayer(a_layer) → {boolean}

Inherited From:

Checks to see if node subscribes to the specified node layer.

Parameters:
Name Type Description
a_layer number

The layer to test if this node is a member of.

Returns:

True if this node subscribes to the specified layer.

Type
boolean

isInSubtree(pParent) → {boolean}

Inherited From:

Determines if this Node is within the subtree.

Parameters:
Name Type Description
pParent lumin.Node
Returns:

true if this Node is within the subtree, false if not.

Type
boolean

isSkipRaycast() → {boolean}

Inherited From:

Returns the skip raycast state of the node.

Returns:

True if the node is skipped during raycasting.

Type
boolean

isTriggerable() → {boolean}

Inherited From:

Returns true if this node should handle trigger presses directly.

Returns:

true if this node will handle trigger presses directly when focused,
false if trigger press will instead enter prism placement mode.

Type
boolean

isVisibilityInherited() → {boolean}

Inherited From:

Returns whether this Node's visibility is inherited by its children or not.

Returns:

True if the Node's visiblity is inherited.

Type
boolean

isVisible() → {boolean}

Inherited From:

Returns the visibility state of the node. Note that only the local state is checked, the
effect of a parent's visibility is ignored.

Returns:

True if the Node is visible.

Type
boolean

isVisibleInPrism() → {boolean}

Inherited From:

Returns the visibility of the Node in the hierarchy based on self visibility and any
potential inherited visibility.

Returns:

True if the Node is visible in the Prism.

Type
boolean

onActivateSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on click Event.

This event is dispatched when the element has been activated (clicked, selected).

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onActivateUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onDeletedSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on deleted Event.

This event is dispatched when the element is about to be deleted.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onDeletedUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onDisabledSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on disabled Event.

This event is dispatched when the element has been disabled.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onDisabledUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onEnabledSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on enabled Event.

This event is dispatched when the element has been enabled.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onEnabledUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onFocusGainedSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on focus gained Event.

This event is dispatched when the element has gained focus.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onFocusGainedUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onFocusInputSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on focus input Event.

This event is dispatched when the focused element should process input.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onFocusInputUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onFocusLostSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on focus lost Event.

This event is dispatched when the element has lost focus.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onFocusLostUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onHoverEnterSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on hover enter Event.

This event is dispatched when the cursor starts hovering over the UiNode.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onHoverEnterUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onHoverExitSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on hover exit Event.

This event is dispatched when the cursor stops hovering over the UiNode.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onHoverExitUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onHoverMoveSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on hover move Event.

This event is dispatched when the cursor is hovering over the UiNode.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onHoverMoveUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onLongPressSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on long press Event.

This event is dispatched when the element has been held down on.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onLongPressUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onPressedSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on pressed Event.

This event is dispatched when the element is pressed.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onPressedUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onReleasedSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on released Event.

This event is dispatched when the element is released (after being pressed).

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onReleasedUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

onUpdateSub(callback) → {lumin.utils.CallbackID}

Inherited From:

The on update Event.

This event is dispatched during element update.

Parameters:
Name Type Description
callback callable
Returns:
Type
lumin.utils.CallbackID

onUpdateUnsub(callbackID) → {boolean}

Inherited From:
Parameters:
Name Type Description
callbackID lumin.utils.CallbackID
Returns:
Type
boolean

removeChild(a_pChild)

Inherited From:

Remove a child from the current Node

Parameters:
Name Type Description
a_pChild lumin.Node

The child Node to remove.

removeFromLayer(a_layer)

Inherited From:

Removes this node from the specified node layer.

Parameters:
Name Type Description
a_layer number

The layer this node will be removed from.

removeItem(row, col) → {lumin.TransformNode}

Removes the item at the row and col position.

Removing an item from the grid can alter the grid position
of other items based on the grid's row and column settings.

The returned Node hierarchy will be orphaned (no longer attached
to the scene graph) and must be handled by the caller.

If the row and column are out of bounds, nothing happens.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

Returns:

Item node pointer.

Type
lumin.TransformNode

setAlignment(alignment)

Inherited From:

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.

Parameters:
Name Type Description
alignment lumin.ui.Alignment

The alignment.

setAnchorPosition(a_position)

Inherited From:

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.

Parameters:
Name Type Description
a_position vec3

Anchor position. This is relative to the default 0,0,0 position of the
transform.

setColumns(columns)

Sets the number of columns for the grid.

The default value of 0 indicates the number of columns
can grow to fit items as they are added. Setting the
value above 0 will lock the grid column dimension.

If both rows and columns are set, columns will take
precedence.

If neither rows or columns are set, the grid layout will
have 1 row and add columns as needed.

When the number of columns is set, the grid will lay
items in row-major order.

Parameters:
Name Type Description
columns number

the number of columns for the grid layout.

setCursorHoverState(state)

Inherited From:

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.

Parameters:
Name Type Description
state lumin.CursorHoverState

The cursor state

setDefaultItemAlignment(alignment)

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.
Note that for the right and the bottom alignments
to kick in, the containing cell should be, respectively,
wider and higher than its content.

Parameters:
Name Type Description
alignment lumin.ui.Alignment

The default item alignment.

setDefaultItemPadding(padding)

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.
Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.

Parameters:
Name Type Description
padding vec4

the padding vector for the 4 sides.

setEnabled(enabled)

Inherited From:

Sets the enabled state

Disabled UiNodes don't send out certain input events,
such as OnPress, OnRelease, OnActivate, etc.

Parameters:
Name Type Description
enabled boolean

The enabled state of the UiNode.

setEventPassThrough(passThrough)

Inherited From:

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.

Parameters:
Name Type Description
passThrough boolean

the event pass through flag.

setEventPassThroughChildren(passThrough)

Inherited From:

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.

Parameters:
Name Type Description
passThrough boolean

the event pass through flag.

setEventSoundID(event, nameID)

Inherited From:

Sets the sound ID to be played for the UI event.

Parameters:
Name Type Description
event lumin.ui.SoundEvent

the sound event.

nameID string

the name of the sound to play for the sound event.

setGravityWellEnabled(enabled)

Inherited From:

Sets whether the gravity well is enabled.

Parameters:
Name Type Description
enabled boolean

setGravityWellProperties(properties)

Inherited From:

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.

Parameters:
Name Type Description
properties lumin.ui.GravityWellProperties

the GravityWellProperties.

setItemAlignment(row, col, alignment)

Sets the item alignment at the specified row and col position.

Note that for the right and the bottom alignments
to kick in, the containing cell should be, respectively,
wider and higher than its content.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

alignment lumin.ui.Alignment

The item alignment.

setItemAlignment(item, alignment)

Sets the item alignment.

Note that for the right and the bottom alignments
to kick in, the containing cell should be, respectively,
wider and higher than its content.

Parameters:
Name Type Description
item lumin.TransformNode

Pointer to the item Node.

alignment lumin.ui.Alignment

The item alignment.

setItemPadding(row, col, padding)

Sets the item padding at the specified row and col position.

Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.

Parameters:
Name Type Description
row number

The row position of the item (zero-based).

col number

The column position of the item (zero-based).

padding vec4

The item padding.

setItemPadding(item, padding)

Sets the item padding.

Note that padding in a dimension will work only for items
smaller in that dimension than the cell they are in.
Large horizontal padding for an item will also contribute
to the width of the column the item is in.
The same applies for large vertical padding vis-a-vis
the height of the row the item is in.

Parameters:
Name Type Description
item lumin.TransformNode

Pointer to the item Node.

padding vec4

The item padding.

setLocalPosition(aPos)

Inherited From:

Set the local position of this Node

Parameters:
Name Type Description
aPos vec3

new position

setLocalRotation(aRot)

Inherited From:

Set the local rotation of this Node

Parameters:
Name Type Description
aRot quat

new rotation

setLocalScale(aScale)

Inherited From:

Set the local scale of this Node

Parameters:
Name Type Description
aScale vec3

new scale

setLocalTransform(aTransform)

Inherited From:

Set the local transform of this Node

Parameters:
Name Type Description
aTransform mat4

transform matrix

setName(a_name) → {boolean}

Inherited From:

Set the name of the Node

By default a Node has no name.

Parameters:
Name Type Description
a_name string

The new name of the Node.

Returns:

true if the name of the Node was successfully set, false otherwise.

Type
boolean

setOnActivateResponse(activateResponse)

Inherited From:

Sets the OnActivateResponse properties of this UiNode.

Parameters:
Name Type Description
activateResponse lumin.ui.OnActivateResponse

the OnActivateResponse.

setParentedBoneName(a_boneName) → {boolean}

Inherited From:

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.

Parameters:
Name Type Description
a_boneName string

bone name to attach to

Returns:

true if successful, false if failed

Type
boolean

setRenderingLayer(a_renderLayer)

Inherited From:

Sets Custom RenderLayer on this UiNode. Which internally sets the render layer
on all RenderNode Children

Parameters:
Name Type Description
a_renderLayer lumin.render.RenderingLayer

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<uint16_t>(render::RenderingLayer::kHUDLayer));

You can also create your own custom layering by using existing layers and your own.
eg. uint16_t customHUDLayer1 = static_cast<uint16_t>(render::RenderingLayer::kHUDLayer) + 1;
uint16_t customHUDLayer2 = static_cast<uint16_t>(render::RenderingLayer::kHUDLayer) + 2;
uint16_t customHUDLayer3 = static_cast<uint16_t>(render::RenderingLayer::kHUDLayer) + 3;

setRows(rows)

Sets the number of rows for the grid.

The default value of 0 indicates the number of rows
can grow to fit items as they are added. Setting the
value above 0 will lock the grid row dimension.

If both rows and columns are set, columns will take
precedence.

If neither rows or columns are set, the grid layout will
have 1 row and add columns as needed.

When the number of rows is set (and columns is 0), the
grid will lay items in column-major order.

Parameters:
Name Type Description
rows number

the number of rows for the grid layout.

setSize(size)

Inherited From:

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

Parameters:
Name Type Description
size vec2

the requested size of the layout area.

setSkipInvisibleItems(skip)

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.

Using this setting will affect the displayed grid layout by collapsing
the location of invisible items in the grid while the remaining, visible
items adjust to fill in those absent locations. Using this setting
also affects the getItemCount() and calcualted rows and colums returned
by getCurrentRows(), getCurrentColumns(), and any of the methods using
row and column locations will access the visible item at that location,
not any invisible item no longer shown at that location.
Using this setting effectively alters the grid content and properties
to be only the visible items while still allowing the invisble items
to be held by the layout.

Parameters:
Name Type Description
skip boolean

Flag indicating whether to skip invis items or not.

setSkipRaycast(a_skipRaycast, a_propagateToChildrenopt)

Inherited From:

Sets the skip raycast state of the node.

Parameters:
Name Type Attributes Default Description
a_skipRaycast boolean

Raycast skip flag.

a_propagateToChildren boolean <optional>
false

Flag to also set the raycast state of any children

setTriggerable(a_triggerable)

Inherited From:

Sets whether this node should handle trigger presses directly.

Parameters:
Name Type Description
a_triggerable boolean

true if this node should handle trigger presses directly when focused,
false if trigger press should instead enter prism placement mode.

setVisibilityInherited(a_inherit)

Inherited From:

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
Parameters:
Name Type Description
a_inherit boolean

Flag that this node's children should inherit its visibility.

setVisible(a_visible, a_propagateToChildrenopt)

Inherited From:

Sets the visibility state of the node.

Parameters:
Name Type Attributes Default Description
a_visible boolean

Visibility flag

a_propagateToChildren boolean <optional>
false

Flag to also set the visibility state of any children

stopTransformAnimations()

Inherited From:

Stops all current property animations.

updateLayout()

Inherited From:

Updates the UiNode layout based on current component attributes.