Struct renderling::stage::Vertex
source ยท pub struct Vertex {
pub position: Vec3,
pub color: Vec4,
pub uv0: Vec2,
pub uv1: Vec2,
pub normal: Vec3,
pub tangent: Vec4,
pub joints: [u32; 4],
pub weights: [f32; 4],
}Expand description
A vertex in a mesh.
Fieldsยง
ยงposition: Vec3ยงcolor: Vec4ยงuv0: Vec2ยงuv1: Vec2ยงnormal: Vec3ยงtangent: Vec4ยงjoints: [u32; 4]ยงweights: [f32; 4]Implementationsยง
sourceยงimpl Vertex
impl Vertex
pub fn with_position(self, p: impl Into<Vec3>) -> Self
pub fn with_color(self, c: impl Into<Vec4>) -> Self
pub fn with_uv0(self, uv: impl Into<Vec2>) -> Self
pub fn with_uv1(self, uv: impl Into<Vec2>) -> Self
pub fn with_normal(self, n: impl Into<Vec3>) -> Self
pub fn with_tangent(self, t: impl Into<Vec4>) -> Self
pub fn generate_normal(a: Vec3, b: Vec3, c: Vec3) -> Vec3
pub fn generate_tangent( a: Vec3, a_uv: Vec2, b: Vec3, b_uv: Vec2, c: Vec3, c_uv: Vec2 ) -> Vec4
Trait Implementationsยง
sourceยงimpl PartialEq for Vertex
impl PartialEq for Vertex
impl Copy for Vertex
impl StructuralPartialEq for Vertex
Auto Trait Implementationsยง
impl Freeze for Vertex
impl RefUnwindSafe for Vertex
impl Send for Vertex
impl Sync for Vertex
impl Unpin for Vertex
impl UnwindSafe for Vertex
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourceยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.sourceยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.sourceยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.sourceยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.sourceยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moresourceยงimpl<T> Pointable for T
impl<T> Pointable for T
sourceยงimpl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
sourceยงfn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().