Kanzi 3.9.10
Node3D Class Reference

Node3D is the base class of all 3D nodes. More...

Inheritance diagram for Node3D:
[legend]

Public Member Functions

void addChild (Node3D node)
 Adds a child node.
 
void arrange ()
 Arranges this node.
 
void centeredArrange (Vector3 actualSize)
 Default implementation of arrange for a layout that accommodates all children at its center.
 
Vector3 centeredMeasure (Vector3 availableSize)
 Default implementation of measure for a layout that accommodates all children at its center.
 
void close ()
 Close the object, and release native resources.
 
Vector3 getActualSize ()
 Gets actual size.
 
Vector3 getAllocatedOffset ()
 Get allocated offset of an object.
 
Vector3 getAllocatedSize ()
 Gets allocated size.
 
Matrix4x4 getArrangeTransform ()
 Get arrange transform.
 
Node3D getChild (int index)
 Returns a child from given index from node.
 
int getChildCount ()
 Gets the number of children of the node.
 
int getChildIndex (Node child)
 Returns the index of a child in a node.
 
Vector3 getCoreDesiredSize ()
 Get core desired size of an object.
 
Vector3 getDesiredSize ()
 Gets desired size.
 
Node3D getFaceToCameraTarget ()
 Returns the camera to which this node faces to if the node is set to face a camera.
 
Matrix4x4 getFinalTransformation ()
 Gets the value of #FinalTransformationProperty.
 
Vector3 getLayoutBoundingBoxMax ()
 Get bounding box size max corner for an object.
 
Vector3 getLayoutBoundingBoxMin ()
 Get bounding box size min corner for an object.
 
SRTValue3D getLayoutTransformation ()
 Gets the value of #LayoutTransformationProperty.
 
Node3D getLookAtTarget ()
 Returns the node that is set to always face this node.
 
Node3D getOrientationConstraintTarget ()
 Returns the node whose orientation is obtained to define the orientation of this node.
 
Vector3 getPivotOffset ()
 Get pivot offset of an object.
 
Node3D getPositionConstraintTarget ()
 Returns the node whose position is obtained to define the position of this node.
 
SRTValue3D getRenderTransformation ()
 Gets the value of #RenderTransformationProperty.
 
Vector3 getSize ()
 Returns the size of object node.
 
Vector3 getStretchScale ()
 Get stretch scale of an object.
 
boolean hasChild (Node child)
 Returns whether or not the child exists.
 
void insertChild (int index, Node3D child)
 Adds a child node for object node to given index.
 
boolean isPrimitiveLayout ()
 Indicates whether the node has primitive layout behavior.
 
Iterable< Node3DiterateChildren ()
 Gets an Iterable object used to iterate the Node3D children.
 
Iterable< Node3DiterateChildrenReverse ()
 Gets an Reverse Iterable object used to iterate the Node3D children.
 
void layout ()
 Does layout pass starting from this node and iterating recursively all of its children.
 
void lookAt (Vector3 position, Vector3 lookAtPoint, Vector3 upVector)
 Sets node transformation so that the node is in a given position looking at the given point.
 
void measure (Vector3 availableSize)
 Measures this node.
 
void moveToBack ()
 Repositions the node to the beginning of its parent's children, so that it is drawn first.
 
void moveToFront ()
 Repositions the node to the end of its parent's children, so that it is drawn last.
 
Vector3 nGetMaximumBoundingBoxCoordinates ()
 Returns the minimum coordinates for object nodes bounding volume.
 
Vector3 nGetMinimumBoundingBoxCoordinates ()
 Returns the maximum coordinates for object nodes bounding volume.
 
void removeAllChildren ()
 Removes all child nodes.
 
void removeChild (int index)
 Removes child node at specified index.
 
void removeChild (Node3D node)
 Removes child node.
 
void setActualSize (Vector3 actualSize)
 Sets actual size.
 
void setAllocatedOffset (Vector3 allocatedOffset)
 Set allocated offset for an object.
 
void setAllocatedSize (Vector3 allocatedSize)
 Sets allocated size.
 
void setArrangeTransform (Matrix4x4 transform)
 Set arrange transform.
 
void setAutoDepth ()
 Sets node to automatically determine depth.
 
