Creates a new SphereColliderGizmo instance
The engine instance
The sphere collider to visualize
Protected__Protected__Protected__the target entity which this gizmo belong to
Protected Optional__The top entity of this gizmo group. A programmer who implements a gizmo class has to make this entity a child of the target entity's scene graph component that the gizmo will belong to manually.
Collection of tags associated with this object
StaticcurrentCurrent maximum object count for UID generation
Static ReadonlyInvalidInvalid object UID constant
Indicates whether the gizmo has been set up and is ready for use Must be implemented by concrete gizmo classes
Gets the current visibility state of the gizmo
True if the gizmo is visible, false otherwise
Sets the visibility state of the gizmo
True to make the gizmo visible, false to hide it
Gets the unique object identifier
The object's UID
Gets the unique name of this object
The unique name string
Protected__Internal method to set the visibility of the gizmo and all its child entities
True to show the gizmo, false to hide it
Protected__Determines whether the gizmo setup should be skipped
True if setup should be skipped, false otherwise
Protected__Internal
Marks the gizmo subtree's world matrices as dirty and materializes them immediately.
The GPU instance data (world and normal matrices) is uploaded at the beginning of the Render stage from component buffers, and those buffers are only written when the matrices are recalculated. A gizmo updated after the Logic stage (for example when only the camera changed) therefore has to recalculate its matrices here, otherwise the gizmo keeps being rendered with its previous transform until some later frame re-uploads the data.
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Internal
Cleans up and destroys the gizmo, releasing all associated resources
Internal
Sets up the entities and components required for the gizmo This method is called internally and should only be executed once
Internal
Updates the gizmo's transform, appearance, and other properties This method is typically called every frame to keep the gizmo synchronized with its target entity
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
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 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
Removes a tag from this object
The name of the tag to remove
ProtectedsetApplies appropriate tags to the gizmo entities for identification and categorization This method ensures that all gizmo entities are properly tagged for rendering and processing pipelines
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
Protected Static__Internal
Calculates a uniform world-space scale that keeps a unit-length gizmo element (an axis of length 1, or a ring of radius 1) at a constant fraction of the viewport height, independent of the target size and the camera distance.
The scale is derived from the vertical scale of the camera's projection matrix, so the on-screen size stays proportional to the viewport height for both perspective and orthographic cameras.
The uniform scale to apply to the gizmo's top entity
Static_Internal
Resets all static object tracking data. Used primarily for testing.
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
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
SphereColliderGizmo renders a sphere collider visualization for debugging purposes. The visualization is a semi-transparent green sphere that shows the collider's bounds. Uses instanced rendering for efficient drawing of multiple sphere colliders.