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,
39  OBJ_3DS_MESH,
40  OBJ_3DS_CAMERA,
41  OBJ_3DS_LIGHT
42  };
43 
44  struct SFace{
45  uint16 _a;
46  uint16 _b;
47  uint16 _c;
48  };
49 
50  class FileObject3DS {
51  public:
52  DXVector3 _cameraTarget;
53  float _cameraBank;
54  float _cameraLens;
55  float _cameraFOV;
56  DXVector3 _cameraPos;
57  DXVector3 _lightTarget;
58  DXVector3 _lightPos;
59  uint32 _lightColor;
60  float _lightHotspot;
61  float _lightFalloff;
62  bool _lightOff;
63  bool _lightSpotlight;
64  bool _hidden;
65  uint16 _numFaces;
66  SFace *_faces;
67  DXVector3 *_vertices;
68  uint16 _numVertices;
69  char *_name;
70  E3DSFileObjectType _type;
71  virtual ~FileObject3DS();
72  FileObject3DS();
73  };
74 
75 public:
76  char * getCameraName(int index);
77  char * getLightName(int index);
78  char * getMeshName(int index);
79  bool loadCamera(int index, Camera3D *camera);
80  int32 getNumCameras();
81  bool loadLight(int index, Light3D *light);
82  int32 getNumLights();
83  bool loadMesh(int index, Mesh3DS *mesh);
84  int32 getNumMeshes();
85  bool parseFile(const char *filename);
86  char *_filename;
87  Loader3DS(BaseGame *inGame);
88  virtual ~Loader3DS();
90 };
91 
92 } // namespace Wintermute
93 
94 #endif
Definition: base_game.h:79
Definition: xmath.h:72
Definition: 3dloader_3ds.h:44
Definition: 3dloader_3ds.h:35
Definition: 3dlight.h:38
Definition: 3dmesh.h:55
Definition: coll_templ.h:347
Definition: 3dloader_3ds.h:50
Definition: base_named_object.h:36
Definition: 3dcamera.h:38
Definition: achievements_tables.h:27