Struct cem::v2::Material
[−]
[src]
pub struct Material { pub name: String, pub texture: u32, pub triangles: Vec<TriangleSelection>, pub vertex_offset: VertexIndex, pub vertex_count: u32, pub texture_name: String, }
A material to be applied to vertices. Contains special names, the texture, and target vertices / triangles. The name of the material may give it special meaning depending on the context. For example, the "player color" material is used to render the player color.
Fields
name: String
A name. Empire Earth does not appear to care about the value.
texture: u32
The bound texture used by this material. The texture bindings are managed externally, in most cases by a file like dbgraphics. Note: the true meaning of this value is unknown, and 0 seems to work.
triangles: Vec<TriangleSelection>
The range of triangles for each LOD level.
vertex_offset: VertexIndex
Value that the vertex index of
vertex_count: u32
texture_name: String
Name of the texture used. Empire Earth does not appear to care about the value.
Methods
impl Material
[src]
fn read<R>(r: &mut R, lod_levels: usize) -> Result<Self> where
R: Read,
[src]
R: Read,
fn write<W>(&self, w: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,