void setAutoSize ()
 Sets node to automatically determine width, height and depth.
 
void setCoreDesiredSize (Vector3 value)
 Set core desired size for an object.
 
void setDesiredSize (Vector3 size)
 Sets desired size.
 
void setFinalTransformation (Matrix4x4 value)
 Sets the value of #FinalTransformationProperty.
 
void setLayoutBoundingBoxSize (Vector3 bboxMin, Vector3 bboxMax)
 Set bounding box size for an object.
 
void setLayoutTransformation (SRTValue3D value)
 Sets the value of #LayoutTransformationProperty.
 
void setPivotOffset (Vector3 pivotOffset)
 Set pivot offset for an object.
 
void setRenderTransformation (SRTValue3D value)
 Sets the value of #RenderTransformationProperty.
 
void setSize (float width, float height, float depth)
 Sets size properties of the node.
 
void setStretchScale (Vector3 stretchScale)
 Set stretch scale for an object.
 
- Public Member Functions inherited from Node
ObjectRef< TResourceTypeacquireResource (ResourceID resourceId) throws ObjectNotFoundException
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
ResourceDictionary acquireResourceDictionary ()
 Gets a resource dictionary of a node.
 
ResourceManager.AcquireTask acquireResourcesAsync (ResourceID resourceId, ResourceManager.AcquireTask.Callback callback)
 Posts an asynchronous task to acquire a resource.
 
boolean addAbstractChild (Node child)
 Adds a node as child of this node.
 
void addAnonymousResource (Resource resource)
 Adds anonymous resource (such as style) for object node resources.
 
void addInputManipulator (InputManipulator inputManipulator)
 Attaches an input manipulator to the node.
 
MessageSubscriptionToken addMessageFilter (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message filter where the filter is a function.
 
MessageSubscriptionToken addMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message handler where the handler is a function.
 
MessageSubscriptionToken addMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction, Node messageSourceFilter)
 Adds a message handler where the handler is a function.
 
void addNodeComponent (NodeComponent component)
 Transfers the ownership of a node component to an object node.
 
void addNodeComponentWithOwner (NodeComponent component, KanziObject owner)
 Transfers the ownership of a node component to an object node and sets the owner of the node component.
 
void addResource (ResourceID resourceId, String resourceUrl)
 Adds a resource manager resource to an object node.
 
void addResourceDictionary (ResourceDictionary resourceDictionary)
 Adds a nested resource dictionary to the resource dictionary of a node.
 
MessageSubscriptionToken addTunnelingMessageFilter (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction)
 Adds a message filter where the filter is a function.
 
MessageSubscriptionToken addTunnelingMessageHandler (MessageType< MessageArgumentsType > messageType, MessageSubscriptionFunction< MessageArgumentsType > messageHandlerFunction, Node messageSourceFilter)
 Adds a message handler where the handler is a function and you explicitly define the accepted source.
 
void attachRecursive ()
 Attaches a node and its children recursively.
 
void clearChangeFlag (PropertyTypeChangeFlag flag)
 Clears a change flag.
 
boolean containsResource (ResourceID resourceId)
 Returns if object node resource dictionary contains the resource with given ID.
 
void detachRecursive ()
 Detaches a node and its children recursively.
 
void dispatchMessage (MessageType< MessageArgumentsType > messageType, MessageArgumentsType arguments)
 Dispatches a message from this node with specified arguments.
 
String findResourceUrl (ResourceID resourceId)
 Tries to find Resource URL for Resource ID from this node.
 
Node getAbstractChild (int index)
 Returns node at given child index.
 
int getAbstractChildCount ()
 Returns number of child nodes.
 
int getAbstractChildIndex (Node node)
 Returns index of given node in list of child nodes.
 
float getActualDepth ()
 Gets the value of #ActualDepthProperty.
 
float getActualHeight ()
 Gets the value of #ActualHeightProperty.
 
float getActualWidth ()
 Gets the value of #ActualWidthProperty.
 
float getDepth ()
 Gets the value of #DepthProperty.
 
Vector2 getDepthMargin ()
 Gets the value of #DepthMarginProperty.
 
float getHeight ()
 Gets the value of #HeightProperty.
 
Vector2 getHorizontalMargin ()
 Gets the value of #HorizontalMarginProperty.
 
