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(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.

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
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
open override val isRenderizable: Boolean = true

Represents a boolean value indicating whether a component is renderizable.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val offset: Int
Link copied to clipboard
override val refId: Int

Represents the unique reference identifier for a component.

Link copied to clipboard
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 fun bind()

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

Link copied to clipboard
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 fun unbind()

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