Struct ModelPolygon
#[non_exhaustive]pub struct ModelPolygon {
pub vertices: [ModelVertex; 4],
pub normal: [f32; 3],
}Expand description
A baked face (ModelPart.Polygon), with the normal it faces in its
part’s frame.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.vertices: [ModelVertex; 4]The four corners in winding order.
normal: [f32; 3]The face normal in model coordinates.
Implementations§
§impl ModelPolygon
impl ModelPolygon
pub fn new(vertices: [ModelVertex; 4], normal: [f32; 3]) -> ModelPolygon
pub fn new(vertices: [ModelVertex; 4], normal: [f32; 3]) -> ModelPolygon
A quad with its outward normal.
Trait Implementations§
§impl Clone for ModelPolygon
impl Clone for ModelPolygon
§fn clone(&self) -> ModelPolygon
fn clone(&self) -> ModelPolygon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ModelPolygon
§impl Debug for ModelPolygon
impl Debug for ModelPolygon
§impl<'de> Deserialize<'de> for ModelPolygon
impl<'de> Deserialize<'de> for ModelPolygon
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelPolygon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelPolygon, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for ModelPolygon
impl PartialEq for ModelPolygon
§impl Serialize for ModelPolygon
impl Serialize for ModelPolygon
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelPolygon
Auto Trait Implementations§
impl Freeze for ModelPolygon
impl RefUnwindSafe for ModelPolygon
impl Send for ModelPolygon
impl Sync for ModelPolygon
impl Unpin for ModelPolygon
impl UnsafeUnpin for ModelPolygon
impl UnwindSafe for ModelPolygon
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