Creates a new SceneGraphComponent instance.
The engine instance
The unique identifier of the entity this component belongs to
The component instance identifier
The entity repository managing this component
Whether this component is being reused
Protected__Protected__Protected__the instance of EntityRepository
Protected__the entity unique Id which this component belongs to
Protected__Protected__the instance of MemoryManager
Collection of tags associated with this object
Static Readonly_StaticcurrentCurrent maximum object count for UID generation
Static ReadonlyInvalidInvalid object UID constant
Gets the ComponentMemoryRegistry for this component's engine.
Gets the child scene graph components of this node.
An array of child scene graph components
Gets the Scoped ID of this Component instance. The SID is unique within the component type and represents the instance index.
The component scoped ID
Gets the component type identifier for this instance.
The component type ID
Gets the current process stage of the component. This determines which update methods are currently being called.
The current process stage
Gets the entity which has this component.
The entity which has this component
Gets the unique ID of the entity that owns this component.
The entity unique ID
Gets the internal entity world matrix with skeletal animation applied.
The internal entity world matrix with skeletal transformations
Gets the entity world matrix with skeletal animation applied.
A cloned copy of the entity world matrix with skeletal transformations
Gets the visibility state of the AABB gizmo.
True if the AABB gizmo is visible, false otherwise
Sets the visibility of the AABB (Axis-Aligned Bounding Box) gizmo.
True to show the AABB gizmo, false to hide it
Gets the billboard state of this scene graph node.
True if billboard is enabled, false otherwise
Sets the billboard state of this scene graph node.
True to enable billboard behavior, false to disable
Gets the visibility state of the joint gizmo.
True if the joint gizmo is visible, false otherwise
Sets the visibility of the joint gizmo that visualizes skeletal joints.
True to show the joint gizmo, false to hide it
Gets the visibility state of the locator gizmo.
True if the locator gizmo is visible, false otherwise
Sets the visibility of the locator gizmo.
True to show the locator gizmo, false to hide it
Gets the visibility state of the rotation gizmo.
True if the rotation gizmo is visible, false otherwise
Sets the visibility of the rotation gizmo.
True to show the rotation gizmo, false to hide it
Gets the visibility state of the scale gizmo.
True if the scale gizmo is visible, false otherwise
Sets the visibility of the scale gizmo.
True to show the scale gizmo, false to hide it
Checks if this node is at the top level (has no parent).
True if this is a root node, false otherwise
Gets the visibility state of the translation gizmo.
True if the translation gizmo is visible, false otherwise
Sets the visibility of the translation gizmo.
True to show the translation gizmo, false to hide it
Gets the visibility state of this scene graph node.
True if visible, false if hidden
Sets the visibility of this scene graph node.
True to make visible, false to hide
Gets the internal world matrix (mutable reference).
The internal world matrix
Gets a clone of the world matrix in rest pose.
A cloned copy of the world matrix in rest pose
Gets the internal world matrix in rest pose (mutable reference).
The internal world matrix in rest pose
Gets the internal normal matrix (mutable reference).
The internal normal matrix
Gets the unique object identifier
The object's UID
Gets the parent scene graph component of this node.
The parent component, or undefined if this is a root node
Sets the world position and updates physics simulation if present.
The world position to set
Sets the world rotation and updates physics simulation if present.
The quaternion rotation to set
Sets the world scale and updates physics simulation if present.
The scale vector to set
Gets the unique name of this object
The unique name string
Gets the cached merged world AABB, recalculating if dirty.
The merged world AABB of this node and all its descendants
Gets the cached merged world AABB with skeletal animation, recalculating if dirty.
The merged world AABB with skeletal transformations
StaticcomponentGets the component type identifier for SceneGraphComponent.
The component type ID
Adds a SceneGraph component as a gizmo child (internal use only).
The SceneGraph component of a gizmo to add
InternalCopies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Destroys this component and cleans up resources.
Performs a shallow copy from another SceneGraphComponent.
The source component to copy from
Loads the component and moves to the Logic stage.
Executes logic stage processing including matrix updates and gizmo updates.
Adds a SceneGraph component as a child of this node.
The SceneGraph component to add as a child
Whether to keep the child's world pose
Adds this component to an entity and extends it with SceneGraph functionality.
The target entity to extend
The component class being added (unused)
The extended entity with SceneGraph methods
Calculates the merged world AABB including all children.
The merged world AABB of this node and all its descendants
Calculates the merged world AABB with skeletal animation including all children.
The merged world AABB with skeletal transformations
Performs ray casting against all mesh components in this hierarchy.
The ray origin point in world space
The ray direction vector in world space (should be normalized)
Threshold for triangle-ray intersection angle (default: 0)
Array of mesh components to exclude from ray casting (default: [])
Ray casting result containing intersection information
Performs ray casting from screen coordinates against all mesh components in this hierarchy.
Screen x coordinate
Screen y coordinate
The camera component to use for screen-to-world projection
Viewport rectangle as Vector4 (x, y, width, height)
Threshold for triangle-ray intersection angle (default: 0)
Array of mesh components to exclude from ray casting (default: [])
Ray casting result containing intersection information in world space
Transforms a world position to local space and stores the result in the output vector.
The position in world space
The output vector to store the result
The output vector containing the local position
Gets the world position in rest pose and stores it in the output vector.
The output vector to store the position
The output vector containing the world position in rest pose
Gets the world position and stores it in the output vector.
The output vector to store the position
The output vector containing the world position
Gets the world rotation quaternion by recursively combining local rotations.
The world rotation quaternion
Gets the world rotation in rest pose with conditional termination.
Function to determine if recursion should stop at this node
The world rotation quaternion in rest pose
Gets the world rotation and stores it in the output quaternion.
The output quaternion to store the rotation
The output quaternion containing the world rotation
Retrieves a complete tag object (name and value) for the specified tag name
The name of the tag to retrieve
A Tag object containing the name and value
Retrieves the value associated with a specific tag name
The name of the tag whose value to retrieve
The tag value, or undefined if the tag doesn't exist
Gets the world-space AABB (Axis-Aligned Bounding Box) of this node.
The world AABB of this node
Gets the world-space AABB with skeletal animation applied.
The world AABB with skeletal transformations
Transforms a local position to world space and stores the result in the output vector.
The position in local space
The output vector to store the result
The output vector containing the world position
Checks whether this object has a tag with the specified name
The name of the tag to check for
True if the tag exists (value is not null/undefined), false otherwise
Checks whether the specified ProcessStage method exists in this Component instance. This is used to determine if this component can handle a particular process stage.
The process stage to check for
True if the method exists, false otherwise
Checks if this node represents a skeletal joint.
True if this is a joint (has a valid joint index), false otherwise
Checks if the world matrix is up-to-date recursively up the hierarchy.
True if the world matrix is up-to-date for this node and all its ancestors
Checks if this object has a tag with the specified name and value
The tag name to match
The tag value to match
True if the object has a matching tag, false otherwise
Checks if this object has all the specified tags with exactly matching values
Object containing tag names as keys and expected values
True if all specified tags exist with matching values, false otherwise
Checks if the object's combined tag string contains all the provided search strings. This allows for flexible searching within tag names and values.
Array of strings that must all be present in the combined tag string
True if all strings are found in the combined tag string, false otherwise
Transitions the component to a different process stage. This affects which update methods will be called during the frame processing.
The target stage to move to
Registers a dependency relationship with another component. This method is intended for future use in managing component dependencies.
Removes a child SceneGraph component from this node.
The SceneGraph component to remove
Removes a tag from this object
The name of the tag to remove
Updates the physics simulation with the new Euler angles.
The Euler angles (in radians) to set in physics
Sets the billboard state of this node and all its children recursively.
True to enable billboard behavior, false to disable
Updates the physics simulation with the new position.
The world position to set in physics
Sets the world position without updating physics simulation.
The world position to set
Updates the physics simulation with the new rotation.
The quaternion rotation to set in physics
Sets the world rotation without updating physics simulation.
The quaternion rotation to set
Updates the physics simulation with the new scale.
The scale vector to set in physics
Sets the coordinate space for transformation gizmos.
The coordinate space ('local' or 'world')
Sets the visibility of this node and all its children recursively.
True to make visible, false to hide
Recursively marks the world AABB as dirty up the parent hierarchy.
Marks the world matrix as dirty and propagates changes up the hierarchy.
Recursively marks the world matrix as dirty for this node and all children.
Marks the world matrix as dirty without checking if the AABB is dirty.
Marks the world matrix rest state as dirty and propagates to children.
Recursively marks the world matrix rest state as dirty for this node and all children.
Allocates memory for all member fields of this component instance. This method is called during component initialization to set up memory layout and allocate space for the specified number of entities.
The number of components per buffer view
Whether to reuse existing memory allocations
Attempts to set a tag on this object. If the tag already exists, it will be replaced.
The tag object containing the name and value to set
True if the tag was successfully set, false if the tag name contains invalid characters
Attempts to set a unique name for this object
The desired unique name
If true, appends UID to make name unique when conflicts occur; if false, fails on conflict
True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false
Unregisters this object from all tracking collections. Should be called when the object is being destroyed.
Validates that a tag string contains only allowed characters (alphanumeric and underscore)
The string to validate
True if the string contains only valid characters, false if it contains invalid characters
Static_InternalCleans up static resources associated with the specified engine.
The engine instance to clean up resources for
Static_InternalResets all static object tracking data. Used primarily for testing.
StaticdoesChecks whether the specified ProcessStage method exists in the given Component class. This is used to determine if a component can handle a particular process stage.
The component class to check
The process stage to check for
True if the method exists, false otherwise
StaticgetStaticgetStaticgetGets the ComponentType of a specific member field in a component class. This is useful for understanding the primitive data type of component members.
The ComponentType of the member or undefined if not found
StaticgetGets the CompositionType of a specific member field in a component class. This is useful for understanding the data structure of component members.
The CompositionType of the member or undefined if not found
StaticgetGets the pixel location offset in the buffer for a specific member of a component type. This is useful for GPU texture-based data access where locations are measured in pixels.
The pixel location offset in the buffer
StaticgetGets the member info of the component. This is useful for getting the member info of the component.
The member info of the component
StaticgetRetrieves an RnObject instance by its unique identifier
The unique identifier of the object to retrieve
The RnObject instance or undefined if not found or garbage collected
StaticgetRetrieves an RnObject instance by its unique name
The unique name of the object to retrieve
The RnObject instance or undefined if not found or garbage collected
StaticgetGets the state version of the component memory layout. This is incremented whenever the component's memory layout changes.
The engine instance
The state version number
StaticgetGets all top-level scene graph components (nodes without parents).
An array of scene graph components that are at the root level
StaticgetGets the update counter for scene graph components of the specified engine.
The engine instance to get the update count for
The current update count for the specified engine
StaticprocessProcesses all components of a given type for a specific process stage. This method iterates through all components of the specified type and calls their corresponding process stage method if they are in that stage.
The component class to process
The process stage to execute
StaticregisterRegisters a member field of the component class for memory allocation. This method defines the memory layout and characteristics of component data members.
The intended purpose/type of buffer use
StaticsearchSearches for the first object that has a specific tag with the given value
The tag name to search for
The tag value to match
WeakRef to the first matching object, or undefined if not found
StaticupdateUpdates components specifically for the render stage with render pass context. This method calls the sort_$render method of the component class to handle render-specific processing and sorting.
The component class to update
The current render pass context
The result of the sort_$render method
SceneGraphComponent is a component that represents a node in the scene graph. It manages hierarchical relationships between entities and handles world matrix calculations.