aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h
new file mode 100644
index 0000000..a314913
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CDMFLoader.h
@@ -0,0 +1,91 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4//
5// This file was originally written by Salvatore Russo.
6// I (Nikolaus Gebhardt) did some minor modifications changes to it and integrated
7// it into Irrlicht:
8// - removed STL dependency
9// - removed log file and replaced it with irrlicht logging
10// - adapted code formatting a bit to Irrlicht style
11// - removed memory leaks
12// Thanks a lot to Salvatore for his work on this and that he gave me
13// his permission to add it into Irrlicht.
14
15/*
16 CDMFLoader by Salvatore Russo
17 Version 1.3
18
19 This loader is used to load DMF files in Irrlicht.
20 Look at the documentation for a sample application.
21
22 Parts of this code are from Murphy McCauley COCTLoader just like
23 GetFaceNormal() or indexes creation routines and a routine to add faces. So
24 please refer to COCTLoader.h to know more about rights granted.
25
26 You can use this software as you wish but you must not remove these notes about license nor
27 credits to others for parts of this code.
28*/
29
30#ifndef __C_DMF_LOADER_H_INCLUDED__
31#define __C_DMF_LOADER_H_INCLUDED__
32
33#include "IMeshLoader.h"
34#include "IReadFile.h"
35#include "IFileSystem.h"
36#include "SMesh.h"
37#include "IVideoDriver.h"
38#include "ISceneManager.h"
39#include "SAnimatedMesh.h"
40
41namespace irr
42{
43namespace scene
44{
45 /** A class to load DeleD mesh files.*/
46 class CDMFLoader : public IMeshLoader
47 {
48 public:
49
50 /** constructor*/
51 CDMFLoader(ISceneManager* smgr, io::IFileSystem* filesys);
52
53 //! returns true if the file maybe is able to be loaded by this class
54 //! based on the file extension (e.g. ".cob")
55 virtual bool isALoadableFileExtension(const io::path& filename) const;
56
57 /** creates/loads an animated mesh from the file.
58 \return Pointer to the created mesh. Returns 0 if loading failed.
59 If you no longer need the mesh, you should call IAnimatedMesh::drop().
60 See IReferenceCounted::drop() for more information.*/
61 virtual IAnimatedMesh* createMesh(io::IReadFile* file);
62
63 /** loads dynamic lights present in this scene.
64 Note that loaded lights from DeleD must have the suffix \b dynamic_ and must be \b pointlight.
65 Irrlicht correctly loads specular color, diffuse color , position and distance of object affected by light.
66 \return number of lights loaded or 0 if loading failed.*/
67 int loadLights(const c8 * filename, ISceneManager* smgr,
68 ISceneNode* parent = 0, s32 base_id = 1000);
69
70 /** loads water plains present in this scene.
71 Note that loaded water plains from DeleD must have the suffix \b water_ and must be \b rectangle (with just 1 rectangular face).
72 Irrlicht correctly loads position and rotation of water plain as well as texture layers.
73 \return number of water plains loaded or 0 if loading failed.*/
74 int loadWaterPlains(const c8 *filename,
75 ISceneManager* smgr,
76 ISceneNode * parent = 0,
77 s32 base_id = 2000,
78 bool mode = true);
79
80 private:
81 void findFile(bool use_mat_dirs, const core::stringc& path, const core::stringc& matPath, core::stringc& filename);
82
83 ISceneManager* SceneMgr;
84 io::IFileSystem* FileSystem;
85 };
86
87} // end namespace scene
88} // end namespace irr
89
90#endif
91