Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/material.h')
-rw-r--r--src/model/material.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/model/material.h b/src/model/material.h
index 8081792..a2ba0d6 100644
--- a/src/model/material.h
+++ b/src/model/material.h
@@ -10,6 +10,8 @@
#include <string>
#include <map>
+#include "math/color.h"
+
namespace model
{
@@ -18,7 +20,7 @@ class Material
{
public:
/// surface flags
- enum SurfaceFlags { None=0, Primary=1, Secondary=2, Tertiary=3, Dark=4, Light=8, Engine=16};
+ enum SurfaceFlags { None=0, Primary=1, Secondary=2, Tertiary=3, Bright=4, Engine=8, Environment=16};
/// type definition for the material registry
typedef std::map<std::string, Material *> Registry;
@@ -26,7 +28,24 @@ public:
Material(const std::string &name);
~Material();
- inline const std::string &name() { return material_name; }
+ inline const std::string &name() const { return material_name; }
+
+ inline const math::Color &color() const { return material_color; }
+
+ inline const unsigned int flags() const { return material_flags; }
+
+ inline void set_flags(SurfaceFlags flags)
+ {
+ material_flags |= flags;
+ }
+
+ inline void unset_flags(SurfaceFlags flags)
+ {
+ material_flags &= ~flags;
+ }
+
+
+ void set_color(const math::Color &color);
/* ---- static ----------------------------------------------------- */
@@ -54,7 +73,9 @@ public:
private:
std::string material_name;
-
+ math::Color material_color;
+ unsigned int material_flags;
+
/// the material registry
static Registry material_registry;