pub struct MeshBooleanRegistry { /* private fields */ }Expand description
Ordered executable providers for one narrow operation.
Fallback happens only for Unsupported or Unavailable; numerical and data
failures are returned immediately rather than hidden by another algorithm.
Implementations§
Source§impl MeshBooleanRegistry
impl MeshBooleanRegistry
Sourcepub const fn new() -> MeshBooleanRegistry
pub const fn new() -> MeshBooleanRegistry
Empty registry.
Sourcepub fn with_execution(self, execution: CpuExecution) -> MeshBooleanRegistry
pub fn with_execution(self, execution: CpuExecution) -> MeshBooleanRegistry
Scope every dispatched provider call to execution’s local pool.
This bounds whatever parallelism a provider already does; it does not
make a single-threaded provider concurrent. With no provider threading
it costs nothing but the install call.
Sourcepub fn register<B>(&mut self, priority: i32, provider: B)where
B: MeshBoolean + 'static,
pub fn register<B>(&mut self, priority: i32, provider: B)where
B: MeshBoolean + 'static,
Register an implementation. Higher priorities run first.
Sourcepub fn register_conformant<B>(
&mut self,
priority: i32,
provider: B,
) -> Result<(), Box<ConformanceReport>>where
B: MeshBoolean + 'static,
pub fn register_conformant<B>(
&mut self,
priority: i32,
provider: B,
) -> Result<(), Box<ConformanceReport>>where
B: MeshBoolean + 'static,
Register only if the provider passes the shared conformance suite.
ADR 0017 §6 makes conformance a precondition of registration rather than a test someone might remember to run. A provider that violates the contract is rejected here, with the failing report, instead of being discovered later by a caller receiving wrong geometry.
Self::register remains available for tests and for deliberately
partial providers; this is the door production code should use.
§Errors
Returns the report when the provider violates any obligation.
Sourcepub fn register_arc(&mut self, priority: i32, provider: Arc<dyn MeshBoolean>)
pub fn register_arc(&mut self, priority: i32, provider: Arc<dyn MeshBoolean>)
Register a shared trait object.
Sourcepub fn providers(&self) -> impl Iterator<Item = &dyn MeshBoolean>
pub fn providers(&self) -> impl Iterator<Item = &dyn MeshBoolean>
Registered providers in dispatch order.
Sourcepub fn boolean(
&self,
subject: &TriMesh,
tool: &TriMesh,
operation: BooleanOperator,
options: &ExecutionOptions,
) -> Result<BooleanOutcome, GeomError>
pub fn boolean( &self, subject: &TriMesh, tool: &TriMesh, operation: BooleanOperator, options: &ExecutionOptions, ) -> Result<BooleanOutcome, GeomError>
Execute according to device policy with narrow fallback semantics.
Sourcepub fn subtract_many(
&self,
subject: &TriMesh,
tools: &[TriMesh],
options: &ExecutionOptions,
) -> Result<BooleanOutcome, GeomError>
pub fn subtract_many( &self, subject: &TriMesh, tools: &[TriMesh], options: &ExecutionOptions, ) -> Result<BooleanOutcome, GeomError>
Subtract many tools through one provider dispatch.
Sourcepub fn union_many(
&self,
solids: &[TriMesh],
options: &ExecutionOptions,
) -> Result<BooleanOutcome, GeomError>
pub fn union_many( &self, solids: &[TriMesh], options: &ExecutionOptions, ) -> Result<BooleanOutcome, GeomError>
Union many solids through one provider dispatch.
An empty batch is answered without consulting a provider: the union of nothing is nothing, and there is no operand to validate or size a budget against.
Trait Implementations§
Source§impl Clone for MeshBooleanRegistry
impl Clone for MeshBooleanRegistry
Source§fn clone(&self) -> MeshBooleanRegistry
fn clone(&self) -> MeshBooleanRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MeshBooleanRegistry
impl Debug for MeshBooleanRegistry
Source§impl Default for MeshBooleanRegistry
impl Default for MeshBooleanRegistry
Source§fn default() -> MeshBooleanRegistry
fn default() -> MeshBooleanRegistry
Auto Trait Implementations§
impl Freeze for MeshBooleanRegistry
impl !RefUnwindSafe for MeshBooleanRegistry
impl Send for MeshBooleanRegistry
impl Sync for MeshBooleanRegistry
impl Unpin for MeshBooleanRegistry
impl !UnwindSafe for MeshBooleanRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more