pub struct Polyhedron<F>where
F: Float,{
pub vtx: Vec<[F; 3]>,
pub tri: Vec<Vec<[u16; 3]>>,
pub uv: Vec<Vec<[[F; 2]; 3]>>,
pub vol: F,
pub center: bool,
}Expand description
Polyhedron
Fields§
§vtx: Vec<[F; 3]>vtx
tri: Vec<Vec<[u16; 3]>>tri: [n][m] Vec n faces of Vec m indexed triangles
uv: Vec<Vec<[[F; 2]; 3]>>uv: [n][m] Vec n faces of Vec m uv triangles
vol: Fvolume
center: boolcenter
Trait Implementations§
Source§impl<F> Debug for Polyhedron<F>
impl<F> Debug for Polyhedron<F>
Source§impl<F> TUV<F> for Polyhedron<F>where
F: Float,
impl trait TUV for Polyhedron
impl<F> TUV<F> for Polyhedron<F>where
F: Float,
impl trait TUV for Polyhedron
Source§fn get_uv_t(
&self,
fi: usize,
ti: usize,
vi: usize,
_r: f64,
_s: f64,
o: [f64; 2],
) -> [F; 2]
fn get_uv_t( &self, fi: usize, ti: usize, vi: usize, _r: f64, _s: f64, o: [f64; 2], ) -> [F; 2]
get uv from the one texture (fi ti vi: id of expanded polyhedron)
Source§fn ref_vtx_mut(&mut self) -> &mut Vec<[F; 3]>
fn ref_vtx_mut(&mut self) -> &mut Vec<[F; 3]>
ref vtx mut
Source§fn get_uv_f(
&self,
n: usize,
i: usize,
k: usize,
c: bool,
r: f64,
s: f64,
o: [f64; 2],
) -> [F; 2]
fn get_uv_f( &self, n: usize, i: usize, k: usize, c: bool, r: f64, s: f64, o: [f64; 2], ) -> [F; 2]
get uv from each face (i: vertex id of npolygon)
Source§fn phf(&self, tf: bool, c: bool) -> Vec<Vec<Vec<FTVI<F>>>>
fn phf(&self, tf: bool, c: bool) -> Vec<Vec<Vec<FTVI<F>>>>
polyhedron faces by Vec N of Vec P(polygon) indexed triangles
Source§fn gen_uv(
&self,
i: usize,
tf: bool,
fi: usize,
n: usize,
ti: usize,
vi: usize,
c: bool,
) -> FTVI<F>
fn gen_uv( &self, i: usize, tf: bool, fi: usize, n: usize, ti: usize, vi: usize, c: bool, ) -> FTVI<F>
gen uv
Source§fn adjust_cg_with_volume(&mut self, p: F) -> (Vec<F>, F)
fn adjust_cg_with_volume(&mut self, p: F) -> (Vec<F>, F)
adjust cg with volume
Auto Trait Implementations§
impl<F> Freeze for Polyhedron<F>where
F: Freeze,
impl<F> RefUnwindSafe for Polyhedron<F>where
F: RefUnwindSafe,
impl<F> Send for Polyhedron<F>where
F: Send,
impl<F> Sync for Polyhedron<F>where
F: Sync,
impl<F> Unpin for Polyhedron<F>where
F: Unpin,
impl<F> UnwindSafe for Polyhedron<F>where
F: UnwindSafe,
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