Struct solstice_2d::Polyhedron
source · pub struct Polyhedron {
pub vertices: Vec<Point3D>,
pub indices: Vec<u32>,
pub radius: f32,
pub detail: u32,
}
Fields§
§vertices: Vec<Point3D>
§indices: Vec<u32>
§radius: f32
§detail: u32
Implementations§
source§impl Polyhedron
impl Polyhedron
pub fn tetrahedron(radius: f32, detail: u32) -> Self
pub fn octahedron(radius: f32, detail: u32) -> Self
pub fn icosahedron(radius: f32, detail: u32) -> Self
pub fn dodecahedron(radius: f32, detail: u32) -> Self
Trait Implementations§
source§impl Clone for Polyhedron
impl Clone for Polyhedron
source§fn clone(&self) -> Polyhedron
fn clone(&self) -> Polyhedron
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Polyhedron
impl Debug for Polyhedron
source§impl From<&Polyhedron> for Geometry<'_, Vertex3D>
impl From<&Polyhedron> for Geometry<'_, Vertex3D>
source§fn from(p: &Polyhedron) -> Self
fn from(p: &Polyhedron) -> Self
Converts to this type from the input type.
source§impl From<Polyhedron> for Geometry<'_, Vertex3D>
impl From<Polyhedron> for Geometry<'_, Vertex3D>
source§fn from(p: Polyhedron) -> Self
fn from(p: Polyhedron) -> Self
Converts to this type from the input type.
source§impl PartialEq<Polyhedron> for Polyhedron
impl PartialEq<Polyhedron> for Polyhedron
source§fn eq(&self, other: &Polyhedron) -> bool
fn eq(&self, other: &Polyhedron) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Polyhedron> for Polyhedron
impl PartialOrd<Polyhedron> for Polyhedron
source§fn partial_cmp(&self, other: &Polyhedron) -> Option<Ordering>
fn partial_cmp(&self, other: &Polyhedron) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl StructuralPartialEq for Polyhedron
Auto Trait Implementations§
impl RefUnwindSafe for Polyhedron
impl Send for Polyhedron
impl Sync for Polyhedron
impl Unpin for Polyhedron
impl UnwindSafe for Polyhedron
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.