Skip to main content

PolyhedralSurface

Struct PolyhedralSurface 

Source
#[repr(transparent)]
pub struct PolyhedralSurface<Pg: Polygon>(pub Vec<Pg>);
Expand description

A contiguous collection of polygon faces in three-dimensional space.

Mirrors model::polyhedral_surface<Polygon> from geometries/polyhedral_surface.hpp:48-83. As in Boost, construction does not verify that faces are 3D or share boundary segments; those are validity concerns rather than storage invariants.

Tuple Fields§

§0: Vec<Pg>

Implementations§

Source§

impl<Pg: Polygon> PolyhedralSurface<Pg>

Source

pub const fn new() -> Self

Construct an empty polyhedral surface.

Mirrors the default constructor at geometries/polyhedral_surface.hpp:74-76.

Source

pub const fn from_vec(faces: Vec<Pg>) -> Self

Wrap an existing ordered face vector.

Mirrors the initializer-list constructor at geometries/polyhedral_surface.hpp:79-81.

Source

pub fn push(&mut self, face: Pg)

Append one polygon face.

Trait Implementations§

Source§

impl<Pg: Clone + Polygon> Clone for PolyhedralSurface<Pg>

Source§

fn clone(&self) -> PolyhedralSurface<Pg>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Pg: Debug + Polygon> Debug for PolyhedralSurface<Pg>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Pg: Polygon> Default for PolyhedralSurface<Pg>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<Pg: Polygon> Geometry for PolyhedralSurface<Pg>

Source§

type Kind = PolyhedralSurfaceTag

One of the *Tag types from geometry_tag. Read more
Source§

type Point = <Pg as Geometry>::Point

The point type this geometry is built from. For a value modelling Point, this is Self. Read more
Source§

impl<Pg: PartialEq + Polygon> PartialEq for PolyhedralSurface<Pg>

Source§

fn eq(&self, other: &PolyhedralSurface<Pg>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Pg: Polygon> PolyhedralSurface for PolyhedralSurface<Pg>

Source§

type Face = Pg

The face polygon type. Read more
Source§

fn faces(&self) -> impl ExactSizeIterator<Item = &Self::Face>

The faces of this polyhedral surface, in declared order. Read more
Source§

impl<Pg: PartialEq + Polygon> StructuralPartialEq for PolyhedralSurface<Pg>

Auto Trait Implementations§

§

impl<Pg> Freeze for PolyhedralSurface<Pg>

§

impl<Pg> RefUnwindSafe for PolyhedralSurface<Pg>
where Pg: RefUnwindSafe,

§

impl<Pg> Send for PolyhedralSurface<Pg>
where Pg: Send,

§

impl<Pg> Sync for PolyhedralSurface<Pg>
where Pg: Sync,

§

impl<Pg> Unpin for PolyhedralSurface<Pg>
where Pg: Unpin,

§

impl<Pg> UnsafeUnpin for PolyhedralSurface<Pg>

§

impl<Pg> UnwindSafe for PolyhedralSurface<Pg>
where Pg: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> SameAs<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.