pub trait RaylibDraw3D {
Show 33 methods
// Provided methods
fn draw_point3D(
&mut self,
position: impl Into<Vector3>,
color: impl Into<Color>,
) { ... }
fn draw_triangle3D(
&mut self,
v1: impl Into<Vector3>,
v2: impl Into<Vector3>,
v3: impl Into<Vector3>,
color: impl Into<Color>,
) { ... }
fn draw_triangle_strip3D(
&mut self,
points: &[Vector3],
color: impl Into<Color>,
) { ... }
fn draw_line_3D(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
color: impl Into<Color>,
) { ... }
fn draw_circle_3D(
&mut self,
center: impl Into<Vector3>,
radius: f32,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
color: impl Into<Color>,
) { ... }
fn draw_cube(
&mut self,
position: impl Into<Vector3>,
width: f32,
height: f32,
length: f32,
color: impl Into<Color>,
) { ... }
fn draw_cube_v(
&mut self,
position: impl Into<Vector3>,
size: impl Into<Vector3>,
color: impl Into<Color>,
) { ... }
fn draw_cube_wires(
&mut self,
position: impl Into<Vector3>,
width: f32,
height: f32,
length: f32,
color: impl Into<Color>,
) { ... }
fn draw_cube_wires_v(
&mut self,
position: impl Into<Vector3>,
size: impl Into<Vector3>,
color: impl Into<Color>,
) { ... }
fn draw_mesh(
&mut self,
mesh: impl AsRef<Mesh>,
material: WeakMaterial,
transform: Matrix,
) { ... }
fn draw_mesh_instanced(
&mut self,
mesh: impl AsRef<Mesh>,
material: WeakMaterial,
transforms: &[Matrix],
) { ... }
fn draw_sphere(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
color: impl Into<Color>,
) { ... }
fn draw_sphere_ex(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
rings: i32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_sphere_wires(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
rings: i32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_cylinder(
&mut self,
position: impl Into<Vector3>,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_cylinder_ex(
&mut self,
start_position: impl Into<Vector3>,
end_position: impl Into<Vector3>,
radius_start: f32,
radius_end: f32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_cylinder_wires(
&mut self,
position: impl Into<Vector3>,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_cylinder_wires_ex(
&mut self,
start_position: impl Into<Vector3>,
end_position: impl Into<Vector3>,
radius_start: f32,
radius_end: f32,
slices: i32,
color: impl Into<Color>,
) { ... }
fn draw_capsule(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
radius: f32,
slices: i32,
rings: i32,
color: impl Into<Color>,
) { ... }
fn draw_capsule_wires(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
radius: f32,
slices: i32,
rings: i32,
color: impl Into<Color>,
) { ... }
fn draw_plane(
&mut self,
center_pos: impl Into<Vector3>,
size: impl Into<Vector2>,
color: impl Into<Color>,
) { ... }
fn draw_ray(&mut self, ray: Ray, color: impl Into<Color>) { ... }
fn draw_grid(&mut self, slices: i32, spacing: f32) { ... }
fn draw_model(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
scale: f32,
tint: impl Into<Color>,
) { ... }
fn draw_model_ex(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
scale: impl Into<Vector3>,
tint: impl Into<Color>,
) { ... }
fn draw_model_wires(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
scale: f32,
tint: impl Into<Color>,
) { ... }
fn draw_model_wires_ex(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
scale: impl Into<Vector3>,
tint: impl Into<Color>,
) { ... }
fn draw_bounding_box(
&mut self,
bbox: impl Into<BoundingBox>,
color: impl Into<Color>,
) { ... }
fn draw_billboard(
&mut self,
camera: impl Into<Camera3D>,
texture: &Texture2D,
center: impl Into<Vector3>,
size: f32,
tint: impl Into<Color>,
) { ... }
fn draw_billboard_rec(
&mut self,
camera: Camera3D,
texture: &Texture2D,
source_rec: impl Into<Rectangle>,
center: impl Into<Vector3>,
size: impl Into<Vector2>,
tint: impl Into<Color>,
) { ... }
fn draw_billboard_pro(
&mut self,
camera: impl Into<Camera3D>,
texture: impl Into<Texture>,
source: impl Into<Rectangle>,
position: impl Into<Vector3>,
up: impl Into<Vector3>,
size: impl Into<Vector2>,
origin: impl Into<Vector2>,
rotation: f32,
tint: impl Into<Color>,
) { ... }
fn draw_model_points(
&mut self,
model: impl Into<Model>,
position: impl Into<Vector3>,
scale: f32,
tint: impl Into<Color>,
) { ... }
fn draw_model_points_ex(
&mut self,
model: impl Into<Model>,
position: impl Into<Vector3>,
rotation_axis: impl Into<Vector3>,
angle: f32,
scale: impl Into<Vector3>,
tint: impl Into<Color>,
) { ... }
}Provided Methods§
Sourcefn draw_point3D(
&mut self,
position: impl Into<Vector3>,
color: impl Into<Color>,
)
fn draw_point3D( &mut self, position: impl Into<Vector3>, color: impl Into<Color>, )
Draw a point in 3D space, actually a small line
fn draw_triangle3D( &mut self, v1: impl Into<Vector3>, v2: impl Into<Vector3>, v3: impl Into<Vector3>, color: impl Into<Color>, )
Sourcefn draw_triangle_strip3D(&mut self, points: &[Vector3], color: impl Into<Color>)
fn draw_triangle_strip3D(&mut self, points: &[Vector3], color: impl Into<Color>)
// Draw a triangle strip defined by points
Sourcefn draw_line_3D(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
color: impl Into<Color>,
)
fn draw_line_3D( &mut self, start_pos: impl Into<Vector3>, end_pos: impl Into<Vector3>, color: impl Into<Color>, )
Draws a line in 3D world space.
Sourcefn draw_circle_3D(
&mut self,
center: impl Into<Vector3>,
radius: f32,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
color: impl Into<Color>,
)
fn draw_circle_3D( &mut self, center: impl Into<Vector3>, radius: f32, rotation_axis: impl Into<Vector3>, rotation_angle: f32, color: impl Into<Color>, )
Draws a circle in 3D world space.
Sourcefn draw_cube(
&mut self,
position: impl Into<Vector3>,
width: f32,
height: f32,
length: f32,
color: impl Into<Color>,
)
fn draw_cube( &mut self, position: impl Into<Vector3>, width: f32, height: f32, length: f32, color: impl Into<Color>, )
Draws a cube.
Sourcefn draw_cube_v(
&mut self,
position: impl Into<Vector3>,
size: impl Into<Vector3>,
color: impl Into<Color>,
)
fn draw_cube_v( &mut self, position: impl Into<Vector3>, size: impl Into<Vector3>, color: impl Into<Color>, )
Draws a cube (Vector version).
Sourcefn draw_cube_wires(
&mut self,
position: impl Into<Vector3>,
width: f32,
height: f32,
length: f32,
color: impl Into<Color>,
)
fn draw_cube_wires( &mut self, position: impl Into<Vector3>, width: f32, height: f32, length: f32, color: impl Into<Color>, )
Draws a cube in wireframe.
Sourcefn draw_cube_wires_v(
&mut self,
position: impl Into<Vector3>,
size: impl Into<Vector3>,
color: impl Into<Color>,
)
fn draw_cube_wires_v( &mut self, position: impl Into<Vector3>, size: impl Into<Vector3>, color: impl Into<Color>, )
Draws a cube in wireframe. (Vector Version)
Sourcefn draw_mesh(
&mut self,
mesh: impl AsRef<Mesh>,
material: WeakMaterial,
transform: Matrix,
)
fn draw_mesh( &mut self, mesh: impl AsRef<Mesh>, material: WeakMaterial, transform: Matrix, )
Draw a 3d mesh with material and transform
Sourcefn draw_mesh_instanced(
&mut self,
mesh: impl AsRef<Mesh>,
material: WeakMaterial,
transforms: &[Matrix],
)
fn draw_mesh_instanced( &mut self, mesh: impl AsRef<Mesh>, material: WeakMaterial, transforms: &[Matrix], )
Draw multiple mesh instances with material and different transforms
Sourcefn draw_sphere(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
color: impl Into<Color>,
)
fn draw_sphere( &mut self, center_pos: impl Into<Vector3>, radius: f32, color: impl Into<Color>, )
Draws a sphere.
Sourcefn draw_sphere_ex(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
rings: i32,
slices: i32,
color: impl Into<Color>,
)
fn draw_sphere_ex( &mut self, center_pos: impl Into<Vector3>, radius: f32, rings: i32, slices: i32, color: impl Into<Color>, )
Draws a sphere with extended parameters.
Sourcefn draw_sphere_wires(
&mut self,
center_pos: impl Into<Vector3>,
radius: f32,
rings: i32,
slices: i32,
color: impl Into<Color>,
)
fn draw_sphere_wires( &mut self, center_pos: impl Into<Vector3>, radius: f32, rings: i32, slices: i32, color: impl Into<Color>, )
Draws a sphere in wireframe.
Sourcefn draw_cylinder(
&mut self,
position: impl Into<Vector3>,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: i32,
color: impl Into<Color>,
)
fn draw_cylinder( &mut self, position: impl Into<Vector3>, radius_top: f32, radius_bottom: f32, height: f32, slices: i32, color: impl Into<Color>, )
Draws a cylinder.
Sourcefn draw_cylinder_ex(
&mut self,
start_position: impl Into<Vector3>,
end_position: impl Into<Vector3>,
radius_start: f32,
radius_end: f32,
slices: i32,
color: impl Into<Color>,
)
fn draw_cylinder_ex( &mut self, start_position: impl Into<Vector3>, end_position: impl Into<Vector3>, radius_start: f32, radius_end: f32, slices: i32, color: impl Into<Color>, )
Draws a cylinder with extended parameters.
Sourcefn draw_cylinder_wires(
&mut self,
position: impl Into<Vector3>,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: i32,
color: impl Into<Color>,
)
fn draw_cylinder_wires( &mut self, position: impl Into<Vector3>, radius_top: f32, radius_bottom: f32, height: f32, slices: i32, color: impl Into<Color>, )
Draws a cylinder in wireframe.
Sourcefn draw_cylinder_wires_ex(
&mut self,
start_position: impl Into<Vector3>,
end_position: impl Into<Vector3>,
radius_start: f32,
radius_end: f32,
slices: i32,
color: impl Into<Color>,
)
fn draw_cylinder_wires_ex( &mut self, start_position: impl Into<Vector3>, end_position: impl Into<Vector3>, radius_start: f32, radius_end: f32, slices: i32, color: impl Into<Color>, )
Draws a cylinder in wireframe with extended parameters.
Sourcefn draw_capsule(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
radius: f32,
slices: i32,
rings: i32,
color: impl Into<Color>,
)
fn draw_capsule( &mut self, start_pos: impl Into<Vector3>, end_pos: impl Into<Vector3>, radius: f32, slices: i32, rings: i32, color: impl Into<Color>, )
Draw capsule with the center of its sphere caps at startPos and endPos
Sourcefn draw_capsule_wires(
&mut self,
start_pos: impl Into<Vector3>,
end_pos: impl Into<Vector3>,
radius: f32,
slices: i32,
rings: i32,
color: impl Into<Color>,
)
fn draw_capsule_wires( &mut self, start_pos: impl Into<Vector3>, end_pos: impl Into<Vector3>, radius: f32, slices: i32, rings: i32, color: impl Into<Color>, )
Draw capsule wireframe with the center of its sphere caps at startPos and endPos
Sourcefn draw_plane(
&mut self,
center_pos: impl Into<Vector3>,
size: impl Into<Vector2>,
color: impl Into<Color>,
)
fn draw_plane( &mut self, center_pos: impl Into<Vector3>, size: impl Into<Vector2>, color: impl Into<Color>, )
Draws an X/Z plane.
Sourcefn draw_model(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
scale: f32,
tint: impl Into<Color>,
)
fn draw_model( &mut self, model: impl AsRef<Model>, position: impl Into<Vector3>, scale: f32, tint: impl Into<Color>, )
Draws a model (with texture if set).
Sourcefn draw_model_ex(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
scale: impl Into<Vector3>,
tint: impl Into<Color>,
)
fn draw_model_ex( &mut self, model: impl AsRef<Model>, position: impl Into<Vector3>, rotation_axis: impl Into<Vector3>, rotation_angle: f32, scale: impl Into<Vector3>, tint: impl Into<Color>, )
Draws a model with extended parameters.
Sourcefn draw_model_wires(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
scale: f32,
tint: impl Into<Color>,
)
fn draw_model_wires( &mut self, model: impl AsRef<Model>, position: impl Into<Vector3>, scale: f32, tint: impl Into<Color>, )
Draws a model with wires (with texture if set).
Sourcefn draw_model_wires_ex(
&mut self,
model: impl AsRef<Model>,
position: impl Into<Vector3>,
rotation_axis: impl Into<Vector3>,
rotation_angle: f32,
scale: impl Into<Vector3>,
tint: impl Into<Color>,
)
fn draw_model_wires_ex( &mut self, model: impl AsRef<Model>, position: impl Into<Vector3>, rotation_axis: impl Into<Vector3>, rotation_angle: f32, scale: impl Into<Vector3>, tint: impl Into<Color>, )
Draws a model with wires.
Sourcefn draw_bounding_box(
&mut self,
bbox: impl Into<BoundingBox>,
color: impl Into<Color>,
)
fn draw_bounding_box( &mut self, bbox: impl Into<BoundingBox>, color: impl Into<Color>, )
Draws a bounding box (wires).
Sourcefn draw_billboard(
&mut self,
camera: impl Into<Camera3D>,
texture: &Texture2D,
center: impl Into<Vector3>,
size: f32,
tint: impl Into<Color>,
)
fn draw_billboard( &mut self, camera: impl Into<Camera3D>, texture: &Texture2D, center: impl Into<Vector3>, size: f32, tint: impl Into<Color>, )
Draws a billboard texture.
Sourcefn draw_billboard_rec(
&mut self,
camera: Camera3D,
texture: &Texture2D,
source_rec: impl Into<Rectangle>,
center: impl Into<Vector3>,
size: impl Into<Vector2>,
tint: impl Into<Color>,
)
fn draw_billboard_rec( &mut self, camera: Camera3D, texture: &Texture2D, source_rec: impl Into<Rectangle>, center: impl Into<Vector3>, size: impl Into<Vector2>, tint: impl Into<Color>, )
Draws a billboard texture defined by source_rec.
Sourcefn draw_billboard_pro(
&mut self,
camera: impl Into<Camera3D>,
texture: impl Into<Texture>,
source: impl Into<Rectangle>,
position: impl Into<Vector3>,
up: impl Into<Vector3>,
size: impl Into<Vector2>,
origin: impl Into<Vector2>,
rotation: f32,
tint: impl Into<Color>,
)
fn draw_billboard_pro( &mut self, camera: impl Into<Camera3D>, texture: impl Into<Texture>, source: impl Into<Rectangle>, position: impl Into<Vector3>, up: impl Into<Vector3>, size: impl Into<Vector2>, origin: impl Into<Vector2>, rotation: f32, tint: impl Into<Color>, )
Draw a billboard texture defined by source and rotation
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.