Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
material.h
Go to the documentation of this file.
1 // * This file is part of the COLOBOT source code
2 // * Copyright (C) 2012, Polish Portal of Colobot (PPC)
3 // *
4 // * This program is free software: you can redistribute it and/or modify
5 // * it under the terms of the GNU General Public License as published by
6 // * the Free Software Foundation, either version 3 of the License, or
7 // * (at your option) any later version.
8 // *
9 // * This program is distributed in the hope that it will be useful,
10 // * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // * GNU General Public License for more details.
13 // *
14 // * You should have received a copy of the GNU General Public License
15 // * along with this program. If not, see http://www.gnu.org/licenses/.
16 
22 #pragma once
23 
24 
25 #include "graphics/core/color.h"
26 
27 
28 // Graphics module namespace
29 namespace Gfx {
30 
41 struct Material
42 {
49 
50  bool operator==(const Material &mat) const
51  {
52  return diffuse == mat.diffuse && ambient == mat.ambient && specular == mat.specular;
53  }
54 
55  bool operator!=(const Material &mat) const
56  {
57  return ! operator==(mat);
58  }
59 };
60 
61 
62 } // namespace Gfx
63 
Color ambient
Ambient color.
Definition: material.h:46
Material of a surface.
Definition: material.h:41
Color structs and related functions.
RGBA color.
Definition: color.h:35
Color specular
Specular color.
Definition: material.h:48
Color diffuse
Diffuse color.
Definition: material.h:44