[−][src]Struct hexasphere::Hexasphere
Hexagonally tiled sphere. Created with the new
method.
Points are represented as the triangular subdivisions of the faces of an icosahedron, the dual of which creates a hexagonally tiled sphere with 12 pentagons. The number of subdivisions is exactly equal to the number of hexagons between adjacent pentagons.
Points are stored in normalized space, on the surface of a unit sphere. The initial points are spherically interpolated to preserve accuracy, and not distort due to projections such as linear interpolation and then normalization.
Implementations
impl<T> Hexasphere<T>
[src]
pub fn new(subdivisions: usize, generator: impl FnMut(Vec3) -> T) -> Self
[src]
Creates a hexagonally tiled sphere.
The number of hexagons between pentagons is subdivisions
, and
generator
permits you to create a unique value for every point
on the sphere.
pub fn raw_points(&self) -> &[Vec3]
[src]
pub fn get_indices(&self, triangle: usize, buffer: &mut Vec<u32>)
[src]
Appends the indices for the triangle into buffer
.
pub fn subdivisions(&self) -> usize
[src]
pub fn raw_data(&self) -> &[T]
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Hexasphere<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Hexasphere<T> where
T: Send,
T: Send,
impl<T> Sync for Hexasphere<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Hexasphere<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Hexasphere<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,