Trait jumpy::core::physics::rapier::DebugRenderBackend
pub trait DebugRenderBackend {
// Required method
fn draw_line(
&mut self,
object: DebugRenderObject<'_>,
a: OPoint<f32, Const<2>>,
b: OPoint<f32, Const<2>>,
color: [f32; 4],
);
// Provided methods
fn filter_object(&self, _object: DebugRenderObject<'_>) -> bool { ... }
fn draw_polyline(
&mut self,
object: DebugRenderObject<'_>,
vertices: &[OPoint<f32, Const<2>>],
indices: &[[u32; 2]],
transform: &Isometry<f32, Unit<Complex<f32>>, 2>,
scale: &Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>,
color: [f32; 4],
) { ... }
fn draw_line_strip(
&mut self,
object: DebugRenderObject<'_>,
vertices: &[OPoint<f32, Const<2>>],
transform: &Isometry<f32, Unit<Complex<f32>>, 2>,
scale: &Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>,
color: [f32; 4],
closed: bool,
) { ... }
}
Expand description
Trait implemented by graphics backends responsible for rendering the physics scene.
The only thing that is required from the graphics backend is to be able to render
a colored line. Note that the color is only a suggestion and is computed from the
DebugRenderStyle
. The backend is free to apply its own style, for example based on
the object
being rendered.
Required Methods§
Provided Methods§
fn filter_object(&self, _object: DebugRenderObject<'_>) -> bool
fn filter_object(&self, _object: DebugRenderObject<'_>) -> bool
Predicate to filter-out some objects from the debug-rendering.