Struct dae_parser::Mesh

source ·
pub struct Mesh {
    pub convex: bool,
    pub sources: Vec<Source>,
    pub vertices: Option<Vertices>,
    pub elements: Vec<Primitive>,
    pub extra: Vec<Extra>,
}
Expand description

Describes basic geometric meshes using vertex and primitive information.

Fields§

§convex: bool

If true, this is a <convex_mesh> element. Both elements have the same structure otherwise.

§sources: Vec<Source>

Provides the bulk of the mesh’s vertex data.

§vertices: Option<Vertices>

Describes the mesh-vertex attributes and establishes their topological identity.

§elements: Vec<Primitive>

Geometric primitives, which assemble values from the inputs into vertex attribute data.

§extra: Vec<Extra>

Provides arbitrary additional information about this element.

Implementations§

source§

impl Mesh

source

pub fn new( sources: Vec<Source>, vertices: Vertices, elements: Vec<Primitive> ) -> Self

Construct a new Mesh from vertices and elements.

source

pub fn new_convex( sources: Vec<Source>, vertices: Vertices, elements: Vec<Primitive> ) -> Self

Construct a new convex Mesh from vertices and elements.

source

pub const CONVEX: &'static str = "convex_mesh"

The name of the XML node: convex_mesh

source

pub fn parse_convex(element: &Element) -> Result<GeometryElement, Error>

Parse a <convex_mesh> XML element.

source

pub fn parse(convex: bool, element: &Element) -> Result<Self, Error>

Parse a Mesh from an XML element of type <convex_mesh> or <mesh>.

Trait Implementations§

source§

impl Clone for Mesh

source§

fn clone(&self) -> Mesh

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Mesh

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Mesh> for GeometryElement

source§

fn from(v: Mesh) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl RefUnwindSafe for Mesh

§

impl Send for Mesh

§

impl Sync for Mesh

§

impl Unpin for Mesh

§

impl UnwindSafe for Mesh

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.