ZBuffer

Utility class for representing the mix of a ZBufferKey + ZBufferContent in a simpler way Notice that ZBufferKey will only address one ZBufferContent, however one ZBufferContent can be addressed by more than one ZBufferKey

Constructors

Link copied to clipboard
constructor()

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

constructor(key: ZBufferKey, content: ZBufferContent)

Initializes a ZBuffer object with a ZBufferKey and ZBufferContent.

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

Initializes a ZBuffer object with the given arguments.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Represents the buffer ID associated with the ZBuffer.

Link copied to clipboard
val 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

Represents an array of bytes for ZBufferData data.

Link copied to clipboard

Type of data stored

Link copied to clipboard
Link copied to clipboard

Indicates whether the data has any data.

Link copied to clipboard
val id: Int

ID for this Buffer.

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

Indicates whether this component can be serialized.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val 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
val 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
val 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
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.