pub struct Primitive<VT> {
pub vertices: Vec<VT>,
}
Fields§
§vertices: Vec<VT>
Implementations§
Source§impl<VT> Primitive<VT>
impl<VT> Primitive<VT>
pub fn byte_length(&self) -> usize
pub fn with_indices(self, indices: Vec<u16>) -> IndexedPrimitive<VT>
Source§impl Primitive<Vector4F32>
impl Primitive<Vector4F32>
Source§impl Primitive<Vector4F32>
impl Primitive<Vector4F32>
Sourcepub fn limited_xz_grid(limit: u32) -> Self
pub fn limited_xz_grid(limit: u32) -> Self
limited xz grid lines, rendered as line list
Source§impl Primitive<VertexUV2D>
impl Primitive<VertexUV2D>
Source§impl Primitive<VertexUV>
impl Primitive<VertexUV>
Sourcepub fn uv_plane_xy(size: f32, z: f32) -> Self
pub fn uv_plane_xy(size: f32, z: f32) -> Self
0.0 to size squared plane with normalized uv, rendered as triangle strip
Sourcepub fn uv_plane_centric_xy(size: f32, z: f32) -> Self
pub fn uv_plane_centric_xy(size: f32, z: f32) -> Self
-size to size squared plane with normalized uv, rendered as triangle strip
Source§impl Primitive<ColoredVertex>
impl Primitive<ColoredVertex>
Sourcepub fn limited_coordinate_axis(limit: u32) -> Self
pub fn limited_coordinate_axis(limit: u32) -> Self
colored coordinate axis lines, rendered as line list
Trait Implementations§
Source§impl<VT: Clone> ModelData for Primitive<VT>
impl<VT: Clone> ModelData for Primitive<VT>
type PreallocOffsetType = u64
type RendererParams = ()
fn prealloc(&self, alloc: &mut BufferPrealloc<'_>) -> u64
fn stage_data_into( &self, mem: &MappedMemory<'_, impl DeviceMemoryMut + ?Sized>, vo: u64, )
Auto Trait Implementations§
impl<VT> Freeze for Primitive<VT>
impl<VT> RefUnwindSafe for Primitive<VT>where
VT: RefUnwindSafe,
impl<VT> Send for Primitive<VT>where
VT: Send,
impl<VT> Sync for Primitive<VT>where
VT: Sync,
impl<VT> Unpin for Primitive<VT>where
VT: Unpin,
impl<VT> UnwindSafe for Primitive<VT>where
VT: 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
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>
Converts
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>
Converts
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