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:

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

Construct an Importer from a VertexImporter and a UrlResolver.

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.

Construct a new LineStrips object from a data buffer. Each buffer in data contains 2 or more vertices, each consisting of inputs.len() indices, for a total of inputs.len() * verts values.

Construct a new Polygons object from raw data.

Construct a new PolyList object from a data buffer. Each value n in vcount corresponds to a polygon with n vertices, to which inputs.len() * n index values are associated in prim.

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.

Construct a new TriFans object from a data buffer. Each buffer in data contains 3 or more vertices, each consisting of inputs.len() indices, for a total of inputs.len() * verts values.

Construct a new TriStrips object from a data buffer. Each buffer in data contains 3 or more vertices, each consisting of inputs.len() indices, for a total of inputs.len() * verts values.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.