ScummVM API documentation
3dloader_3ds.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 WINTERMUTE_3D_LOADER_3DS_H
23 #define WINTERMUTE_3D_LOADER_3DS_H
24 
25 #include "engines/wintermute/coll_templ.h"
26 #include "engines/wintermute/base/base_named_object.h"
27 #include "engines/wintermute/base/gfx/3dcamera.h"
28 #include "engines/wintermute/base/gfx/3dlight.h"
29 #include "engines/wintermute/base/gfx/3dmesh.h"
30 
31 #include "common/str.h"
32 
33 namespace Wintermute {
34 
35 class Loader3DS : public BaseNamedObject {
36 public:
37  enum E3DSFileObjectType{
38  OBJ_3DS_NONE, OBJ_3DS_MESH, OBJ_3DS_CAMERA, OBJ_3DS_LIGHT
39  };
40 
41  struct SFace{
42  uint16 _a;
43  uint16 _b;
44  uint16 _c;
45  };
46 
47  class FileObject3DS {
48  public:
49  DXVector3 _cameraTarget;
50  float _cameraBank;
51  float _cameraLens;
52  float _cameraFOV;
53  DXVector3 _cameraPos;
54  DXVector3 _lightTarget;
55  DXVector3 _lightPos;
56  uint32 _lightColor;
57  float _lightHotspot;
58  float _lightFalloff;
59  bool _lightOff;
60  bool _lightSpotlight;
61  bool _hidden;
62  uint16 _numFaces;
63  SFace *_faces;
64  DXVector3 *_vertices;
65  uint16 _numVertices;
66  Common::String _name;
67  E3DSFileObjectType _type;
68  virtual ~FileObject3DS();
69  FileObject3DS();
70  };
71 
72 public:
73  Common::String getCameraName(int index);
74  Common::String getLightName(int index);
75  Common::String getMeshName(int index);
76  bool loadCamera(int index, Camera3D *camera);
77  uint getNumCameras();
78  bool loadLight(int index, Light3D *light);
79  uint getNumLights();
80  bool loadMesh(int index, Mesh3DS *mesh);
81  uint getNumMeshes();
82  bool parseFile(const Common::String &filename);
83  Common::String _filename;
84  Loader3DS(BaseGame *inGame);
85  virtual ~Loader3DS();
87 };
88 
89 } // namespace Wintermute
90 
91 #endif
Definition: base_game.h:76
Definition: str.h:59
Definition: xmath.h:50
Definition: 3dloader_3ds.h:41
Definition: 3dloader_3ds.h:35
Definition: 3dlight.h:38
Definition: 3dmesh.h:55
Definition: coll_templ.h:63
Definition: 3dloader_3ds.h:47
Definition: base_named_object.h:36
Definition: 3dcamera.h:38
Definition: achievements_tables.h:27