Trait avian3d::debug_render::PhysicsGizmoExt
source · pub trait PhysicsGizmoExt {
// Required methods
fn draw_line(&mut self, a: Vector, b: Vector, color: Color);
fn draw_line_strip(
&mut self,
points: Vec<Vector>,
position: impl Into<Position>,
rotation: impl Into<Rotation>,
closed: bool,
color: Color
);
fn draw_polyline(
&mut self,
vertices: &[Vector],
indices: &[[u32; 2]],
position: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
);
fn draw_arrow(
&mut self,
a: Vector,
b: Vector,
head_length: Scalar,
color: Color
);
fn draw_collider(
&mut self,
collider: &Collider,
position: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
);
fn draw_raycast(
&mut self,
origin: Vector,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[RayHitData],
ray_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
);
fn draw_shapecast(
&mut self,
shape: &Collider,
origin: Vector,
shape_rotation: impl Into<Rotation>,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[ShapeHitData],
ray_color: Color,
shape_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
);
}
Expand description
An extension trait for Gizmos<PhysicsGizmo>
.
Required Methods§
sourcefn draw_line_strip(
&mut self,
points: Vec<Vector>,
position: impl Into<Position>,
rotation: impl Into<Rotation>,
closed: bool,
color: Color
)
fn draw_line_strip( &mut self, points: Vec<Vector>, position: impl Into<Position>, rotation: impl Into<Rotation>, closed: bool, color: Color )
Draws lines between a list of points.
sourcefn draw_polyline(
&mut self,
vertices: &[Vector],
indices: &[[u32; 2]],
position: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
)
fn draw_polyline( &mut self, vertices: &[Vector], indices: &[[u32; 2]], position: impl Into<Position>, rotation: impl Into<Rotation>, color: Color )
Draws a polyline based on the given vertex and index buffers.
sourcefn draw_arrow(
&mut self,
a: Vector,
b: Vector,
head_length: Scalar,
color: Color
)
fn draw_arrow( &mut self, a: Vector, b: Vector, head_length: Scalar, 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: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
)
fn draw_collider( &mut self, collider: &Collider, position: impl Into<Position>, rotation: impl Into<Rotation>, color: Color )
Draws a Collider
shape.
sourcefn draw_raycast(
&mut self,
origin: Vector,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[RayHitData],
ray_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
)
fn draw_raycast( &mut self, origin: Vector, direction: Dir3, max_time_of_impact: Scalar, hits: &[RayHitData], ray_color: Color, point_color: Color, normal_color: Color, length_unit: Scalar )
Draws the results of a raycast.
sourcefn draw_shapecast(
&mut self,
shape: &Collider,
origin: Vector,
shape_rotation: impl Into<Rotation>,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[ShapeHitData],
ray_color: Color,
shape_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
)
fn draw_shapecast( &mut self, shape: &Collider, origin: Vector, shape_rotation: impl Into<Rotation>, direction: Dir3, max_time_of_impact: Scalar, hits: &[ShapeHitData], ray_color: Color, shape_color: Color, point_color: Color, normal_color: Color, length_unit: Scalar )
Draws the results of a shapecast.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<'w, 's> PhysicsGizmoExt for Gizmos<'w, 's, PhysicsGizmos>
impl<'w, 's> PhysicsGizmoExt for Gizmos<'w, 's, PhysicsGizmos>
source§fn draw_line_strip(
&mut self,
points: Vec<Vector>,
position: impl Into<Position>,
rotation: impl Into<Rotation>,
closed: bool,
color: Color
)
fn draw_line_strip( &mut self, points: Vec<Vector>, position: impl Into<Position>, rotation: impl Into<Rotation>, closed: bool, color: Color )
Draws lines between a list of points.
source§fn draw_polyline(
&mut self,
vertices: &[Vector],
indices: &[[u32; 2]],
position: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
)
fn draw_polyline( &mut self, vertices: &[Vector], indices: &[[u32; 2]], position: impl Into<Position>, rotation: impl Into<Rotation>, color: Color )
Draws a polyline based on the given vertex and index buffers.
source§fn draw_arrow(
&mut self,
a: Vector,
b: Vector,
head_length: Scalar,
color: Color
)
fn draw_arrow( &mut self, a: Vector, b: Vector, head_length: Scalar, 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: impl Into<Position>,
rotation: impl Into<Rotation>,
color: Color
)
fn draw_collider( &mut self, collider: &Collider, position: impl Into<Position>, rotation: impl Into<Rotation>, color: Color )
Draws a collider shape with a given position and rotation.
source§fn draw_raycast(
&mut self,
origin: Vector,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[RayHitData],
ray_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
)
fn draw_raycast( &mut self, origin: Vector, direction: Dir3, max_time_of_impact: Scalar, hits: &[RayHitData], ray_color: Color, point_color: Color, normal_color: Color, length_unit: Scalar )
Draws the results of a raycast.
source§fn draw_shapecast(
&mut self,
shape: &Collider,
origin: Vector,
shape_rotation: impl Into<Rotation>,
direction: Dir3,
max_time_of_impact: Scalar,
hits: &[ShapeHitData],
ray_color: Color,
shape_color: Color,
point_color: Color,
normal_color: Color,
length_unit: Scalar
)
fn draw_shapecast( &mut self, shape: &Collider, origin: Vector, shape_rotation: impl Into<Rotation>, direction: Dir3, max_time_of_impact: Scalar, hits: &[ShapeHitData], ray_color: Color, shape_color: Color, point_color: Color, normal_color: Color, length_unit: Scalar )
Draws the results of a shapecast.