MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / draw_ray

Method draw_ray

native/shared/src/renderer/mod.rs:12693–12698  ·  view source on GitHub ↗
(&mut self, origin_x: f64, origin_y: f64, origin_z: f64, dir_x: f64, dir_y: f64, dir_z: f64, r: f64, g: f64, b: f64, a: f64)

Source from the content-addressed store, hash-verified

12691 }
12692
12693 pub fn draw_ray(&mut self, origin_x: f64, origin_y: f64, origin_z: f64, dir_x: f64, dir_y: f64, dir_z: f64, r: f64, g: f64, b: f64, a: f64) {
12694 let color = Self::color_to_f32(r, g, b, a);
12695 let start = [origin_x as f32, origin_y as f32, origin_z as f32];
12696 let end = [(origin_x + dir_x) as f32, (origin_y + dir_y) as f32, (origin_z + dir_z) as f32];
12697 self.add_line_3d(start, end, color, 0.02);
12698 }
12699
12700 pub fn draw_model_mesh(&mut self, vertices: &[Vertex3D], indices: &[u32], position: [f32; 3], scale: f32) {
12701 self.draw_model_mesh_tinted(vertices, indices, position, scale, [1.0, 1.0, 1.0, 1.0], 0);

Callers 7

bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80
bloom_draw_rayFunction · 0.80

Calls 1

add_line_3dMethod · 0.80

Tested by

no test coverage detected