pub trait PhysicsGizmoExt {
// Required methods
fn draw_line(&mut self, a: RVector, b: RVector, color: Color);
fn draw_line_strip(
&mut self,
points: Vec<RVector>,
position: RVector,
rotation: impl Into<Quat>,
closed: bool,
color: Color,
);
fn draw_polyline(
&mut self,
vertices: &[RVector],
indices: &[[u32; 2]],
position: RVector,
rotation: impl Into<Quat>,
color: Color,
);
fn draw_arrow(
&mut self,
a: RVector,
b: RVector,
head_length: f32,
color: Color,
);
fn draw_collider(
&mut self,
collider: &Collider,
position: RVector,
rotation: impl Into<Quat>,
color: Color,
);
fn draw_raycast(
&mut self,
origin: RVector,
direction: Dir3,
max_distance: f32,
hits: &[RayHitData],
ray_color: Color,
point_color: Color,
normal_color: Color,
length_unit: f32,
);
fn draw_shapecast(
&mut self,
shape: &Collider,
origin: RVector,
shape_rotation: impl Into<Quat>,
direction: Dir3,
max_distance: f32,
hits: &[ShapeHitData],
ray_color: Color,
shape_color: Color,
point_color: Color,
normal_color: Color,
length_unit: f32,
);
}Expand description
An extension trait for Gizmos<PhysicsGizmo>.
Required Methods§
Sourcefn draw_line_strip(
&mut self,
points: Vec<RVector>,
position: RVector,
rotation: impl Into<Quat>,
closed: bool,
color: Color,
)
fn draw_line_strip( &mut self, points: Vec<RVector>, position: RVector, rotation: impl Into<Quat>, closed: bool, color: Color, )
Draws lines between a list of points.
Sourcefn draw_polyline(
&mut self,
vertices: &[RVector],
indices: &[[u32; 2]],
position: RVector,
rotation: impl Into<Quat>,
color: Color,
)
fn draw_polyline( &mut self, vertices: &[RVector], indices: &[[u32; 2]], position: RVector, rotation: impl Into<Quat>, color: Color, )
Draws a polyline based on the given vertex and index buffers.
Sourcefn draw_arrow(&mut self, a: RVector, b: RVector, head_length: f32, color: Color)
fn draw_arrow(&mut self, a: RVector, b: RVector, head_length: f32, color: Color)
Draws an arrow from a to b with an arrowhead that has a length of head_length.
Sourcefn draw_collider(
&mut self,
collider: &Collider,
position: RVector,
rotation: impl Into<Quat>,
color: Color,
)
fn draw_collider( &mut self, collider: &Collider, position: RVector, rotation: impl Into<Quat>, color: Color, )
Draws a Collider shape.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl PhysicsGizmoExt for Gizmos<'_, '_, PhysicsGizmos>
impl PhysicsGizmoExt for Gizmos<'_, '_, PhysicsGizmos>
Source§fn draw_line_strip(
&mut self,
points: Vec<RVector>,
position: RVector,
rotation: impl Into<Quat>,
closed: bool,
color: Color,
)
fn draw_line_strip( &mut self, points: Vec<RVector>, position: RVector, rotation: impl Into<Quat>, closed: bool, color: Color, )
Draws lines between a list of points.
Source§fn draw_polyline(
&mut self,
vertices: &[RVector],
indices: &[[u32; 2]],
position: RVector,
rotation: impl Into<Quat>,
color: Color,
)
fn draw_polyline( &mut self, vertices: &[RVector], indices: &[[u32; 2]], position: RVector, rotation: impl Into<Quat>, color: Color, )
Draws a polyline based on the given vertex and index buffers.
Source§fn draw_arrow(&mut self, a: RVector, b: RVector, head_length: f32, color: Color)
fn draw_arrow(&mut self, a: RVector, b: RVector, head_length: f32, color: Color)
Draws an arrow from a to b with an arrowhead that has a length of head_length
and a width of head_width.
Source§fn draw_collider(
&mut self,
collider: &Collider,
position: RVector,
rotation: impl Into<Quat>,
color: Color,
)
fn draw_collider( &mut self, collider: &Collider, position: RVector, rotation: impl Into<Quat>, color: Color, )
Draws a collider shape with a given position and rotation.