String getLocale ()
 Gets the value of #LocaleProperty.
 
String getName ()
 Gets the value of #NameProperty.
 
float getOpacity ()
 Gets the value of #OpacityProperty.
 
Node getParent ()
 Gets parent of this node.
 
String getPath ()
 Gets the value of #PathProperty.
 
ResourceDictionary getResourceDictionary ()
 If a node has a resource dictionary, returns the resource dictionary of that node.
 
Resource getStateManager ()
 Gets the value of #StateManagerProperty.
 
Resource getStyle ()
 Gets the value of #StyleProperty.
 
Vector2 getVerticalMargin ()
 Gets the value of #VerticalMarginProperty.
 
float getWidth ()
 Gets the value of #WidthProperty.
 
void invalidateArrange ()
 Invalidates arrange for the node.
 
void invalidateDraw ()
 Invalidates draw flag for the node.
 
void invalidateFinalTransform ()
 Invalidates final transform for node.
 
void invalidateMeasure ()
 Invalidates measure for the node.
 
void invalidateRender ()
 Invalidates render for the node.
 
boolean isAnyChangeFlagSet (EnumSet< PropertyTypeChangeFlag > flags)
 Checks if any of a set of change flags is set.
 
boolean isAnyChildChangeFlagSet (EnumSet< PropertyTypeChangeFlag > flags)
 Checks if any of a set of change flags is set on a child.
 
boolean isAttached ()
 Checks if node is attached to ui tree.
 
boolean isAttaching ()
 Checks if node is in the process of attaching to ui tree.
 
boolean isChangeFlagSet (PropertyTypeChangeFlag flag)
 Checks if a change flag is set.
 
boolean isChildChangeFlagSet (PropertyTypeChangeFlag flag)
 Checks if a change flag is set on a child.
 
boolean isClipChildren ()
 Gets the value of #ClipChildrenProperty.
 
boolean isDetaching ()
 Checks if node is in the process of getting detached from ui tree.
 
boolean isEffectivelyEnabled ()
 Returns whether a node and its ancestor nodes are enabled.
 
boolean isEffectivelyFocusable ()
 Returns whether a node and its ancestor focus scope nodes are focusable.
 
boolean isEffectivelyVisible ()
 Returns whether a node and its ancestor nodes are visible.
 
boolean isEnabled ()
 Gets the value of #EnabledProperty.
 
boolean isFocusable ()
 Gets the value of the #FocusableProperty.
 
boolean isFocused ()
 Sets whether a node is an active focus node and can receive keyboard messages.
 
boolean isHitTestable ()
 Gets the value of #HitTestableProperty.
 
boolean isHitTestableContainer ()
 Gets the value of #HitTestableContainerProperty.
 
boolean isHover ()
 Gets the value of #HoverProperty.
 
boolean isInitialized ()
 Checks if initialize() has been called.
 
boolean isInvalidArrange ()
 Check if the node needs arrange.
 
boolean isInvalidDraw ()
 Tells if node draw flag is invalid.
 
boolean isInvalidFinalTransform ()
 Tells if final transform flag is invalid for node.
 
boolean isInvalidMeasure ()
 Check if the node needs measure.
 
boolean isInvalidRender ()
 Returns if node render flag is invalid.
 
boolean isNamed (String name)
 Checks if node has a given name.
 
boolean isVisible ()
 Gets the value of #VisibleProperty.
 
Iterable< NodeComponentiterateNodeComponents ()
 Gets an Iterable object used to iterate the Node Components.
 
lookupNode (String path)
 Returns a node of specified type by looking it up with specified path or alias.
 
NodeComponent lookupNodeComponentByName (String name)
 Look up a Node Component by Name.
 
KanziObject lookupObject (String path)
 Returns a KanziObject by looking it up with specified path or alias.
 
void notifyResourceDictionaryModified ()
 Forces the re-evaluation of resource IDs in a node tree.
 
boolean removeAbstractChild (Node child)
 Removes child node from this node.
 
void removeAnonymousResource (Resource resource)
 Removes anonymous resource from object node resources.
 
void removeBinding (AbstractBindingRuntime bindingRuntime)
 Removes a binding runtime added earlier.
 
void removeBindingsWithOwner (KanziObject owner)
 Removes binding runtimes owned by a KanziObject.
 
