#[repr(u32)]pub enum Polytope4 {
Pentatope = 0,
Tesseract = 1,
Cell16 = 2,
Cell24 = 3,
Cell120 = 4,
Cell600 = 5,
}Expand description
Discriminants match loam_render::raymarch::SHAPE_*.
Variants§
Implementations§
Source§impl Polytope4
impl Polytope4
pub fn topology(self) -> &'static Polytope4Topology
pub fn vertex_count(self) -> usize
Sourcepub fn edge_count(self) -> usize
pub fn edge_count(self) -> usize
Undirected edges, each counted once.
Sourcepub fn cell_count(self) -> usize
pub fn cell_count(self) -> usize
Bounding 3-cells (the facets), not the full face lattice.
Sourcepub fn cell_centers(self) -> Vec<Vec4>
pub fn cell_centers(self) -> Vec<Vec4>
Length equal to the inradius, along the cell’s outward face normal.
Sourcepub fn face_planes(self) -> (Vec<Vec4>, f32)
pub fn face_planes(self) -> (Vec<Vec4>, f32)
Outward unit normals and mean facet offset in canonical coordinates.
Trait Implementations§
Source§impl Visualizable<4> for Polytope4
impl Visualizable<4> for Polytope4
fn to_lines(&self) -> Result<LineMesh<4>, NotVisualizable>
fn to_triangles(&self) -> Result<TriangleMesh<4>, NotVisualizable>
fn to_points(&self) -> Result<PointMesh<4>, NotVisualizable>
impl Copy for Polytope4
impl Eq for Polytope4
impl StructuralPartialEq for Polytope4
Auto Trait Implementations§
impl Freeze for Polytope4
impl RefUnwindSafe for Polytope4
impl Send for Polytope4
impl Sync for Polytope4
impl Unpin for Polytope4
impl UnsafeUnpin for Polytope4
impl UnwindSafe for Polytope4
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