Struct dae_parser::Geom
source · [−]pub struct Geom<T> {
pub name: Option<String>,
pub material: Option<String>,
pub count: usize,
pub inputs: InputList,
pub data: T,
pub extra: Vec<Extra>,
}
Expand description
The common data for the geometry types:
Lines
= Geom<
LineGeom
>
LineStrips
= Geom<
LineStripGeom
>
Polygons
= Geom<
PolygonGeom
>
PolyList
= Geom<
PolyListGeom
>
Triangles
= Geom<
TriangleGeom
>
TriFans
= Geom<
TriFanGeom
>
TriStrips
= Geom<
TriStripGeom
>
Fields
name: Option<String>
The text string name of this element.
material: Option<String>
Declares a symbol for a material.
This symbol is bound to a material at the time of instantiation;
see Instance<Geometry>
and BindMaterial
.
If not specified then the lighting and shading results are application defined.
count: usize
The number of line/triangle/polygon primitives.
inputs: InputList
The vertex attribute access information.
data: T
The specific data for the geometry element.
extra: Vec<Extra>
Provides arbitrary additional information about this element.
Implementations
sourceimpl<T> Geom<T>
impl<T> Geom<T>
sourcepub fn importer<'a, R: UrlResolver<'a, Source>>(
&'a self,
res: &R,
vimp: VertexImporter<'a>
) -> Result<Importer<'a>, R::Error>
pub fn importer<'a, R: UrlResolver<'a, Source>>(
&'a self,
res: &R,
vimp: VertexImporter<'a>
) -> Result<Importer<'a>, R::Error>
Construct an Importer
from a VertexImporter
and a UrlResolver
.
sourceimpl Geom<LineGeom>
impl Geom<LineGeom>
sourcepub fn new(
material: Option<String>,
inputs: Vec<InputS>,
count: usize,
prim: Box<[u32]>
) -> Self
pub fn new(
material: Option<String>,
inputs: Vec<InputS>,
count: usize,
prim: Box<[u32]>
) -> Self
Construct a new Lines
object from a data buffer.
The data buffer prim
contains exactly count
lines, consisting of 2 vertices,
each consisting of inputs.len()
indices,
for a total of inputs.len() * 2 * count
values.
sourceimpl Geom<LineStripGeom>
impl Geom<LineStripGeom>
sourceimpl Geom<PolygonGeom>
impl Geom<PolygonGeom>
sourceimpl Geom<PolyListGeom>
impl Geom<PolyListGeom>
sourceimpl Geom<TriangleGeom>
impl Geom<TriangleGeom>
sourcepub fn new(
material: Option<String>,
inputs: Vec<InputS>,
count: usize,
prim: Box<[u32]>
) -> Self
pub fn new(
material: Option<String>,
inputs: Vec<InputS>,
count: usize,
prim: Box<[u32]>
) -> Self
Construct a new Triangles
object from a data buffer.
The data buffer prim
contains exactly count
triangles, consisting of 3 vertices,
each consisting of inputs.len()
indices,
for a total of inputs.len() * 3 * count
values.
sourceimpl Geom<TriFanGeom>
impl Geom<TriFanGeom>
sourceimpl Geom<TriStripGeom>
impl Geom<TriStripGeom>
Trait Implementations
sourceimpl From<Geom<LineStripGeom>> for Primitive
impl From<Geom<LineStripGeom>> for Primitive
sourcefn from(val: LineStrips) -> Self
fn from(val: LineStrips) -> Self
Converts to this type from the input type.
sourceimpl From<Geom<PolyListGeom>> for Primitive
impl From<Geom<PolyListGeom>> for Primitive
sourceimpl From<Geom<PolygonGeom>> for Primitive
impl From<Geom<PolygonGeom>> for Primitive
sourceimpl From<Geom<TriFanGeom>> for Primitive
impl From<Geom<TriFanGeom>> for Primitive
sourceimpl From<Geom<TriStripGeom>> for Primitive
impl From<Geom<TriStripGeom>> for Primitive
Auto Trait Implementations
impl<T> RefUnwindSafe for Geom<T> where
T: RefUnwindSafe,
impl<T> Send for Geom<T> where
T: Send,
impl<T> Sync for Geom<T> where
T: Sync,
impl<T> Unpin for Geom<T> where
T: Unpin,
impl<T> UnwindSafe for Geom<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more