ScummVM API documentation
te_material.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TETRAEDGE_TE_TE_MATERIAL_H
23 #define TETRAEDGE_TE_TE_MATERIAL_H
24 
25 #include "common/ptr.h"
26 #include "common/path.h"
27 #include "common/stream.h"
28 
29 #include "tetraedge/te/te_color.h"
30 #include "tetraedge/te/te_3d_texture.h"
31 #include "tetraedge/te/te_intrusive_ptr.h"
32 
33 namespace Tetraedge {
34 
35 class TeMaterial {
36 public:
37  enum Mode {
38  MaterialMode0,
39  MaterialMode1,
40  MaterialMode2 // alpha only?
41  };
42 
43  TeMaterial();
44  TeMaterial(const TeMaterial &other) = default;
45  TeMaterial(TeIntrusivePtr<Te3DTexture> texture, Mode mode);
46 
47  // Note: apply() function from original moved to TeRenderer to remove OGL specific code from here
48  void defaultValues();
49  static void deserialize(Common::SeekableReadStream &stream, TeMaterial &material, const Common::Path &path);
50  static void serialize(Common::SeekableWriteStream &stream, TeMaterial &material);
51 
52  bool operator==(const TeMaterial &other) const;
53  bool operator!=(const TeMaterial &other) const {
54  return !operator==(other);
55  }
56 
57  TeMaterial &operator=(const TeMaterial &other);
58 
59  Common::String dump() const;
60 
62  Mode _mode;
63  TeColor _ambientColor;
64  TeColor _diffuseColor;
65  TeColor _specularColor;
66  TeColor _emissionColor;
67  float _shininess;
68  bool _isShadowTexture;
69  bool _enableLights;
70 };
71 
72 } // end namespace Tetraedge
73 
74 #endif // TETRAEDGE_TE_TE_MATERIAL_H
Definition: str.h:59
Definition: detection.h:27
Definition: te_color.h:30
Definition: path.h:52
Definition: stream.h:745
Definition: te_material.h:35
Definition: te_intrusive_ptr.h:31
Definition: stream.h:351