#[non_exhaustive]pub struct DebugDrawData {
pub lines: Vec<DebugLine>,
pub points: Vec<DebugPoint>,
}Expand description
Collected debug geometry for a frame.
Marked #[non_exhaustive] so additional geometry containers
(triangles, meshes, labels) can be added post-v1.0 without a
breaking API change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lines: Vec<DebugLine>Line segments to draw
points: Vec<DebugPoint>Points to draw
Implementations§
Source§impl DebugDrawData
impl DebugDrawData
Sourcepub fn line(&mut self, start: Vec3Fix, end: Vec3Fix, color: DebugColor)
pub fn line(&mut self, start: Vec3Fix, end: Vec3Fix, color: DebugColor)
Add a line
Sourcepub fn point(&mut self, position: Vec3Fix, color: DebugColor, size: Fix128)
pub fn point(&mut self, position: Vec3Fix, color: DebugColor, size: Fix128)
Add a point
Sourcepub fn aabb(&mut self, aabb: &AABB, color: DebugColor)
pub fn aabb(&mut self, aabb: &AABB, color: DebugColor)
Draw an AABB wireframe (12 edges)
Sourcepub fn sphere(&mut self, center: Vec3Fix, radius: Fix128, color: DebugColor)
pub fn sphere(&mut self, center: Vec3Fix, radius: Fix128, color: DebugColor)
Draw a sphere wireframe (3 rings: XY, XZ, YZ)
Sourcepub fn arrow(&mut self, start: Vec3Fix, end: Vec3Fix, color: DebugColor)
pub fn arrow(&mut self, start: Vec3Fix, end: Vec3Fix, color: DebugColor)
Draw an arrow: the shaft, an arrowhead of two barbs, and a point marker at the tip.
The head is 0.2 * |end - start| long: each barb runs from end back to
head_point ± side * head_len / 2, where head_point lies head_len
before end on the shaft and side is a unit vector perpendicular to
the shaft (dir × Y, or dir × X when the shaft is within about
1e-3 rad of Y, i.e. |unit × Y| < 1e-3). A zero-length arrow records
the shaft only.
Sourcepub fn axes(&mut self, position: Vec3Fix, rotation: QuatFix, scale: Fix128)
pub fn axes(&mut self, position: Vec3Fix, rotation: QuatFix, scale: Fix128)
Draw local coordinate axes at a position
Sourcepub fn primitive_count(&self) -> usize
pub fn primitive_count(&self) -> usize
Total primitive count
Trait Implementations§
Source§impl Clone for DebugDrawData
impl Clone for DebugDrawData
Source§impl Debug for DebugDrawData
impl Debug for DebugDrawData
Auto Trait Implementations§
impl Freeze for DebugDrawData
impl RefUnwindSafe for DebugDrawData
impl Send for DebugDrawData
impl Sync for DebugDrawData
impl Unpin for DebugDrawData
impl UnsafeUnpin for DebugDrawData
impl UnwindSafe for DebugDrawData
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
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> ⓘ
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> ⓘ
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