pub type Triangles = Geom<TriangleGeom>;
Expand description
Provides the information needed for a mesh to bind vertex attributes together and then organize those vertices into individual triangles.
Aliased Type§
pub struct Triangles {
pub name: Option<String>,
pub material: Option<String>,
pub count: usize,
pub inputs: InputList,
pub data: TriangleGeom,
pub extra: Vec<Extra>,
}
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: TriangleGeom
The specific data for the geometry element.
extra: Vec<Extra>
Provides arbitrary additional information about this element.
Implementations§
Source§impl Triangles
impl Triangles
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.