void removeInputManipulator (InputManipulator inputManipulator)
 Detaches an input manipulator from the node.
 
void removeMessageHandler (MessageSubscriptionToken token)
 Removes a message subscription.
 
void removeNodeComponent (NodeComponent component)
 Removes the ownership of a node component from an object node.
 
void removeNodeComponentWithOwner (KanziObject owner)
 Removes all node component bindings with the specified owner.
 
void removeResource (ResourceID resourceId)
 Removes a resource with given ID from object node resource dictionary.
 
void setActualDepth (float value)
 Sets the value of #ActualDepthProperty.
 
void setActualHeight (float value)
 Sets the value of #ActualHeightProperty.
 
void setActualWidth (float value)
 Sets the value of #ActualWidthProperty.
 
void setAutoHeight ()
 Sets node to automatically determine height.
 
void setAutoWidth ()
 Sets node to automatically determine width.
 
AbstractBindingRuntime setBinding (AbstractBinding binding)
 Sets a binding.
 
AbstractBindingRuntime setBinding (AbstractBinding binding, PropertyType<?> propertyType)
 Sets a binding.
 
AbstractBindingRuntime setBinding (AbstractBinding binding, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a binding.
 
AbstractBindingRuntime setBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType)
 Sets a binding with owner.
 
AbstractBindingRuntime setBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a binding with owner.
 
void setChangeFlag (PropertyTypeChangeFlag flag)
 Sets a change flag.
 
void setClipChildren (boolean value)
 Sets the value of #ClipChildrenProperty.
 
void setDepth (float value)
 Sets the value of #DepthProperty.
 
void setDepthMargin (Vector2 value)
 Sets the value of #DepthMarginProperty.
 
void setEnabled (boolean value)
 Sets the value of the #EnabledProperty.
 
void setFocusable (boolean value)
 Sets the value of the #FocusableProperty.
 
void setFocused (boolean value)
 Sets the value of the #FocusedProperty.
 
void setHeight (float value)
 Sets the value of #HeightProperty.
 
void setHitTestable (boolean value)
 Sets the value of #HitTestableProperty.
 
void setHitTestableContainer (boolean value)
 Sets the value of #HitTestableContainerProperty.
 
void setHorizontalMargin (Vector2 value)
 Sets the value of #HorizontalMarginProperty.
 
void setHover (boolean value)
 Sets the value of #HoverProperty.
 
void setLocale (String value)
 Sets the value of #LocaleProperty.
 
AbstractBindingRuntime setModifierBinding (AbstractBinding binding, PropertyType<?> propertyType)
 Sets a modifier binding.
 
AbstractBindingRuntime setModifierBinding (AbstractBinding binding, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a modifier binding.
 
AbstractBindingRuntime setModifierBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType)
 Sets a modifier binding with owner.
 
AbstractBindingRuntime setModifierBindingWithOwner (AbstractBinding binding, KanziObject owner, PropertyType<?> propertyType, PropertyField propertyField)
 Sets a modifier binding with owner.
 
void setName (String name)
 Sets the value of #NameProperty.
 
void setOpacity (float value)
 Sets the value of #OpacityProperty.
 
void setResourceDictionary (ResourceDictionary resourceDictionary)
 Replaces the resource dictionary of a node.
 
void setStateManager (Resource value)
 Sets the value of #StateManagerProperty.
 
void setStyle (Resource value)
 Sets the value of #StyleProperty.
 
void setVerticalMargin (Vector2 value)
 Sets the value of #VerticalMarginProperty.
 
void setVisible (boolean value)
 Sets the value of #VisibleProperty.
 
void setWidth (float value)
 Sets the value of #WidthProperty.
 
ObjectRef< TResourceTypetryAcquireResource (ResourceID resourceId)
 Acquires a resource from the node or the node's closest ancestor having the resource id in the resource dictionary.
 
Node trySetFocus ()
 Tries to move the focus on this node.
 
void validateArrange ()
 Validates arrange for the node.
 
void validateDraw ()
 Validates draw flags for the node.
 
void validateMeasure ()
 Validates measure for the node.
 
void validateRender ()
 Validates render for the node.
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to.
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object.
 
