#ifndef __MATERIAL_H #define __MATERIAL_H namespace GtpVisibilityPreprocessor { class RgbColor { public: float r, g, b; RgbColor():r(0.5f),g(0.5f),b(0.5f) { } RgbColor(const float _r, const float _g, const float _b):r(_r),g(_g),b(_b) { } friend RgbColor RandomColor(const float a=0.0f, const float b=1.0f); }; class Material { public: RgbColor mDiffuseColor; RgbColor mSpecularColor; RgbColor mAmbientColor; Material(): mId(0) { } Material(const int id): mId(id) { } Material(const RgbColor &color):mDiffuseColor(color), mAmbientColor(color), mSpecularColor(0,0,0), mId(0) { } friend Material RandomMaterial(); /** Returns unique material id. */ int GetId() const { return mId; } protected: // unique material id int mId; }; } #endif