ZBufferKey

Constructors

Link copied to clipboard
constructor()

Initializes a new instance of ZBufferKey class. It is used to instantiate a ZBufferKey object with default data values.

constructor(id: Int, dataType: ZDataType, name: String, size: Int, count: Int, normalized: Boolean, offset: Int, stride: Int, isIndexBuffer: Boolean, bufferId: Int)

Initializes a ZBufferKey object with the given arguments.

Properties

Link copied to clipboard

Represents the buffer ID associated with the ZBufferKey.

Link copied to clipboard
var count: Int

How many elements of this type are stored. Example: If we store 15 Vec3 elements in the data array the count will have a value of 15.

Link copied to clipboard
override val data: ZBufferKeyData

Provides access to the component's serializable data.

Link copied to clipboard

Type of data stored

Link copied to clipboard
var id: Int

ID for this Buffer Key.

Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard
var offset: Int
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

Provides access to the component's renderer.

Link copied to clipboard
var size: Int

How many elements are stored per data unit. Example: a Vec3 will have size equals to 3 in the same way a Scalar will be 1

Link copied to clipboard
var stride: Int

If the data is tightly represented within the array how many elements it requires to be jumped to the next one Example: We store a Vec3 postion and a Vec3 normal in the very same array, the stride will be 6

Functions

Link copied to clipboard
open override fun bind()

Binds the renderer. This method is called to prepare the renderer for drawing.

Link copied to clipboard
override fun dispose()

Disposes the component and releases resources. Idempotent: multiple calls are safe. Subclasses with own state to release should override internalDispose.

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

Initializes the ZComponent using the provided ZRenderingContext.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun unbind()

Unbinds the renderer. This method is called after drawing to clean up.