long getNative ()
 Gets a pointer to the backing C++ instance.
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value.
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type.
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value.
 
boolean isStale ()
 Test if the object is stale i.e.
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property.
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type.
 
ObjectRef< TTypetryCreateObjectRef (Class< TType > clazz)
 Tries to create an owning ObjectRef instance to this KanziObject.
 

Static Public Member Functions

static boolean isUnboundedLayoutSize (Vector3 layoutSize)
 Indicates whether a layout size is an unbound layout size.
 
static boolean isValidLayoutSize (Vector3 size)
 Indicates whether a size is valid layout size.
 
static float layoutUp ()
 Returns the direction to which the Y-axis grows for this node type.
 
static Vector3 replaceUnboundedLayoutSize (Vector3 layoutSize, Vector3 resetSize)
 Replaces any element of a layout size with appropriate element of the reset size if it is unbounded and returns the size.
 
static Vector3 replaceUnboundedLayoutSizeWithZero (Vector3 layoutSize)
 Replaces any element of a layout size with zero if it is unbounded and returns the size.
 
static Vector3 unboundedLayoutSize ()
 Returns an unbounded layout size.
 

Static Public Attributes

static final Metaclass metaclass = com.rightware.kanzi.metadata.Node3DMetadata.metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from Node
static final Metaclass metaclass = com.rightware.kanzi.metadata.NodeMetadata.metaclass
 The Metaclass for the class.
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Protected Member Functions

 Node3D (Domain domain, long nativeNode, Metaclass metaclass)
 Wraps a given native node.
 
void arrangeOverride (Vector3 actualSize)
 Performs setting of actual node size and transformation calculations.
 
void initialize ()
 Initializes the Node3D.
 
Vector3 measureOverride (Vector3 availableSize)
 Performs node size calculation.
 
void onAttached ()
 Called when this node becomes attached.
 
void onDetached ()
 Called when this node becomes detached.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Method executed on node property change.
 

Static Protected Member Functions

static< Derived extends Node3D > ObjectRef< DerivedcreateDerived (Domain domain, String name, Metaclass metaclass)
 Creates a derived class instance.
 

Additional Inherited Members

- Public Attributes inherited from NodeMetadata
DynamicPropertyType< FloatActualDepthProperty
 The calculated size of the node in depth direction when used in a layout.
 
DynamicPropertyType< FloatActualHeightProperty
 The calculated height of the node when used in a layout.
 
DynamicPropertyType< FloatActualWidthProperty
 The calculated width of the node when used in a layout.
 
DynamicPropertyType< BooleanClipChildrenProperty
 Sets whether to clip the child nodes of this node.
 
DynamicPropertyType< NodeEnums.ContentStretchContentStretchProperty
 Sets how the content that belongs to this node is stretched (as opposed to manipulating the actual node size).
 
DynamicPropertyType< BooleanCreatedFromKZBProperty
 Kanzi internally uses this property to distinguish objects like bindings and triggers created in code from objects that are loaded from a kzb file.
 
DynamicPropertyType< NodeEnums.DepthAlignmentDepthAlignmentProperty
 The alignment in depth direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2DepthMarginProperty
 Sets the depth distance between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< FloatDepthProperty = new DynamicPropertyType<>("Node.Depth", Float.class)
 The size of the node in depth direction when used in a layout.
 
DynamicPropertyType< BooleanEffectivelyEnabledProperty
 Indicates whether this node and its ancestor nodes are enabled.
 
DynamicPropertyType< BooleanEnabledProperty
 Whether this node is enabled.
 
DynamicPropertyType< BooleanFocusableProperty
 Indicates whether the node can receive focus.
 
DynamicPropertyType< BooleanFocusedProperty
 Indicates whether the node has the key focus.
 
DynamicPropertyType< FocusStateFocusStateProperty
 Reports the focus state of a node:
 
DynamicPropertyType< ResourceFontFamilyProperty
 The font family used to render the text.
 
DynamicPropertyType< FloatHeightProperty
 The height of the node when used in a layout.
 
DynamicPropertyType< BooleanHitTestableContainerProperty
 When enabled, Kanzi uses the layout bounds as geometry for hit testing.
 
DynamicPropertyType< BooleanHitTestableProperty
 When enabled, the node can be hit tested.
 
