From 6a57df6928122d5bbcf6a4ba7a9fce00803e8bb2 Mon Sep 17 00:00:00 2001 From: Colden Cullen Date: Thu, 24 Apr 2014 18:19:52 -0400 Subject: [PATCH] Documented Material. --- source/components/material.d | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/source/components/material.d b/source/components/material.d index 1a5bcb97..5ff1e024 100644 --- a/source/components/material.d +++ b/source/components/material.d @@ -1,5 +1,5 @@ /** - * TODO + * Defines the Material and Texture classes. */ module components.material; import core, components, graphics, utility; @@ -9,7 +9,7 @@ import derelict.opengl3.gl3, derelict.freeimage.freeimage; import std.variant, std.conv, std.string; /** - * TODO + * A collection of textures that serve different purposes in the rendering pipeline. */ shared final class Material : IComponent { @@ -17,19 +17,15 @@ private: Texture _diffuse, _normal, _specular; public: - /// TODO + /// The diffuse (or color) map. mixin( Property!(_diffuse, AccessModifier.Public) ); - /// TODO + /// The normal map, which specifies which way a face is pointing at a given pixel. mixin( Property!(_normal, AccessModifier.Public) ); - /// TODO + /// The specular map, which specifies how shiny a given point is. mixin( Property!(_specular, AccessModifier.Public) ); /** - * TODO - * - * Params: - * - * Returns: + * Default constructor, makes sure everything is initialized to default. */ this() { @@ -39,9 +35,10 @@ public: /** * Create a Material from a Yaml node. * - * Params: TODO + * Params: + * yamlObj = The YAML object to pull the data from. * - * Returns: + * Returns: A new material with specified maps. */ static shared(Material) createFromYaml( Node yamlObj ) { @@ -60,7 +57,9 @@ public: return obj; } + /// Empty method overload to make materials components. override void update() { } + /// ditto override void shutdown() { } }