pub struct Importer {
pub shape_modify_config: ShapeModifyConfig,
pub cde_config: CDEConfig,
}Expand description
Converts external representations of items and containers into internal ones.
Direct configuration changes must satisfy ShapeModifyConfig’s documented ranges.
Fields§
§shape_modify_config: ShapeModifyConfig§cde_config: CDEConfigImplementations§
Source§impl Importer
impl Importer
Sourcepub fn new(
cde_config: CDEConfig,
simplify_tolerance: Option<f32>,
narrow_concavity_cutoff: Option<(f32, f32)>,
) -> Importer
pub fn new( cde_config: CDEConfig, simplify_tolerance: Option<f32>, narrow_concavity_cutoff: Option<(f32, f32)>, ) -> Importer
Creates a new instance with the given configuration.
cde_config- Configuration for the CDE (Collision Detection Engine).simplify_tolerance- SeeShapeModifyConfig.narrow_concavity_cutoff- Optional definition for closing narrow concavities. If enabled, the shapes are modified to close “narrow” concavities. SeeShapeModifyConfig.
Sourcepub fn with_min_item_separation(self, separation: f32) -> Result<Self>
pub fn with_min_item_separation(self, separation: f32) -> Result<Self>
Set the minimum distance between items and other hazards. Items are inflated and containers deflated by half this finite, nonnegative distance.
Sourcepub fn import_item(&self, ext_item: &ExtItem, idx: usize) -> Result<Arc<Item>>
pub fn import_item(&self, ext_item: &ExtItem, idx: usize) -> Result<Arc<Item>>
Import geometry with a caller-assigned internal index, independent of the external ID.
Sourcepub fn import_container(&self, ext_cont: &ExtContainer) -> Result<Container>
pub fn import_container(&self, ext_cont: &ExtContainer) -> Result<Container>
Imports container geometry and quality zones. Returns an error for invalid geometry, unsupported shapes or out-of-range qualities.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Importer
impl RefUnwindSafe for Importer
impl Send for Importer
impl Sync for Importer
impl Unpin for Importer
impl UnsafeUnpin for Importer
impl UnwindSafe for Importer
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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