DynamicPropertyType< NodeEnums.HorizontalAlignmentHorizontalAlignmentProperty
 The alignment in horizontal direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2HorizontalMarginProperty
 Sets the horizontal space between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< BooleanHoverProperty
 Indicates whether a node is the foremost hit testable node under the cursor.
 
DynamicPropertyType< String > LocaleProperty
 The locale of the node.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Node")
 Metaclass for Node.
 
DynamicPropertyType< String > NameProperty = new DynamicPropertyType<>("Node.Name", String.class)
 Node name.
 
DynamicPropertyType< FloatOpacityProperty
 Opacity of the node.
 
DynamicPropertyType< String > PathProperty = new DynamicPropertyType<>("Node.Path", String.class)
 Full path to the node.
 
DynamicPropertyType< FloatProjection2DTo3DScaleProperty
 Sets the scale factor to project pixels to 3D size.
 
DynamicPropertyType< ResourceStateManagerProperty
 Sets the State Manager to the node.
 
DynamicPropertyType< ResourceStyleProperty
 Sets a style to the node.
 
DynamicPropertyType< NodeEnums.VerticalAlignmentVerticalAlignmentProperty
 The alignment in vertical direction the node should use when it resides under a layout.
 
DynamicPropertyType< Vector2VerticalMarginProperty
 Sets the vertical space between this node and other nodes that are adjacent to this node in a layout.
 
DynamicPropertyType< FloatVisibleAmountInParentProperty
 Sets the amount the node is inside its parent.
 
DynamicPropertyType< BooleanVisibleProperty
 When disabled, Kanzi does not render the node.
 
DynamicPropertyType< FloatWidthProperty = new DynamicPropertyType<>("Node.Width", Float.class)
 The width of the node when used in a layout.
 
- Public Attributes inherited from Node3DMetadata
DynamicPropertyType< Matrix4x4FinalTransformationProperty
 The combined location, orientation and scale of the node and its ancestor nodes.
 
DynamicPropertyType< FloatFrustumCullMarginProperty
 The margin of the frustum cull radius of the node.
 
DynamicPropertyType< SRTValue3DLayoutTransformationProperty
 The location, orientation and scale of the node relative to its parent node.
 
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Node3D")
 Metaclass for Node3D.
 
DynamicPropertyType< SRTValue3DRenderTransformationProperty
 The location, orientation, and scale of the node relative to its parent node.
 

Detailed Description

Node3D is the base class of all 3D nodes.

Node3D implements functionality common to all 3D nodes, such as rendering, layout and hit testing. You should use classes derived from Node3D like Image3D, EmptyNode3D and StackLayout3D to construct UI graphs. You can configure common parameters for rendering and layout with methods of Node3D. Use methods of derived classes to control behavior specific to them.

Constructor & Destructor Documentation

◆ Node3D()

Node3D ( Domain domain,
long nativeNode,
Metaclass metaclass )
protected

Wraps a given native node.

Called by KanziObject.connectObject(long) when connecting to a native node.

Parameters
domainUI Domain where this node belongs.
nativeNodeNative object that is backing this node.
metaclassMetaclass data for this node.

Member Function Documentation

◆ addChild()

void addChild ( Node3D node)

Adds a child node.

Adding a 3D node node as a child of a 2D node is only allowed when adding a scene to a viewport.

Parameters
nodeNode to add as a child of this node.

◆ arrangeOverride()

void arrangeOverride ( Vector3 actualSize)
protected

Performs setting of actual node size and transformation calculations.

Parameters
actualSizeThe actual size available for this node.

◆ createDerived()

static< Derived extends Node3D > ObjectRef< Derived > createDerived ( Domain domain,
String name,
Metaclass metaclass )
staticprotected

Creates a derived class instance.

Call this method as part of the create method for a derived class.

Parameters
domainUI Domain where this node belongs.
nameName of the node
metaclassMetaclass data of the node.
Returns
An ObjectRef that holds the created instance.

◆ getActualSize()

Vector3 getActualSize ( )

Gets actual size.

Returns
Actual size of this node.

◆ getAllocatedSize()

Vector3 getAllocatedSize ( )

Gets allocated size.

Returns
Allocated size of this node.

◆ getArrangeTransform()

