struct Diorite::FrameLineBatch3D

Overview

Stack-allocated 3D vertex and color batch buffer carved out of Lapis::Core::FrameArena.

Defined in:

diorite/core/frame_arena_batch.cr

Constant Summary

DEFAULT_CAPACITY = 8192

Constructors

Instance Method Summary

Constructor Detail

def self.from_arena(arena : Lapis::Core::FrameArena = Lapis::Core::FrameArena.current, max_vertices : Int32 = DEFAULT_CAPACITY) : FrameLineBatch3D #

Allocates a paired 3D vertex + color batch from arena.


def self.new(verts : ArenaVertexBuffer(Godot::Vector3), cols : ArenaVertexBuffer(Godot::Color)) #

Instance Method Detail

def capacity : Int32 #

def clear : self #

def color_arena_buffer : Lapis::Core::ArenaBuffer(Godot::Color) #

def colors : Slice(Godot::Color) #

Zero-allocation Slice(Godot::Color) view over all written 3D vertex colors.


def cols : ArenaVertexBuffer(Godot::Color) #

def empty? : Bool #

def full? : Bool #

def line_count : Int32 #

def push_line(from : Godot::Vector3, to : Godot::Vector3, from_color : Godot::Color, to_color : Godot::Color) : Bool #

def push_line(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color) : Bool #

def push_vertex(vertex : Godot::Vector3, color : Godot::Color) : Bool #

def remaining : Int32 #

def size : Int32 #

def vertex_arena_buffer : Lapis::Core::ArenaBuffer(Godot::Vector3) #

def vertex_count : Int32 #

def vertices : Slice(Godot::Vector3) #

Zero-allocation Slice(Godot::Vector3) view over all written 3D vertices.


def verts : ArenaVertexBuffer(Godot::Vector3) #