pub trait MeshVisibleFaces: Backend {
// Required method
fn visible_faces(
&self,
request: &VisibleFaceRequest<'_>,
options: &ExecutionOptions,
) -> Result<VisibleFaceOutcome, 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 visible-face regions of triangle meshes.
Provider obligations beyond the types:
- a
FaceSource::Capregion exists only for aMeshRole::Solidthatview.nearcuts, and has notriangles; - regions of one source never overlap; regions of different sources overlap only where they tie in depth;
- flipping every triangle gives identical regions and identical evidence
except
exact_escalations; - the regions are the exact regions snap-rounded to the binary64 grid (ADR
0100), with the rings of
VisibleRegionand the evidence ofVisibleFaceEvidence; a region is never refused because rounding collapses it, and where no edge was rerouted the ring vertices are the exact points rounded once to nearest; - the tolerance of
optionsapplies to mesh audit and frame validation only, never to a visibility decision; - the same input refusals as
MeshHiddenLines, and aPerTrianglegroup slice whose length differs from the triangle count isInvalidInputnaming the mesh; no substitute result is returned; FaceGroups::Planaris resolved by the provider as documented there, exactly, with polled cancellation and a memory-budget refusal, and the result equals thePerTrianglerequest with the resolved groups, exceptexact_escalations;- output storage is outside the scratch budget.
Required Methods§
Sourcefn visible_faces(
&self,
request: &VisibleFaceRequest<'_>,
options: &ExecutionOptions,
) -> Result<VisibleFaceOutcome, HiddenLineError>
fn visible_faces( &self, request: &VisibleFaceRequest<'_>, options: &ExecutionOptions, ) -> Result<VisibleFaceOutcome, HiddenLineError>
Find the visible face regions 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 computes regions for views of this projection.
The default is true for ViewProjection::Orthographic only; see
MeshHiddenLines::supports_projection
(ADR 0107).
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".