Matrix4x4 getArrangeTransform ( )

Get arrange transform.

Returns
Current arrange transformation of this node.

◆ getChild()

Node3D getChild ( int index)

Returns a child from given index from node.

Parameters
indexIndex of the child node.
Returns
Child node at specified index.

◆ getChildCount()

int getChildCount ( )

Gets the number of children of the node.

Returns
Number of child nodes.

◆ getChildIndex()

int getChildIndex ( Node child)

Returns the index of a child in a node.

Parameters
childChild node to get index for.
Returns
Index of the specified child node.

◆ getCoreDesiredSize()

Vector3 getCoreDesiredSize ( )

Get core desired size of an object.

Returns
Current value.

◆ getDesiredSize()

Vector3 getDesiredSize ( )

Gets desired size.

Returns
Desired size of this node.

◆ getFaceToCameraTarget()

Node3D getFaceToCameraTarget ( )

Returns the camera to which this node faces to if the node is set to face a camera.

Returns
The target camera to which this node faces if it is set to face a camera.

◆ getFinalTransformation()

Matrix4x4 getFinalTransformation ( )

Gets the value of #FinalTransformationProperty.

Returns
Current value.

◆ getLayoutTransformation()

SRTValue3D getLayoutTransformation ( )

Gets the value of #LayoutTransformationProperty.

Returns
Current value.

◆ getLookAtTarget()

Node3D getLookAtTarget ( )

Returns the node that is set to always face this node.

Returns
The look at target node.

◆ getOrientationConstraintTarget()

Node3D getOrientationConstraintTarget ( )

Returns the node whose orientation is obtained to define the orientation of this node.

Returns
The orientation constraint target node.

◆ getPositionConstraintTarget()

Node3D getPositionConstraintTarget ( )

Returns the node whose position is obtained to define the position of this node.

Returns
The position constraint target node.

◆ getRenderTransformation()

SRTValue3D getRenderTransformation ( )

Gets the value of #RenderTransformationProperty.

Returns
Current value.

◆ getSize()

Vector3 getSize ( )

Returns the size of object node.

Returns
Current size.

◆ hasChild()

boolean hasChild ( Node child)

Returns whether or not the child exists.

Returns
True if child exists, otherwise false.

◆ insertChild()

void insertChild ( int index,
Node3D child )

Adds a child node for object node to given index.

Parameters
indexIndex where to add the child node.
childNode to add as a child of this node.

◆ isPrimitiveLayout()

boolean isPrimitiveLayout ( )

Indicates whether the node has primitive layout behavior.

Returns
True if yes, false otherwise.

◆ isUnboundedLayoutSize()

static boolean isUnboundedLayoutSize ( Vector3 layoutSize)
static

Indicates whether a layout size is an unbound layout size.

Size is layout unbound size if any of its elements is unbounded layout value.

Parameters
layoutSizeLayout size to test if it is unbound layout size.
Returns
true if the layoutSize is unbound layout size, false otherwise.

◆ isValidLayoutSize()

static boolean isValidLayoutSize ( Vector3 size)
static

Indicates whether a size is valid layout size.

Size is valid if all its elements are valid layout values (see Node::isValidLayoutValue()).

Parameters
sizeSize to test if it is unbound layout size.
Returns
true if the size if valid layout size, false otherwise.

◆ iterateChildren()

Iterable< Node3D > iterateChildren ( )

Gets an Iterable object used to iterate the Node3D children.

Returns
An iterable of Node3D children.

◆ iterateChildrenReverse()

Iterable< Node3D > iterateChildrenReverse ( )

Gets an Reverse Iterable object used to iterate the Node3D children.

Returns
An reverse iterable of Node3D children.

◆ layout()

void layout ( )

Does layout pass starting from this node and iterating recursively all of its children.

Measure pass only descends up to nodes marked for requiring measure and then propagates upwards for all nodes that were changed. After measure, all nodes marked for requiring arrange and all their children are arranged. Node actual size is not known before layout. User may call layout manually to determine node actual sizes. Before calling layout, the node must have allocated size set to limit node area to anything less than infinity. Normal layout process sets allocated size to current composition size.

◆ layoutUp()

static float layoutUp ( )
static

Returns the direction to which the Y-axis grows for this node type.

Returns
The direction of Y-axis.

