manifold_rs

Struct Manifold

Source
pub struct Manifold(/* private fields */);
Expand description

Manifold rust wrapper for C++ manifold object.

Implementations§

Source§

impl Manifold

Source

pub fn sphere(radius: f64, segments: u32) -> Self

Create a sphere manifold.

Source

pub fn cube(x_size: f64, y_size: f64, z_size: f64) -> Self

Create a cube manifold.

Source

pub fn cylinder( radius_low: f64, radius_high: f64, height: f64, segments: u32, ) -> Self

Create a cylinder manifold.

Source

pub fn union(&self, b: &Self) -> Self

Get the union of two manifolds.

Source

pub fn intersection(&self, b: &Self) -> Self

Get the intersection of two manifolds.

Source

pub fn difference(&self, b: &Self) -> Self

Get the difference of two manifolds.

Source

pub fn boolean_op(&self, b: &Self, op: BooleanOp) -> Self

Source

pub fn to_mesh(&self) -> Mesh

Get the mesh representation of the manifold.

Source

pub fn from_mesh(mesh: Mesh) -> Self

Trait Implementations§

Source§

impl From<Manifold> for Mesh

Convert Manifold to Mesh struct

Source§

fn from(manifold: Manifold) -> Self

Converts to this type from the input type.
Source§

impl From<Mesh> for Manifold

Convert Mesh to Manifold struct

Source§

fn from(mesh: Mesh) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.