ScummVM API documentation
mesh_component.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 GRIM_MESH_COMPONENT_H
23 #define GRIM_MESH_COMPONENT_H
24 
25 #include "engines/grim/costume/component.h"
26 
27 namespace Grim {
28 
29 class CMap;
30 class Model;
31 class ModelNode;
32 
33 class MeshComponent : public Component {
34 public:
35  MeshComponent(Component *parent, int parentID, const char *name, tag32 tag);
36  void init() override;
37  CMap *cmap();
38  void setKey(int val) override;
39  int update(uint time) override;
40  void reset() override;
41  void saveState(SaveGame *state) override;
42  void restoreState(SaveGame *state) override;
43 
44  void setMatrix(const Math::Matrix4 &matrix) override { _matrix = matrix; };
45 
46  ModelNode *getNode() { return _node; }
47  Model *getModel() { return _model; }
48 
49 private:
50  int _num;
51  Model *_model;
52  ModelNode *_node;
53  Math::Matrix4 _matrix;
54 };
55 
56 } // end of namespace Grim
57 
58 #endif
Definition: savegame.h:33
Definition: actor.h:33
Definition: colormap.h:35
Definition: component.h:38
Definition: model.h:43
Definition: model.h:158
Definition: mesh_component.h:33