Added support for Kd
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! This module contains everything related to materials.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use math::vector::Vector3;
|
||||
|
||||
/// A 3D material.
|
||||
#[derive(Clone)]
|
||||
@@ -9,6 +10,9 @@ pub struct Material {
|
||||
/// The name of the material.
|
||||
pub name: String,
|
||||
|
||||
/// The diffuse color of the material.
|
||||
pub diffuse: Vector3<f32>,
|
||||
|
||||
/// Map linking each texture map to its file path.
|
||||
pub textures: HashMap<String, String>,
|
||||
|
||||
@@ -24,6 +28,7 @@ impl Material {
|
||||
pub fn new(name: &str) -> Material {
|
||||
Material {
|
||||
name: name.to_owned(),
|
||||
diffuse: Vector3::new(1.0, 1.0, 1.0),
|
||||
textures: HashMap::new(),
|
||||
unknown_instructions: vec![],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user