Creates a new SceneGraphComponent 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
__currentProtected
__entitythe instance of EntityRepository
Protected
__entitythe entity unique Id which this component belongs to
Protected
__memorythe instance of MemoryManager
Collection of tags associated with this object
Static
Readonly
InvalidInvalid object UID constant
Static
Readonly
_processStatic
currentCurrent maximum object count for UID generation
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 world rotation as Euler angles.
The world rotation as Euler angles (in radians)
Sets the world rotation using Euler angles and updates physics simulation if present.
The Euler angles (in radians) to set
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 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 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 a clone of the world matrix.
A cloned copy of the world matrix
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 maximum number of components of this type that can exist.
The maximum number of components
Gets a clone of the normal matrix.
A cloned copy of the normal matrix
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
Gets the world position of this node.
The world position
Sets the world position and updates physics simulation if present.
The world position to set
Gets the world position in rest pose.
The world position in rest pose
Gets the world rotation as a quaternion.
The world rotation quaternion
Sets the world rotation and updates physics simulation if present.
The quaternion rotation to set
Gets the world rotation in rest pose.
The world rotation quaternion in rest pose
Gets the world scale of this node.
The world scale vector
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
Static
componentTIDGets the component type identifier for SceneGraphComponent.
The component type ID
Static
updateGets the current update count for scene graph changes.
The current update count
Adds a SceneGraph component as a gizmo child (internal use only).
The SceneGraph component of a gizmo to add
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Performs a shallow copy from another SceneGraphComponent.
The source component to copy from
Adds a SceneGraph component as a child of this node.
The SceneGraph component to add as a child
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
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
Gets detailed byte information about a specific member field of this component. This includes offsets, lengths, and location information for GPU access.
The name of the member field
Detailed byte information object
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
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 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 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.
The component to depend on
Whether this dependency is required
Registers 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
The name of the member field
The class type of the data
The primitive data type (e.g., Float32, Int32)
Initial values for the member field
Removes a child SceneGraph component from this node.
The SceneGraph component to remove
Updates the physics simulation with the new Euler angles.
The Euler angles (in radians) to set in physics
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
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 entities to allocate memory for
Whether to reuse existing memory allocations
Allocates memory for a specific member field of this component instance. This method takes one memory slot from the shared memory pool for the specified member.
The name of the member field
The data class type for the member
Initial values to set for the member
Whether to reuse an existing memory slot
The component scoped ID
null on success
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
Static
_resetStatic
doesChecks 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
Static
getGets the memory accessor for a specific member field of a component class. The accessor provides access to the underlying typed array data.
The name of the member field
The component class
The accessor for the member field
Static
getGets the total byte length of all member fields for a specific buffer use type in the given component class.
The buffer use type
The component class
The total byte length of members
Static
getGets the byte offset of the first element of a specific member field within the buffer.
The name of the member field
The component class
The byte offset in the buffer
Static
getGets the byte offset of the first element of a specific member field within the buffer view.
The name of the member field
The component class
The byte offset in the buffer view
Static
getGets the byte offset of the component type's data within the buffer.
The buffer use type
The component class
The byte offset in the buffer
Static
getGets the ComponentType of a specific member field in a component class. This is useful for understanding the primitive data type of component members.
The name of the member field
The component class to query
The ComponentType of the member or undefined if not found
Static
getGets the CompositionType of a specific member field in a component class. This is useful for understanding the data structure of component members.
The name of the member field
The component class to query
The CompositionType of the member or undefined if not found
Static
getGets detailed byte information about a member field by Component SID. This is a static version that looks up the component by its scoped ID.
The component class type
The scoped ID of the component
The name of the member field
Detailed byte information object or undefined if component not found
Static
getGets detailed byte information about a specific member field of a component. This includes offsets, lengths, and location information for GPU access.
The component instance to analyze
The name of the member field
Detailed byte information object
Static
getGets 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 component class type
The name of the member field
The pixel location offset in the buffer
Static
getStatic
getStatic
getGets all top-level scene graph components (nodes without parents).
An array of scene graph components that are at the root level
Static
processProcesses 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
Static
searchSearches 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
Static
takeCreates and configures a memory accessor for a specific member field. This method allocates buffer memory and creates an accessor for efficient data access.
The intended use of the buffer
The name of the member field
The component class
The composition type (e.g., Vec3, Mat4)
The component data type (e.g., Float32, Int32)
The number of components to allocate for
Result containing the accessor or an error
Static
updateUpdates 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 render process stage
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.