ZOmniComponent

Represents an abstract component in the Zernikalos Engine that combines both rendering and serialization capabilities.

This component can be both rendered on screen and serialized to persistent storage, making it ideal for complex objects that need to maintain their visual state across application sessions. The component uses both ZRenderizableImpl and ZSerializableImpl mixins to handle rendering and serialization logic without code duplication.

Classes inheriting from this component must define how to create their specific renderer type and provide serializable data.

Type Parameters

D

The type of the data associated with this component. It must inherit from ZComponentData.

R

The type of the renderer associated with this component. It must inherit from ZComponentRenderer.

Inheritors

Constructors

Link copied to clipboard
constructor(data: D)

Properties

Link copied to clipboard
val data: D

Provides access to the component's serializable data.

Link copied to clipboard
override val isInitialized: Boolean

Represents a boolean value indicating whether a component has been initialized.

Link copied to clipboard
override val isRenderizable: Boolean

Represents a boolean value indicating whether a component is renderizable.

Link copied to clipboard

Indicates whether this component can be serialized.

Link copied to clipboard
override val refId: String

Represents the unique identifier for a reference-based component. The refId is used as a distinctive key for retrieving or linking this component within reference-dependent systems.

Link copied to clipboard
val renderer: R

Provides access to the component's renderer.

Functions

Link copied to clipboard
open override fun initialize(ctx: ZRenderingContext)

Initializes the ZComponent using the provided ZRenderingContext.