Trait rapier3d::pipeline::DebugRenderBackend
source · pub trait DebugRenderBackend {
// Required method
fn draw_line(
&mut self,
object: DebugRenderObject<'_>,
a: Point<Real>,
b: Point<Real>,
color: [f32; 4]
);
// Provided methods
fn filter_object(&self, _object: DebugRenderObject<'_>) -> bool { ... }
fn draw_polyline(
&mut self,
object: DebugRenderObject<'_>,
vertices: &[Point<Real>],
indices: &[[u32; 2]],
transform: &Isometry<Real>,
scale: &Vector<Real>,
color: [f32; 4]
) { ... }
fn draw_line_strip(
&mut self,
object: DebugRenderObject<'_>,
vertices: &[Point<Real>],
transform: &Isometry<Real>,
scale: &Vector<Real>,
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§
sourcefn filter_object(&self, _object: DebugRenderObject<'_>) -> bool
fn filter_object(&self, _object: DebugRenderObject<'_>) -> bool
Predicate to filter-out some objects from the debug-rendering.