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.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/model/material.h b/src/model/material.h
index 9185fd2..44470e5 100644
--- a/src/model/material.h
+++ b/src/model/material.h
@@ -24,7 +24,7 @@ public:
typedef void(* LoaderFuncPtr)(Material *);
/// surface flags
- enum SurfaceFlags { None=0, Primary=1, Secondary=2, Tertiary=3, Bright=4, Engine=8, Environment=16, Texture=32, Ignore=64};
+ enum SurfaceFlags { None = 0, Primary = 1, Secondary = 2, Tertiary = 3, Bright = 4, Engine = 8, Environment = 16, Texture = 32, Ignore = 64};
/// type definition for the material registry
typedef std::map<std::string, Material *> Registry;
@@ -35,20 +35,32 @@ public:
/* ---- inspectors ----------------------------------------- */
- inline const std::string &name() const { return material_name; }
+ inline const std::string &name() const {
+ return material_name;
+ }
- inline const math::Color &color() const { return material_color; }
+ inline const math::Color &color() const {
+ return material_color;
+ }
- inline const unsigned int flags() const { return material_flags; }
+ inline const unsigned int flags() const {
+ return material_flags;
+ }
- inline const std::string &texture() const { return material_texture; }
+ inline const std::string &texture() const {
+ return material_texture;
+ }
- inline const size_t texture_id() const { return material_texture_id; }
+ inline const size_t texture_id() const {
+ return material_texture_id;
+ }
/**
* @brief returns the material texture size
*/
- inline const math::Vector2f & size() const { return material_size; }
+ inline const math::Vector2f & size() const {
+ return material_size;
+ }
/* ---- mutators ------------------------------------------- */
@@ -74,16 +86,14 @@ public:
*/
void set_size(const math::Vector2f &size);
- inline void set_flags(SurfaceFlags flags)
- {
+ inline void set_flags(SurfaceFlags flags) {
material_flags |= flags;
}
- inline void unset_flags(SurfaceFlags flags)
- {
+ inline void unset_flags(SurfaceFlags flags) {
material_flags &= ~flags;
}
-
+
/* ---- static ----------------------------------------------------- */
/**
@@ -92,12 +102,12 @@ public:
*/
static void init();
- /**
+ /**
* @brief shutdown material registry
*/
static void shutdown();
- /**
+ /**
* @brief clear material registry
*/
static void clear();