struct Diorite::FrameBatchBuilder3D

Overview

Ergonomic 3D immediate batch builder writing directly into a FrameLineBatch3D carved out of Lapis::Core::FrameArena.

Defined in:

diorite/core/frame_arena_batch.cr

Constant Summary

DEFAULT_COLOR = Godot::Color.new(1.0_f32, 1.0_f32, 1.0_f32, 1.0_f32)
DEFAULT_GRID_COLOR = Godot::Color.new(0.6_f32, 0.6_f32, 0.6_f32, 0.5_f32)

Constructors

Instance Method Summary

Constructor Detail

def self.new(batch : FrameLineBatch3D) #

def self.wrap(batch : FrameLineBatch3D) : FrameBatchBuilder3D #

Instance Method Detail

def actor_card_3d(position : Godot::Vector3, size : Godot::Vector2 = Godot::Vector2.new(1.2_f32, 0.8_f32), color : Godot::Color = DEFAULT_COLOR) : self #

def arrow(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 0.25_f32) : self #

def arrow_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 0.25_f32) : self #

def batch : FrameLineBatch3D #

def bezier_cubic(p0 : Godot::Vector3, p1 : Godot::Vector3, p2 : Godot::Vector3, p3 : Godot::Vector3, segments : Int32 = 32, color : Godot::Color = DEFAULT_COLOR, show_hull : Bool = true) : self #

def billboard_square(position : Godot::Vector3, size : Float32 = 1.0_f32, camera_pos : Godot::Vector3 = Godot::Vector3.new, color : Godot::Color = DEFAULT_COLOR) : self #

def box(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR) : self #

def box(aabb : Godot::AABB, color : Godot::Color = DEFAULT_COLOR) : self #

def box_3d(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR) : self #

def box_cast(from : Godot::Vector3, to : Godot::Vector3, size : Godot::Vector3 = Godot::Vector3.new(1.0_f32, 1.0_f32, 1.0_f32), hit : Bool = false, color : Godot::Color = DEFAULT_COLOR) : self #

def camera_frustum(origin : Godot::Vector3, basis : Godot::Basis, fov_deg : Float32 = 75.0_f32, near : Float32 = 0.05_f32, far : Float32 = 10.0_f32, aspect : Float32 = 1.777_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def capsule(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16) : self #

def capsule_3d(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16) : self #

def capsule_cast(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 1.8_f32, hit : Bool = false, color : Godot::Color = DEFAULT_COLOR) : self #

def catmull_rom(points, segments_per_curve : Int32 = 16, color : Godot::Color = DEFAULT_COLOR, loop : Bool = false) : self #

def circle_3d(center : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0.0_f32, 1.0_f32, 0.0_f32), radius : Float32 = 1.0_f32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self #

def colors : Slice(Godot::Color) #

def cols : ArenaVertexBuffer(Godot::Color) #

def cone_3d(tip : Godot::Vector3, dir : Godot::Vector3, length : Float32 = 5.0_f32, angle_rad : Float32 = 0.52359877_f32, segments : Int32 = 16, color : Godot::Color = DEFAULT_COLOR) : self #

def cylinder(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16) : self #

def cylinder_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16) : self #

def gauge_3d(center : Godot::Vector3, normal : Godot::Vector3, radius : Float32, value : Float32, min_val : Float32 = 0.0_f32, max_val : Float32 = 100.0_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def gizmo(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32) : self #

def gizmo_3d(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32) : self #

def grid(center : Godot::Vector3 = Godot::Vector3.new, size : Godot::Vector2 = Godot::Vector2.new(10.0_f32, 10.0_f32), subdivisions : Int32 = 10, color : Godot::Color = DEFAULT_GRID_COLOR) : self #

def grid_3d(center : Godot::Vector3 = Godot::Vector3.new, size : Godot::Vector2 = Godot::Vector2.new(10.0_f32, 10.0_f32), subdivisions : Int32 = 10, color : Godot::Color = DEFAULT_GRID_COLOR) : self #

def line(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR) : self #

def line_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR) : self #

def line_count : Int32 #

def line_path(points, color : Godot::Color = DEFAULT_COLOR) : self #

def line_path_3d(points, color : Godot::Color = DEFAULT_COLOR) : self #

def obb(center : Godot::Vector3, size : Godot::Vector3, basis : Godot::Basis, color : Godot::Color = DEFAULT_COLOR) : self #

def pie_chart_3d(center : Godot::Vector3, normal : Godot::Vector3, radius : Float32, slices : Array(PieSlice), inner_radius : Float32 = 0.0_f32) : self #

def plane(center : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0.0_f32, 1.0_f32, 0.0_f32), size : Godot::Vector2 = Godot::Vector2.new(5.0_f32, 5.0_f32), color : Godot::Color = DEFAULT_COLOR) : self #

def plane_3d(center : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0.0_f32, 1.0_f32, 0.0_f32), size : Godot::Vector2 = Godot::Vector2.new(5.0_f32, 5.0_f32), color : Godot::Color = DEFAULT_COLOR) : self #

def points(pts, size : Float32 = 0.1_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def points_3d(pts, size : Float32 = 0.1_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def position_3d(origin : Godot::Vector3, size : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def ray_hit(origin : Godot::Vector3, hit_point : Godot::Vector3, normal : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR) : self #

def reticle(position : Godot::Vector3, normal : Godot::Vector3 = Godot::Vector3.new(0.0_f32, 0.0_f32, 1.0_f32), size : Float32 = 0.5_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def ruler(from : Godot::Vector3, to : Godot::Vector3, tick_size : Float32 = 0.2_f32, color : Godot::Color = DEFAULT_COLOR) : self #

def sphere(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16) : self #

def sphere_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16) : self #

def sphere_cast(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.5_f32, hit : Bool = false, color : Godot::Color = DEFAULT_COLOR) : self #

def spring(from : Godot::Vector3, to : Godot::Vector3, radius : Float32 = 0.2_f32, coils : Int32 = 8, segments : Int32 = 16, color : Godot::Color = DEFAULT_COLOR) : self #

def surface_disk(position : Godot::Vector3, normal : Godot::Vector3, radius : Float32 = 0.5_f32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self #

def trajectory_arc(origin : Godot::Vector3, velocity : Godot::Vector3, gravity : Godot::Vector3 = Godot::Vector3.new(0.0_f32, -9.8_f32, 0.0_f32), max_time : Float32 = 3.0_f32, steps : Int32 = 40, color : Godot::Color = DEFAULT_COLOR) : self #

def vertex_count : Int32 #

def vertices : Slice(Godot::Vector3) #

def verts : ArenaVertexBuffer(Godot::Vector3) #

def vision_cone(origin : Godot::Vector3, direction : Godot::Vector3, angle_deg : Float32 = 45.0_f32, range : Float32 = 10.0_f32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self #