Struct geometry::Geometry
[−]
[src]
pub struct Geometry(pub Vec<Range>);
A geometry consists of a list of triangles.
The triangles are stored separately,
in a triangle list u32
index buffer.
Methods
impl Geometry
[src]
fn new() -> Geometry
Creates a new geometry layer.
fn new_geometry<T>(
geom: &Geometry,
obj: &Object,
vertices: &mut Vec<T>,
indices: &mut Vec<u32>
) -> (Range<AddTo<Geometry>>, Result<VertexFormat, VertexFormatError>) where
T: Vertex + Default,
geom: &Geometry,
obj: &Object,
vertices: &mut Vec<T>,
indices: &mut Vec<u32>
) -> (Range<AddTo<Geometry>>, Result<VertexFormat, VertexFormatError>) where
T: Vertex + Default,
Creates new geometry from Wavefront OBJ format to vertex and index buffer.
fn add_range(&mut self, range: Range<AddTo<Geometry>>)
Adds new geometry.