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 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.
Adds a delay to the current move sequence.
How long to delay, in seconds.
default = 0
which animation track to add the delay to.
Enable//Disable the Prism Visual state changes
Enable/Disable the state changing
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
Get the advance direction, which comes from the font if not overridden with setAdvanceDirection().
The advance direction.
Returns the anchor position of the node.
The anchor position.
Gets the current value of the additional character spacing.
the value of the additional character spacing (as a multiplier of the glyph height).
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 custom color, which is by default white: { 1, 1, 1, 1 }.
The color.
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.
Retrieves cursor positions for each character in the displayed text when in edit mode. The list will be empty if not in edit mode.
The very first position index represents the cursor home position (where the cursor would be without any text) and all subsequent position indices are offset by +1 to their respective character in the text.
the cursor position list.
Gets whether the Text2dNode is in edit mode.
true if in edit mode, false otherwise.
the fixed bounds of the text node or else nullptr if fixed bounds have not been set; see setFixedBounds. Note: the caller must not delete the returned pointer.
Get the text-flow direction, which comes from the font if not overridden with setFlowDirection().
The flow direction.
Get the font resource or nullptr if no font has been set.
The FontResource.
Get the height of the tallest glyph, which is provided by the associated font resource if not overridden with setGlyphHeight(); see FontResource::getGlyphHeight().
The glyph height.
Get the text justification, which is kStart by default.
The justification.
Get the line spacing for the text, which is by default 1 (i.e., single-spaced). Spacing can be adjusted with setLineSpacing.
The line spacing.
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
Returns 0 by default, which means no maximum value; see setMaxGlyphsPerLine().
Number of gylphs before a line break.
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 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
The comments for getWorldBounds() apply to this function as well.
Returns the id of the prism the node belongs to.
the prism id (0 = invalid prism)
Get the Prism Position of this Node
Position
Get the rendering layer of this node.
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.
Returns shader type that is currently used
Get the number of spaces to use for '\t' characters in the string to render with setText. The default is 4.
The tab width.
Get the text currently set to be rendered by this node.
The text.
Convert from Unicode and return the UTF-8 encoded text.
The UTF-8 encoded text.
Get the world-space rectangle surrounding the text in the node. Note the corners rotate with the node; this is an "oriented bounding box". Per the comment for getLocalAABB, this function can be slow if redoing the typesetting is required.
Get the World Position of this Node
Position
Check if this Render Node is marked for DRM
NOTE: This API is only used for QuadNodes and VideoNodes. In future release, this API will moved to the former mentioned nodes headers. And RenderNode API will be deprecated.
True = Marked as DRM Content
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.
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.
Set this to override the value specified by the font to lay out the text differently than the default for the language.
The text direction.
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.
Sets the back-face-cull setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Set Bloom strength for this Render Node. If a material exists, the material bloom will superseed this value. By Default the Bloom Strength is 0 for this node.
the Bloom Strength
Flags whether or not the indicated render state will bloom
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Flags whether or not the indicated render state will cast shadows.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets the additional character spacing that is applied between characters. Note a spacing of 0 is the default spacing.
the additional distance between characters as a multiplier of the glyph height.
Sets the color to be used for every sub mesh within the render node.
The color to be used for every sub mesh within the render node.
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
Flags If this renderable node is using DRM Content
NOTE: This API is only used for QuadNodes and VideoNodes. In future release, this API will moved to the former mentioned nodes headers. And RenderNode API will be deprecated.
The desired flag setting.
Sets whether the Text2dNode should be in edit mode or not. Edit mode allows the Text2dNode to be used to enter and edit text, turning off white-space trimming and providing cursor positions for each character.
The flag to set edit mode or not.
Set a fixed region in which to render the text in the node. setMaxGlyphsPerLine can still be used in conjunction with setFixedBounds if wrapping is enabled. Justification will be performed with respect to the width of the given area rather than the node's local bounding box, which is the default behavior if fixed bounds are not set.
default = null
a pointer to the description of the text area
to set or nullptr to disable rendering in fixed bounds and
revert to the default behavior of Text2dNode. If either
the width or height of the data are not both positive,
this function will have no effect, and the previous value
will remain unchanged.
Set this to override the value specified by the font for the direction of text flow (from one line to the next).
The flow direction.
Set the font resource from a resource id. The font resource ID must be of a Font2dResource object.
The resource id.
Set the font resource directly.
The resource.
Sets the front-face-cull setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Control the size of glyphs independently of the node transform by overriding the global glyph height of the font. Glyph lines will grow or shrink to conform to this constraint but always retain their proportional baseline positions (ascent and descent) and horizontal-to-vertical aspect ratio.
A positive value to which the tallest glyph will be adjusted to equal, with other glyphs adjusted proportionally.
Sets the opacity setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets if this should be rendered on the UI Layer. Note: UI Layer is always rendered on top of everything else.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Set the justification for multi-line text.
Set the line spacing to adjust the distance between lines of text; e.g., use 1 for single-spaced text, 2 for double- spaced text.
The line spacing.
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
If 0, the default, no limit will be enforced on the line length. If positive and wrapping is enabled, line breaks will be added so this limit is not exceeded. If wrapping is not enabled, text will be truncated, instead.
Number of glyphs before a line break.
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.
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
Set all text-node properties at once using the values in the given data structure.
Info about the text.
Sets the stencil push setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets the clip read setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets the depth read setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Flags whether or not the indicated render state will receive light.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Flags whether or not the indicated render state will receive shadows.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Set Custom RenderLayer on which this renderNode will be rendered.
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 the shader to be used for every sub mesh within the model.
The shader type to be used for every sub mesh within the model.
Sets the skip raycast state of the node.
Raycast skip flag.
default = false
Flag to also set the raycast state of any children
Set the number of spaces to use for '\t' characters in the text string; e.g., use 2 for two spaces to be inserted between rendered glyphs separated by '\t'.
The tab width.
Uses a single font and the transform to render the text. Use the '\n' character to advance to the next line and '\t' to insert spaces between glyphs. Note if a maximum line width has been set, newlines will be automatically inserted to prevent text lines from exceeding its value.
See member functions setMaxLineWidth, setTabWidth, and setLineSpacing to control this behavior.
The text.
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.
Convert to Unicode and render the given UTF-8 encoded text.
The text.
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
Sets the color write setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets the depth write setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Sets the stencil write setting for one or more render states.
The desired flag setting.
default = -1
The index of the corresponding render state whose
flag will be changed. Note that the default value
will cause all states to have the required setting.
Stops all current property animations.
Client-side only: this static function is used to delete a node with its Prism's deleteNode function.
is the node to delete
Generated using TypeDoc
Node type that uses fonts loaded with Font2dResource to render 2D text.