struct
Diorite::FrameBatchContext
- Diorite::FrameBatchContext
- Struct
- Value
- Object
Overview
Unified 2D/3D zero-allocation frame batch builder yielded by Diorite.frame { |batch| ... }.
Diorite.frame do |batch|
batch.line(from, to, color)
batch.box(aabb, color)
batch.circle_2d(center_2d, 32.0_f32, color)
end
Defined in:
diorite/core/frame_arena_batch.crConstant 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
- #arc_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self
- #arrow(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 0.25_f32, on_top : Bool = true) : self
- #arrow_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 10.0_f32) : self
- #arrow_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 0.25_f32, on_top : Bool = true) : self
- #box(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #box(aabb : Godot::AABB, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #box_3d(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #buffers : FrameDrawBuffers
- #canvas_2d : FrameBatchBuilder2D
- #capsule(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : self
- #capsule_2d(p0 : Godot::Vector2, p1 : Godot::Vector2, radius : Float32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 12) : self
- #capsule_3d(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : self
- #circle_2d(center : Godot::Vector2, radius : Float32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 24) : self
- #cylinder(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : self
- #cylinder_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : self
- #depth_3d : FrameBatchBuilder3D
- #draw_2d(& : FrameBatchBuilder2D -> ) : self
- #draw_3d(on_top : Bool = true, & : FrameBatchBuilder3D -> ) : self
- #gizmo(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32, on_top : Bool = true) : self
- #gizmo_3d(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32, on_top : Bool = true) : self
- #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, on_top : Bool = true) : self
- #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, on_top : Bool = true) : self
- #line(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #line_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR) : self
- #line_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #line_path(points, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #line_path_3d(points, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
- #on_top_3d : FrameBatchBuilder3D
- #path_2d(pts, color : Godot::Color = DEFAULT_COLOR) : self
- #points_2d(pts, size : Float32 = 4.0_f32, color : Godot::Color = DEFAULT_COLOR) : self
- #rect_2d(r : Godot::Rect2, color : Godot::Color = DEFAULT_COLOR) : self
- #ruler_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR, tick_step : Float32 = 20.0_f32, tick_size : Float32 = 8.0_f32) : self
- #sector_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self
- #sphere(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16, on_top : Bool = true) : self
- #sphere_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16, on_top : Bool = true) : self
- #telemetry_graph(graph : TelemetryGraph) : self
- #total_lines_2d : Int32
- #total_lines_3d : Int32
- #total_vertices_2d : Int32
- #total_vertices_3d : Int32
- #vision_cone_2d(origin : Godot::Vector2, dir : Godot::Vector2, distance : Float32, angle_rad : Float32, segments : Int32 = 16, color : Godot::Color = DEFAULT_COLOR) : self
Constructor Detail
Instance Method Detail
def arc_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, 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, on_top : Bool = true) : self
#
def arrow_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 10.0_f32) : self
#
def arrow_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, head_size : Float32 = 0.25_f32, on_top : Bool = true) : self
#
def box(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
#
def box_3d(center : Godot::Vector3, size : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
#
def capsule(center : Godot::Vector3, radius : Float32 = 0.5_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : self
#
def capsule_2d(p0 : Godot::Vector2, p1 : Godot::Vector2, radius : Float32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 12) : 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, on_top : Bool = true) : self
#
def circle_2d(center : Godot::Vector2, radius : Float32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 24) : self
#
def cylinder(center : Godot::Vector3, radius : Float32 = 1.0_f32, height : Float32 = 2.0_f32, color : Godot::Color = DEFAULT_COLOR, segments : Int32 = 16, on_top : Bool = true) : 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, on_top : Bool = true) : self
#
def gizmo(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32, on_top : Bool = true) : self
#
def gizmo_3d(origin : Godot::Vector3, basis : Godot::Basis = Godot::Basis.new, size : Float32 = 1.0_f32, on_top : Bool = true) : 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, on_top : Bool = true) : 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, on_top : Bool = true) : self
#
def line(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
#
def line_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR) : self
#
def line_3d(from : Godot::Vector3, to : Godot::Vector3, color : Godot::Color = DEFAULT_COLOR, on_top : Bool = true) : self
#
def ruler_2d(from : Godot::Vector2, to : Godot::Vector2, color : Godot::Color = DEFAULT_COLOR, tick_step : Float32 = 20.0_f32, tick_size : Float32 = 8.0_f32) : self
#
def sector_2d(center : Godot::Vector2, radius : Float32, start_angle : Float32, end_angle : Float32, segments : Int32 = 24, color : Godot::Color = DEFAULT_COLOR) : self
#
def sphere(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16, on_top : Bool = true) : self
#
def sphere_3d(center : Godot::Vector3, radius : Float32 = 1.0_f32, color : Godot::Color = DEFAULT_COLOR, rings : Int32 = 16, on_top : Bool = true) : self
#
def vision_cone_2d(origin : Godot::Vector2, dir : Godot::Vector2, distance : Float32, angle_rad : Float32, segments : Int32 = 16, color : Godot::Color = DEFAULT_COLOR) : self
#