pub trait MeshHiddenLines: Backend {
// Required method
fn hidden_lines(
&self,
request: &HiddenLineRequest<'_>,
options: &ExecutionOptions,
) -> Result<HiddenLineOutcome, HiddenLineError>;
// Provided methods
fn supports_projection(&self, projection: ViewProjection) -> bool { ... }
fn scratch_requirement(&self) -> ScratchRequirement { ... }
fn cancellation_granularity(&self) -> CancellationGranularity { ... }
}Expand description
Provider for deterministic hidden-line drawings of triangle meshes.
Provider obligations beyond the types:
- each segment is a maximal positive-length piece of one edge with one
visibility, finite, with
start != end; - a selected edge whose image is a point is counted in
point_edgesand not drawn; - with
edges.hidden == falseno hidden segment is returned; - flipping every triangle gives identical segments and identical
evidence except
exact_escalations; - with
edges.group_boundarythe groups are resolved exactly as forMeshVisibleFaces, and aPerTrianglegroup slice whose length differs from the triangle count isInvalidInputnaming the mesh; without it the groups are not read; - endpoints are the exact points rounded once to nearest (see
HiddenLineSegment); - the tolerance of
optionsapplies to mesh audit and frame validation only, never to a visibility decision; - input that cannot be decided is refused with a typed error naming the
mesh (
HiddenLineError::mesh) where one mesh is at fault; no substitute drawing is returned; - output storage is outside the scratch budget.
Required Methods§
Draw the selected edges of request.meshes in request.view.
Implementations must enforce request.limits before growing output.
Provided Methods§
Sourcefn supports_projection(&self, projection: ViewProjection) -> bool
fn supports_projection(&self, projection: ViewProjection) -> bool
Whether the provider draws views of this projection. The default is
true for ViewProjection::Orthographic only, so a provider written
before ViewProjection existed, which ignores the field, is never given
a perspective view by a registry (ADR 0107). A provider that returns
true for a projection must draw it exactly and pass that
projection’s conformance suite.
Sourcefn scratch_requirement(&self) -> ScratchRequirement
fn scratch_requirement(&self) -> ScratchRequirement
Scratch needed beyond inputs and result.
Sourcefn cancellation_granularity(&self) -> CancellationGranularity
fn cancellation_granularity(&self) -> CancellationGranularity
How finely the provider polls cancellation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".