pub struct Lines3d {
pub vertices: Vec<Vert3dInstanced>,
pub indices: Vec<u32>,
}Expand description
Raw data defining a wireframe mesh
Fields§
§vertices: Vec<Vert3dInstanced>§indices: Vec<u32>Implementations§
Source§impl Lines3d
impl Lines3d
Sourcepub fn capsule(
index_offset: u32,
hemisphere_latitude_divisions: u16,
longitude_divisions: u16,
) -> Self
pub fn capsule( index_offset: u32, hemisphere_latitude_divisions: u16, longitude_divisions: u16, ) -> Self
Two hemispherical “caps” connected at their equators.
Intended to be scaled first and then each cap translated along the Z axis to achieve the correct capsule height.
Can also be used to render a hemisphere or a sphere by slicing the
corresponding number of indices. Note that the sphere is slightly
degenerate since there are duplicate vertices on the equator, and so the
last 2 * longitude_divisions indices will differ but the total index
count will be the same.
§Panics
Panics of hemisphere_latitude_divisions is zero or if
longitude_divisions is less than two.
Source§impl Lines3d
impl Lines3d
Sourcepub fn hemisphere(
index_offset: u32,
latitude_divisions: u16,
longitude_divisions: u16,
) -> Self
pub fn hemisphere( index_offset: u32, latitude_divisions: u16, longitude_divisions: u16, ) -> Self
Generates a hemisphere with unit radius in the positive Z half-space
with a number of parallels equal to latitude_divisions and a number of
half-meridians equal to longitude_divisions
Trait Implementations§
impl StructuralPartialEq for Lines3d
Auto Trait Implementations§
impl Freeze for Lines3d
impl RefUnwindSafe for Lines3d
impl Send for Lines3d
impl Sync for Lines3d
impl Unpin for Lines3d
impl UnwindSafe for Lines3d
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more