pub trait Drawwhere
Self: Sized,{
Show 76 methods
// Provided methods
fn clear_background(&mut self, color: Color) { ... }
fn begin_mode_2d(&mut self, camera: Camera2D) -> DrawMode2D<'_, Self> { ... }
fn begin_mode_3d(&mut self, camera: Camera3D) -> DrawMode3D<'_, Self> { ... }
fn begin_texture_mode(
&mut self,
target: &RenderTexture2D,
) -> DrawTextureMode<'_, Self> { ... }
fn begin_shader_mode(&mut self, shader: &Shader) -> DrawShaderMode<'_, Self> { ... }
fn begin_blend_mode(&mut self, mode: BlendMode) -> DrawBlendMode<'_, Self> { ... }
fn begin_scissor_mode(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
) -> DrawScissorMode<'_, Self> { ... }
fn begin_vr_stereo_mode(
&mut self,
config: VrStereoConfig,
) -> DrawVrStereoMode<'_, Self> { ... }
fn draw_texture(
&mut self,
tex: &Texture,
position: Vector2,
params: DrawTextureParams,
) { ... }
fn draw_texture_patch(
&mut self,
tex: &Texture,
position: Vector2,
params: DrawTextureParams,
patch_info: NPatchInfo,
) { ... }
fn set_shapes_texture(&mut self, texture: &Texture, source: Rectangle) { ... }
fn draw_pixel(&mut self, position: Vector2, color: Color) { ... }
fn draw_line(&mut self, start: Vector2, end: Vector2, color: Color) { ... }
fn draw_line_thick(
&mut self,
start: Vector2,
end: Vector2,
thickness: f32,
color: Color,
) { ... }
fn draw_line_bezier(
&mut self,
start: Vector2,
end: Vector2,
thickness: f32,
color: Color,
) { ... }
fn draw_line_bezier_quad(
&mut self,
start: Vector2,
end: Vector2,
control_pos: Vector2,
thickness: f32,
color: Color,
) { ... }
fn draw_line_bezier_cubic(
&mut self,
start: Vector2,
end: Vector2,
start_control_pos: Vector2,
end_control_pos: Vector2,
thickness: f32,
color: Color,
) { ... }
fn draw_line_strip(&mut self, points: &[Vector2], color: Color) { ... }
fn draw_circle(&mut self, center: Vector2, radius: f32, color: Color) { ... }
fn draw_circle_lines(
&mut self,
center_x: i32,
center_y: i32,
radius: f32,
color: Color,
) { ... }
fn draw_ellipse(&mut self, center: Vector2, radius: Vector2, color: Color) { ... }
fn draw_ellipse_lines(
&mut self,
center: Vector2,
radius: Vector2,
color: Color,
) { ... }
fn draw_circle_sector(
&mut self,
center: Vector2,
radius: f32,
angle: Range<f32>,
segments: u32,
color: Color,
) { ... }
fn draw_circle_sector_lines(
&mut self,
center: Vector2,
radius: f32,
angle: Range<f32>,
segments: u32,
color: Color,
) { ... }
fn draw_circle_gradient(
&mut self,
center: Vector2,
radius: f32,
color1: Color,
color2: Color,
) { ... }
fn draw_ring(
&mut self,
center: Vector2,
inner_radius: f32,
outer_radius: f32,
start_angle: f32,
end_angle: f32,
segments: u32,
color: Color,
) { ... }
fn draw_ring_lines(
&mut self,
center: Vector2,
radius: Range<f32>,
angle: Range<f32>,
segments: u32,
color: Color,
) { ... }
fn draw_rectangle(&mut self, rect: Rectangle, color: Color) { ... }
fn draw_rectangle_lines(&mut self, rect: Rectangle, color: Color) { ... }
fn draw_rectangle_lines_thick(
&mut self,
rect: Rectangle,
line_thickness: f32,
color: Color,
) { ... }
fn draw_rectangle_rotated(
&mut self,
rect: Rectangle,
origin: Vector2,
rotation: f32,
color: Color,
) { ... }
fn draw_rectangle_gradient_vertical(
&mut self,
rect: Rectangle,
color1: Color,
color2: Color,
) { ... }
fn draw_rectangle_gradient_horizontal(
&mut self,
rect: Rectangle,
color1: Color,
color2: Color,
) { ... }
fn draw_rectangle_gradient(
&mut self,
rect: Rectangle,
col1: Color,
col2: Color,
col3: Color,
col4: Color,
) { ... }
fn draw_rectangle_rounded(
&mut self,
rect: Rectangle,
roundness: f32,
segments: u32,
color: Color,
) { ... }
fn draw_rectangle_rounded_lines(
&mut self,
rect: Rectangle,
roundness: f32,
segments: u32,
line_thickness: f32,
color: Color,
) { ... }
fn draw_triangle(
&mut self,
v1: Vector2,
v2: Vector2,
v3: Vector2,
color: Color,
) { ... }
fn draw_triangle_lines(
&mut self,
v1: Vector2,
v2: Vector2,
v3: Vector2,
color: Color,
) { ... }
fn draw_triangle_fan(&mut self, points: &[Vector2], color: Color) { ... }
fn draw_triangle_strip(&mut self, points: &[Vector2], color: Color) { ... }
fn draw_polygon(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
color: Color,
) { ... }
fn draw_polygon_lines(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
color: Color,
) { ... }
fn draw_polygon_lines_thick(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
line_thickness: f32,
color: Color,
) { ... }
fn draw_fps(&mut self, position: Vector2) { ... }
fn draw_text(
&mut self,
text: &str,
position: Vector2,
font_size: u32,
color: Color,
) { ... }
fn draw_text_with_font(
&mut self,
text: &str,
pos: Vector2,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
) { ... }
fn draw_text_with_font_and_rotation(
&mut self,
text: &str,
pos: Vector2,
origin: Vector2,
rotation: f32,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
) { ... }
fn draw_char(
&mut self,
ch: char,
pos: Vector2,
font: &Font,
font_size: f32,
tint: Color,
) { ... }
fn draw_chars(
&mut self,
chars: &[char],
pos: Vector2,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
) { ... }
fn draw_line_3d(
&mut self,
start_pos: Vector3,
end_pos: Vector3,
color: Color,
) { ... }
fn draw_point_3d(&mut self, position: Vector3, color: Color) { ... }
fn draw_circle_3d(
&mut self,
center: Vector3,
radius: f32,
rotation_axis: Vector3,
rotation_angle: f32,
color: Color,
) { ... }
fn draw_triangle_3d(
&mut self,
v1: Vector3,
v2: Vector3,
v3: Vector3,
color: Color,
) { ... }
fn draw_triangle_strip_3d(&mut self, points: &[Vector3], color: Color) { ... }
fn draw_cube(&mut self, position: Vector3, size: Vector3, color: Color) { ... }
fn draw_cube_wires(
&mut self,
position: Vector3,
size: Vector3,
color: Color,
) { ... }
fn draw_sphere(&mut self, center_pos: Vector3, radius: f32, color: Color) { ... }
fn draw_sphere_ex(
&mut self,
center_pos: Vector3,
radius: f32,
rings: u32,
slices: u32,
color: Color,
) { ... }
fn draw_sphere_wires(
&mut self,
center_pos: Vector3,
radius: f32,
rings: u32,
slices: u32,
color: Color,
) { ... }
fn draw_cylinder(
&mut self,
position: Vector3,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: u32,
color: Color,
) { ... }
fn draw_cylinder_ex(
&mut self,
pos_top: Vector3,
pos_bottom: Vector3,
radius_top: f32,
radius_bottom: f32,
sides: u32,
color: Color,
) { ... }
fn draw_cylinder_wires(
&mut self,
position: Vector3,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: u32,
color: Color,
) { ... }
fn draw_cylinder_wires_ex(
&mut self,
pos_top: Vector3,
pos_bottom: Vector3,
radius_top: f32,
radius_bottom: f32,
sides: u32,
color: Color,
) { ... }
fn draw_capsule(
&mut self,
start_pos: Vector3,
end_pos: Vector3,
radius: f32,
slices: u32,
rings: u32,
color: Color,
) { ... }
fn draw_capsule_wires(
&mut self,
start_pos: Vector3,
end_pos: Vector3,
radius: f32,
slices: u32,
rings: u32,
color: Color,
) { ... }
fn draw_plane(&mut self, center_pos: Vector3, size: Vector2, color: Color) { ... }
fn draw_ray(&mut self, ray: Ray, color: Color) { ... }
fn draw_grid(&mut self, slices: u32, spacing: f32) { ... }
fn draw_model(
&mut self,
model: &Model,
position: Vector3,
scale: f32,
tint: Color,
) { ... }
fn draw_model_ex(
&mut self,
model: &Model,
position: Vector3,
rotation_axis: Vector3,
rotation_angle: f32,
scale: Vector3,
tint: Color,
) { ... }
fn draw_model_wires(
&mut self,
model: &Model,
position: Vector3,
scale: f32,
tint: Color,
) { ... }
fn draw_model_wires_ex(
&mut self,
model: &Model,
position: Vector3,
rotation_axis: Vector3,
rotation_angle: f32,
scale: Vector3,
tint: Color,
) { ... }
fn draw_bounding_box(&mut self, bbox: BoundingBox, color: Color) { ... }
fn draw_billboard(
&mut self,
camera: Camera,
texture: &Texture2D,
position: Vector3,
size: Vector2,
params: DrawBillboardParams,
) { ... }
fn draw_mesh(&mut self, mesh: &Mesh, material: &Material, transform: Matrix) { ... }
fn draw_mesh_instanced(
&mut self,
mesh: &Mesh,
material: &Material,
transforms: &[Matrix],
) { ... }
}
Expand description
A trait that contains all the drawing functions
Provided Methods§
Sourcefn clear_background(&mut self, color: Color)
fn clear_background(&mut self, color: Color)
Set background color (framebuffer clear color)
Sourcefn begin_mode_2d(&mut self, camera: Camera2D) -> DrawMode2D<'_, Self>
fn begin_mode_2d(&mut self, camera: Camera2D) -> DrawMode2D<'_, Self>
Begin 2D mode with custom camera (2D)
Sourcefn begin_mode_3d(&mut self, camera: Camera3D) -> DrawMode3D<'_, Self>
fn begin_mode_3d(&mut self, camera: Camera3D) -> DrawMode3D<'_, Self>
Begin 3D mode with custom camera (3D)
Sourcefn begin_texture_mode(
&mut self,
target: &RenderTexture2D,
) -> DrawTextureMode<'_, Self>
fn begin_texture_mode( &mut self, target: &RenderTexture2D, ) -> DrawTextureMode<'_, Self>
Begin drawing to render texture
Sourcefn begin_shader_mode(&mut self, shader: &Shader) -> DrawShaderMode<'_, Self>
fn begin_shader_mode(&mut self, shader: &Shader) -> DrawShaderMode<'_, Self>
Begin custom shader drawing
Sourcefn begin_blend_mode(&mut self, mode: BlendMode) -> DrawBlendMode<'_, Self>
fn begin_blend_mode(&mut self, mode: BlendMode) -> DrawBlendMode<'_, Self>
Begin blending mode (alpha, additive, multiplied, subtract, custom)
Sourcefn begin_scissor_mode(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32,
) -> DrawScissorMode<'_, Self>
fn begin_scissor_mode( &mut self, x: u32, y: u32, width: u32, height: u32, ) -> DrawScissorMode<'_, Self>
Begin scissor mode (define screen area for following drawing)
Sourcefn begin_vr_stereo_mode(
&mut self,
config: VrStereoConfig,
) -> DrawVrStereoMode<'_, Self>
fn begin_vr_stereo_mode( &mut self, config: VrStereoConfig, ) -> DrawVrStereoMode<'_, Self>
Begin stereo rendering (requires VR simulator)
Sourcefn draw_texture(
&mut self,
tex: &Texture,
position: Vector2,
params: DrawTextureParams,
)
fn draw_texture( &mut self, tex: &Texture, position: Vector2, params: DrawTextureParams, )
Draw a part of a texture defined by source and destination rectangles
Sourcefn draw_texture_patch(
&mut self,
tex: &Texture,
position: Vector2,
params: DrawTextureParams,
patch_info: NPatchInfo,
)
fn draw_texture_patch( &mut self, tex: &Texture, position: Vector2, params: DrawTextureParams, patch_info: NPatchInfo, )
Draws a texture (or part of it) that stretches or shrinks nicely
Sourcefn set_shapes_texture(&mut self, texture: &Texture, source: Rectangle)
fn set_shapes_texture(&mut self, texture: &Texture, source: Rectangle)
Set texture and rectangle to be used on shapes drawing
Sourcefn draw_pixel(&mut self, position: Vector2, color: Color)
fn draw_pixel(&mut self, position: Vector2, color: Color)
Draw a pixel
Sourcefn draw_line_thick(
&mut self,
start: Vector2,
end: Vector2,
thickness: f32,
color: Color,
)
fn draw_line_thick( &mut self, start: Vector2, end: Vector2, thickness: f32, color: Color, )
Draw a line defining thickness
Sourcefn draw_line_bezier(
&mut self,
start: Vector2,
end: Vector2,
thickness: f32,
color: Color,
)
fn draw_line_bezier( &mut self, start: Vector2, end: Vector2, thickness: f32, color: Color, )
Draw a line using cubic-bezier curves in-out
Sourcefn draw_line_bezier_quad(
&mut self,
start: Vector2,
end: Vector2,
control_pos: Vector2,
thickness: f32,
color: Color,
)
fn draw_line_bezier_quad( &mut self, start: Vector2, end: Vector2, control_pos: Vector2, thickness: f32, color: Color, )
Draw line using quadratic bezier curves with a control point
Sourcefn draw_line_bezier_cubic(
&mut self,
start: Vector2,
end: Vector2,
start_control_pos: Vector2,
end_control_pos: Vector2,
thickness: f32,
color: Color,
)
fn draw_line_bezier_cubic( &mut self, start: Vector2, end: Vector2, start_control_pos: Vector2, end_control_pos: Vector2, thickness: f32, color: Color, )
Draw line using cubic bezier curves with 2 control points
Sourcefn draw_line_strip(&mut self, points: &[Vector2], color: Color)
fn draw_line_strip(&mut self, points: &[Vector2], color: Color)
Draw lines sequence
Sourcefn draw_circle(&mut self, center: Vector2, radius: f32, color: Color)
fn draw_circle(&mut self, center: Vector2, radius: f32, color: Color)
Draw a color-filled circle
Sourcefn draw_circle_lines(
&mut self,
center_x: i32,
center_y: i32,
radius: f32,
color: Color,
)
fn draw_circle_lines( &mut self, center_x: i32, center_y: i32, radius: f32, color: Color, )
Draw circle outline
Sourcefn draw_ellipse(&mut self, center: Vector2, radius: Vector2, color: Color)
fn draw_ellipse(&mut self, center: Vector2, radius: Vector2, color: Color)
Draw ellipse
Sourcefn draw_ellipse_lines(&mut self, center: Vector2, radius: Vector2, color: Color)
fn draw_ellipse_lines(&mut self, center: Vector2, radius: Vector2, color: Color)
Draw ellipse outline
Sourcefn draw_circle_sector(
&mut self,
center: Vector2,
radius: f32,
angle: Range<f32>,
segments: u32,
color: Color,
)
fn draw_circle_sector( &mut self, center: Vector2, radius: f32, angle: Range<f32>, segments: u32, color: Color, )
Draw a piece of a circle
Sourcefn draw_circle_sector_lines(
&mut self,
center: Vector2,
radius: f32,
angle: Range<f32>,
segments: u32,
color: Color,
)
fn draw_circle_sector_lines( &mut self, center: Vector2, radius: f32, angle: Range<f32>, segments: u32, color: Color, )
Draw circle sector outline
Sourcefn draw_circle_gradient(
&mut self,
center: Vector2,
radius: f32,
color1: Color,
color2: Color,
)
fn draw_circle_gradient( &mut self, center: Vector2, radius: f32, color1: Color, color2: Color, )
Draw a gradient-filled circle
Sourcefn draw_ring(
&mut self,
center: Vector2,
inner_radius: f32,
outer_radius: f32,
start_angle: f32,
end_angle: f32,
segments: u32,
color: Color,
)
fn draw_ring( &mut self, center: Vector2, inner_radius: f32, outer_radius: f32, start_angle: f32, end_angle: f32, segments: u32, color: Color, )
Draw ring
Sourcefn draw_ring_lines(
&mut self,
center: Vector2,
radius: Range<f32>,
angle: Range<f32>,
segments: u32,
color: Color,
)
fn draw_ring_lines( &mut self, center: Vector2, radius: Range<f32>, angle: Range<f32>, segments: u32, color: Color, )
Draw ring outline
Sourcefn draw_rectangle(&mut self, rect: Rectangle, color: Color)
fn draw_rectangle(&mut self, rect: Rectangle, color: Color)
Draw a color-filled rectangle
Sourcefn draw_rectangle_lines(&mut self, rect: Rectangle, color: Color)
fn draw_rectangle_lines(&mut self, rect: Rectangle, color: Color)
Draw rectangle outline
Sourcefn draw_rectangle_lines_thick(
&mut self,
rect: Rectangle,
line_thickness: f32,
color: Color,
)
fn draw_rectangle_lines_thick( &mut self, rect: Rectangle, line_thickness: f32, color: Color, )
Draw rectangle outline with thickness
Sourcefn draw_rectangle_rotated(
&mut self,
rect: Rectangle,
origin: Vector2,
rotation: f32,
color: Color,
)
fn draw_rectangle_rotated( &mut self, rect: Rectangle, origin: Vector2, rotation: f32, color: Color, )
Draw a color-filled rotated
Sourcefn draw_rectangle_gradient_vertical(
&mut self,
rect: Rectangle,
color1: Color,
color2: Color,
)
fn draw_rectangle_gradient_vertical( &mut self, rect: Rectangle, color1: Color, color2: Color, )
Draw a vertical-gradient-filled rectangle
Sourcefn draw_rectangle_gradient_horizontal(
&mut self,
rect: Rectangle,
color1: Color,
color2: Color,
)
fn draw_rectangle_gradient_horizontal( &mut self, rect: Rectangle, color1: Color, color2: Color, )
Draw a horizontal-gradient-filled rectangle
Sourcefn draw_rectangle_gradient(
&mut self,
rect: Rectangle,
col1: Color,
col2: Color,
col3: Color,
col4: Color,
)
fn draw_rectangle_gradient( &mut self, rect: Rectangle, col1: Color, col2: Color, col3: Color, col4: Color, )
Draw a gradient-filled rectangle with custom vertex colors
Sourcefn draw_rectangle_rounded(
&mut self,
rect: Rectangle,
roundness: f32,
segments: u32,
color: Color,
)
fn draw_rectangle_rounded( &mut self, rect: Rectangle, roundness: f32, segments: u32, color: Color, )
Draw rectangle with rounded edges
Sourcefn draw_rectangle_rounded_lines(
&mut self,
rect: Rectangle,
roundness: f32,
segments: u32,
line_thickness: f32,
color: Color,
)
fn draw_rectangle_rounded_lines( &mut self, rect: Rectangle, roundness: f32, segments: u32, line_thickness: f32, color: Color, )
Draw rectangle with rounded edges outline
Sourcefn draw_triangle(&mut self, v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
fn draw_triangle(&mut self, v1: Vector2, v2: Vector2, v3: Vector2, color: Color)
Draw a color-filled triangle (vertex in counter-clockwise order!)
Sourcefn draw_triangle_lines(
&mut self,
v1: Vector2,
v2: Vector2,
v3: Vector2,
color: Color,
)
fn draw_triangle_lines( &mut self, v1: Vector2, v2: Vector2, v3: Vector2, color: Color, )
Draw triangle outline (vertex in counter-clockwise order!)
Sourcefn draw_triangle_fan(&mut self, points: &[Vector2], color: Color)
fn draw_triangle_fan(&mut self, points: &[Vector2], color: Color)
Draw a triangle fan defined by points (first vertex is the center)
Sourcefn draw_triangle_strip(&mut self, points: &[Vector2], color: Color)
fn draw_triangle_strip(&mut self, points: &[Vector2], color: Color)
Draw a triangle strip defined by points
Sourcefn draw_polygon(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
color: Color,
)
fn draw_polygon( &mut self, center: Vector2, sides: u32, radius: f32, rotation: f32, color: Color, )
Draw a regular polygon (Vector version)
Sourcefn draw_polygon_lines(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
color: Color,
)
fn draw_polygon_lines( &mut self, center: Vector2, sides: u32, radius: f32, rotation: f32, color: Color, )
Draw a polygon outline of n sides
Sourcefn draw_polygon_lines_thick(
&mut self,
center: Vector2,
sides: u32,
radius: f32,
rotation: f32,
line_thickness: f32,
color: Color,
)
fn draw_polygon_lines_thick( &mut self, center: Vector2, sides: u32, radius: f32, rotation: f32, line_thickness: f32, color: Color, )
Draw a polygon outline of n sides with thickness
Sourcefn draw_text(
&mut self,
text: &str,
position: Vector2,
font_size: u32,
color: Color,
)
fn draw_text( &mut self, text: &str, position: Vector2, font_size: u32, color: Color, )
Draw text (using default font)
Sourcefn draw_text_with_font(
&mut self,
text: &str,
pos: Vector2,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
)
fn draw_text_with_font( &mut self, text: &str, pos: Vector2, font: &Font, font_size: f32, spacing: f32, tint: Color, )
Draw text using font and additional parameters
Sourcefn draw_text_with_font_and_rotation(
&mut self,
text: &str,
pos: Vector2,
origin: Vector2,
rotation: f32,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
)
fn draw_text_with_font_and_rotation( &mut self, text: &str, pos: Vector2, origin: Vector2, rotation: f32, font: &Font, font_size: f32, spacing: f32, tint: Color, )
Draw text using Font and pro parameters (rotation)
Sourcefn draw_char(
&mut self,
ch: char,
pos: Vector2,
font: &Font,
font_size: f32,
tint: Color,
)
fn draw_char( &mut self, ch: char, pos: Vector2, font: &Font, font_size: f32, tint: Color, )
Draw one character
Sourcefn draw_chars(
&mut self,
chars: &[char],
pos: Vector2,
font: &Font,
font_size: f32,
spacing: f32,
tint: Color,
)
fn draw_chars( &mut self, chars: &[char], pos: Vector2, font: &Font, font_size: f32, spacing: f32, tint: Color, )
Draw multiple characters
Sourcefn draw_line_3d(&mut self, start_pos: Vector3, end_pos: Vector3, color: Color)
fn draw_line_3d(&mut self, start_pos: Vector3, end_pos: Vector3, color: Color)
Draw a line in 3D world space
Sourcefn draw_point_3d(&mut self, position: Vector3, color: Color)
fn draw_point_3d(&mut self, position: Vector3, color: Color)
Draw a point in 3D space, actually a small line
Sourcefn draw_circle_3d(
&mut self,
center: Vector3,
radius: f32,
rotation_axis: Vector3,
rotation_angle: f32,
color: Color,
)
fn draw_circle_3d( &mut self, center: Vector3, radius: f32, rotation_axis: Vector3, rotation_angle: f32, color: Color, )
Draw a circle in 3D world space
Sourcefn draw_triangle_3d(
&mut self,
v1: Vector3,
v2: Vector3,
v3: Vector3,
color: Color,
)
fn draw_triangle_3d( &mut self, v1: Vector3, v2: Vector3, v3: Vector3, color: Color, )
Draw a color-filled triangle (vertex in counter-clockwise order!)
Sourcefn draw_triangle_strip_3d(&mut self, points: &[Vector3], color: Color)
fn draw_triangle_strip_3d(&mut self, points: &[Vector3], color: Color)
Draw a triangle strip defined by points
Sourcefn draw_cube_wires(&mut self, position: Vector3, size: Vector3, color: Color)
fn draw_cube_wires(&mut self, position: Vector3, size: Vector3, color: Color)
Draw cube wires (Vector version)
Sourcefn draw_sphere(&mut self, center_pos: Vector3, radius: f32, color: Color)
fn draw_sphere(&mut self, center_pos: Vector3, radius: f32, color: Color)
Draw sphere
Sourcefn draw_sphere_ex(
&mut self,
center_pos: Vector3,
radius: f32,
rings: u32,
slices: u32,
color: Color,
)
fn draw_sphere_ex( &mut self, center_pos: Vector3, radius: f32, rings: u32, slices: u32, color: Color, )
Draw sphere with extended parameters
Sourcefn draw_sphere_wires(
&mut self,
center_pos: Vector3,
radius: f32,
rings: u32,
slices: u32,
color: Color,
)
fn draw_sphere_wires( &mut self, center_pos: Vector3, radius: f32, rings: u32, slices: u32, color: Color, )
Draw sphere wires
Sourcefn draw_cylinder(
&mut self,
position: Vector3,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: u32,
color: Color,
)
fn draw_cylinder( &mut self, position: Vector3, radius_top: f32, radius_bottom: f32, height: f32, slices: u32, color: Color, )
Draw a cylinder/cone
Sourcefn draw_cylinder_ex(
&mut self,
pos_top: Vector3,
pos_bottom: Vector3,
radius_top: f32,
radius_bottom: f32,
sides: u32,
color: Color,
)
fn draw_cylinder_ex( &mut self, pos_top: Vector3, pos_bottom: Vector3, radius_top: f32, radius_bottom: f32, sides: u32, color: Color, )
Draw a cylinder with extended parameters
Sourcefn draw_cylinder_wires(
&mut self,
position: Vector3,
radius_top: f32,
radius_bottom: f32,
height: f32,
slices: u32,
color: Color,
)
fn draw_cylinder_wires( &mut self, position: Vector3, radius_top: f32, radius_bottom: f32, height: f32, slices: u32, color: Color, )
Draw a cylinder/cone wires
Sourcefn draw_cylinder_wires_ex(
&mut self,
pos_top: Vector3,
pos_bottom: Vector3,
radius_top: f32,
radius_bottom: f32,
sides: u32,
color: Color,
)
fn draw_cylinder_wires_ex( &mut self, pos_top: Vector3, pos_bottom: Vector3, radius_top: f32, radius_bottom: f32, sides: u32, color: Color, )
Draw a cylinder wires with extended parameters
Sourcefn draw_capsule(
&mut self,
start_pos: Vector3,
end_pos: Vector3,
radius: f32,
slices: u32,
rings: u32,
color: Color,
)
fn draw_capsule( &mut self, start_pos: Vector3, end_pos: Vector3, radius: f32, slices: u32, rings: u32, color: Color, )
Draw a capsule with the center of its sphere caps at start_pos and end_pos
Sourcefn draw_capsule_wires(
&mut self,
start_pos: Vector3,
end_pos: Vector3,
radius: f32,
slices: u32,
rings: u32,
color: Color,
)
fn draw_capsule_wires( &mut self, start_pos: Vector3, end_pos: Vector3, radius: f32, slices: u32, rings: u32, color: Color, )
Draw capsule wireframe with the center of its sphere caps at start_pos and end_pos
Sourcefn draw_plane(&mut self, center_pos: Vector3, size: Vector2, color: Color)
fn draw_plane(&mut self, center_pos: Vector3, size: Vector2, color: Color)
Draw a plane XZ
Sourcefn draw_model(
&mut self,
model: &Model,
position: Vector3,
scale: f32,
tint: Color,
)
fn draw_model( &mut self, model: &Model, position: Vector3, scale: f32, tint: Color, )
Draw a model (with texture if set)
Sourcefn draw_model_ex(
&mut self,
model: &Model,
position: Vector3,
rotation_axis: Vector3,
rotation_angle: f32,
scale: Vector3,
tint: Color,
)
fn draw_model_ex( &mut self, model: &Model, position: Vector3, rotation_axis: Vector3, rotation_angle: f32, scale: Vector3, tint: Color, )
Draw a model with extended parameters
Sourcefn draw_model_wires(
&mut self,
model: &Model,
position: Vector3,
scale: f32,
tint: Color,
)
fn draw_model_wires( &mut self, model: &Model, position: Vector3, scale: f32, tint: Color, )
Draw a model wires (with texture if set)
Sourcefn draw_model_wires_ex(
&mut self,
model: &Model,
position: Vector3,
rotation_axis: Vector3,
rotation_angle: f32,
scale: Vector3,
tint: Color,
)
fn draw_model_wires_ex( &mut self, model: &Model, position: Vector3, rotation_axis: Vector3, rotation_angle: f32, scale: Vector3, tint: Color, )
Draw a model wires (with texture if set) with extended parameters
Sourcefn draw_bounding_box(&mut self, bbox: BoundingBox, color: Color)
fn draw_bounding_box(&mut self, bbox: BoundingBox, color: Color)
Draw bounding box (wires)
Sourcefn draw_billboard(
&mut self,
camera: Camera,
texture: &Texture2D,
position: Vector3,
size: Vector2,
params: DrawBillboardParams,
)
fn draw_billboard( &mut self, camera: Camera, texture: &Texture2D, position: Vector3, size: Vector2, params: DrawBillboardParams, )
Draw a billboard texture
Sourcefn draw_mesh(&mut self, mesh: &Mesh, material: &Material, transform: Matrix)
fn draw_mesh(&mut self, mesh: &Mesh, material: &Material, transform: Matrix)
Draw a 3d mesh with material and transform
Sourcefn draw_mesh_instanced(
&mut self,
mesh: &Mesh,
material: &Material,
transforms: &[Matrix],
)
fn draw_mesh_instanced( &mut self, mesh: &Mesh, material: &Material, transforms: &[Matrix], )
Draw multiple mesh instances with material and different transforms
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.