◆ lookAt()

void lookAt ( Vector3 position,
Vector3 lookAtPoint,
Vector3 upVector )

Sets node transformation so that the node is in a given position looking at the given point.

Parameters
positionThe new translation of the node.
lookAtPointA point where the node is looking at.
upVectorThe new up vector of the node.

◆ measure()

void measure ( Vector3 availableSize)

Measures this node.

Parameters
availableSizeAvailable size passed from parent.

◆ measureOverride()

Vector3 measureOverride ( Vector3 availableSize)
protected

Performs node size calculation.

Parameters
availableSizeThe size available for this node.
Returns
The measured size of this node.

◆ nGetMaximumBoundingBoxCoordinates()

Vector3 nGetMaximumBoundingBoxCoordinates ( )

Returns the minimum coordinates for object nodes bounding volume.

Returns
Current value.

◆ nGetMinimumBoundingBoxCoordinates()

Vector3 nGetMinimumBoundingBoxCoordinates ( )

Returns the maximum coordinates for object nodes bounding volume.

Returns
Current value.

◆ onNodePropertyChanged()

void onNodePropertyChanged ( AbstractPropertyType propertyType,
PropertyNotificationReason reason )
protected

Method executed on node property change.

Parameters
propertyTypeProperty that was changed in this node.
reasonChange reason.

◆ removeChild() [1/2]

void removeChild ( int index)

Removes child node at specified index.

Parameters
indexIndex of the child to be removed.

◆ removeChild() [2/2]

void removeChild ( Node3D node)

Removes child node.

Parameters
nodeNode to remove.

◆ replaceUnboundedLayoutSize()

static Vector3 replaceUnboundedLayoutSize ( Vector3 layoutSize,
Vector3 resetSize )
static

Replaces any element of a layout size with appropriate element of the reset size if it is unbounded and returns the size.

Parameters
layoutSizeLayout size to test if any of its elements is unbounded layout value.
resetSizeThe size whose values are used as a replacement for specified layout size's unbounded value elements.
Returns
layoutSize with its unbounded value elements replaced with the elements of resetSize.

◆ replaceUnboundedLayoutSizeWithZero()

static Vector3 replaceUnboundedLayoutSizeWithZero ( Vector3 layoutSize)
static

Replaces any element of a layout size with zero if it is unbounded and returns the size.

Parameters
layoutSizeLayout size to test if any of its elements is unbounded layout value.
Returns
layoutSize with its unbounded value elements replaced with zero.

◆ setActualSize()

void setActualSize ( Vector3 actualSize)

Sets actual size.

Parameters
actualSizeNew actual size.

◆ setAllocatedSize()

void setAllocatedSize ( Vector3 allocatedSize)

Sets allocated size.

If allocated size differs from existing, will invalidate arrange as a side effect.

Parameters
allocatedSizeNew allocated size.

◆ setArrangeTransform()

void setArrangeTransform ( Matrix4x4 transform)

Set arrange transform.

If Layout transform differs existing, will invalidate arrange as a side effect.

Parameters
transformNew arrange transformation matrix.

◆ setCoreDesiredSize()

void setCoreDesiredSize ( Vector3 value)

Set core desired size for an object.

Parameters
valueNew value.

◆ setDesiredSize()

void setDesiredSize ( Vector3 size)

Sets desired size.

Parameters
sizeNew desired size.

◆ setFinalTransformation()

void setFinalTransformation ( Matrix4x4 value)

Sets the value of #FinalTransformationProperty.

Parameters
valueNew value.

◆ setLayoutTransformation()

void setLayoutTransformation ( SRTValue3D value)

Sets the value of #LayoutTransformationProperty.

Parameters
valueNew value.

◆ setRenderTransformation()

void setRenderTransformation ( SRTValue3D value)

Sets the value of #RenderTransformationProperty.

Parameters
valueNew value.

◆ setSize()

void setSize ( float width,
float height,
float depth )

Sets size properties of the node.

Parameters
widthThe value of the WidthProperty.
heightThe value of the HeightProperty.
depthThe value of the DepthProperty.

◆ unboundedLayoutSize()

static Vector3 unboundedLayoutSize ( )
static

Returns an unbounded layout size.

Returns
Unbounded layout size.