diff options
author | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
commit | 7028cbe09c688437910a25623098762bf0fa592d (patch) | |
tree | 10b5af58277d9880380c2251f109325542c4e6eb /src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp | |
parent | Move lemon to the src/others directory. (diff) | |
download | SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2 SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz |
Move Irrlicht to src/others.
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp')
-rw-r--r-- | src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp new file mode 100644 index 0000000..68f8d80 --- /dev/null +++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CMD3MeshFileLoader.cpp | |||
@@ -0,0 +1,53 @@ | |||
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 | #include "IrrCompileConfig.h" | ||
6 | #ifdef _IRR_COMPILE_WITH_MD3_LOADER_ | ||
7 | |||
8 | #include "CMD3MeshFileLoader.h" | ||
9 | #include "CAnimatedMeshMD3.h" | ||
10 | #include "irrString.h" | ||
11 | |||
12 | namespace irr | ||
13 | { | ||
14 | namespace scene | ||
15 | { | ||
16 | |||
17 | //! Constructor | ||
18 | CMD3MeshFileLoader::CMD3MeshFileLoader( scene::ISceneManager* smgr) | ||
19 | : SceneManager(smgr) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | |||
24 | //! destructor | ||
25 | CMD3MeshFileLoader::~CMD3MeshFileLoader() | ||
26 | { | ||
27 | } | ||
28 | |||
29 | |||
30 | //! returns true if the file maybe is able to be loaded by this class | ||
31 | //! based on the file extension (e.g. ".bsp") | ||
32 | bool CMD3MeshFileLoader::isALoadableFileExtension(const io::path& filename) const | ||
33 | { | ||
34 | return core::hasFileExtension ( filename, "md3" ); | ||
35 | } | ||
36 | |||
37 | |||
38 | IAnimatedMesh* CMD3MeshFileLoader::createMesh(io::IReadFile* file) | ||
39 | { | ||
40 | CAnimatedMeshMD3 * mesh = new CAnimatedMeshMD3(); | ||
41 | |||
42 | if ( mesh->loadModelFile ( 0, file, SceneManager->getFileSystem(), SceneManager->getVideoDriver() ) ) | ||
43 | return mesh; | ||
44 | |||
45 | mesh->drop (); | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | |||
50 | } // end namespace scene | ||
51 | } // end namespace irr | ||
52 | |||
53 | #endif // _IRR_COMPILE_WITH_MD3_LOADER_ | ||