pub struct DebugDrawList {
pub lines: Vec<DebugLine>,
pub spheres: Vec<DebugSphere>,
pub arrows: Vec<DebugArrow>,
pub text_labels: Vec<(String, [f32; 3])>,
}Expand description
A collection of debug primitives to be rendered in a single frame.
Fields§
§lines: Vec<DebugLine>§spheres: Vec<DebugSphere>§arrows: Vec<DebugArrow>§text_labels: Vec<(String, [f32; 3])>World-space text labels: (text, position).
Implementations§
Source§impl DebugDrawList
impl DebugDrawList
Sourcepub fn add_line(&mut self, start: [f32; 3], end: [f32; 3], color: [f32; 4])
pub fn add_line(&mut self, start: [f32; 3], end: [f32; 3], color: [f32; 4])
Add a line segment with default thickness 1.0.
Sourcepub fn add_sphere(&mut self, center: [f32; 3], radius: f32, color: [f32; 4])
pub fn add_sphere(&mut self, center: [f32; 3], radius: f32, color: [f32; 4])
Add a wireframe sphere.
Sourcepub fn add_arrow(&mut self, origin: [f32; 3], dir: [f32; 3], color: [f32; 4])
pub fn add_arrow(&mut self, origin: [f32; 3], dir: [f32; 3], color: [f32; 4])
Add a directional arrow.
Sourcepub fn total_primitives(&self) -> usize
pub fn total_primitives(&self) -> usize
Total count of all primitives (lines + spheres + arrows + labels).
Trait Implementations§
Source§impl Clone for DebugDrawList
impl Clone for DebugDrawList
Source§fn clone(&self) -> DebugDrawList
fn clone(&self) -> DebugDrawList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DebugDrawList
impl Debug for DebugDrawList
Source§impl Default for DebugDrawList
impl Default for DebugDrawList
Source§fn default() -> DebugDrawList
fn default() -> DebugDrawList
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DebugDrawList
impl RefUnwindSafe for DebugDrawList
impl Send for DebugDrawList
impl Sync for DebugDrawList
impl Unpin for DebugDrawList
impl UnsafeUnpin for DebugDrawList
impl UnwindSafe for DebugDrawList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more