diff options
Diffstat (limited to 'src/graphics/core/material.h')
-rw-r--r-- | src/graphics/core/material.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/graphics/core/material.h b/src/graphics/core/material.h index 31b42f3..156ff36 100644 --- a/src/graphics/core/material.h +++ b/src/graphics/core/material.h @@ -14,7 +14,10 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// material.h +/** + * \file graphics/core/material.h + * \brief Material struct + */ #pragma once @@ -42,6 +45,16 @@ struct Material Gfx::Color ambient; //! Specular color Gfx::Color specular; + + bool operator==(const Gfx::Material &mat) const + { + return diffuse == mat.diffuse && ambient == mat.ambient && specular == mat.specular; + } + + bool operator!=(const Gfx::Material &mat) const + { + return ! operator==(mat); + } }; }; // namespace Gfx |