~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to source/Irrlicht/CSMFMeshFileLoader.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2010-2011 Gaz Davidson
 
2
// This file is part of the "Irrlicht Engine".
 
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
 
4
 
 
5
#ifndef __C_SMF_MESH_LOADER_H_INCLUDED__
 
6
#define __C_SMF_MESH_LOADER_H_INCLUDED__
 
7
 
 
8
#include "IMeshLoader.h"
 
9
#include "SMesh.h"
 
10
 
 
11
namespace irr
 
12
{
 
13
 
 
14
namespace video
 
15
{
 
16
        class IVideoDriver;
 
17
}
 
18
 
 
19
namespace scene
 
20
{
 
21
 
 
22
//! Class which can load
 
23
class CSMFMeshFileLoader : public virtual IMeshLoader
 
24
{
 
25
public:
 
26
 
 
27
        CSMFMeshFileLoader(video::IVideoDriver* driver);
 
28
 
 
29
        //! Returns true if the file might be loaded by this class.
 
30
        virtual bool isALoadableFileExtension(const io::path& filename) const;
 
31
 
 
32
        //! Creates/loads an animated mesh from the file.
 
33
        virtual IAnimatedMesh* createMesh(io::IReadFile* file);
 
34
private:
 
35
 
 
36
        void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation);
 
37
 
 
38
        video::IVideoDriver* Driver;
 
39
};
 
40
 
 
41
} // end namespace scene
 
42
 
 
43
namespace io
 
44
{
 
45
        class BinaryFile
 
46
        {
 
47
        public:
 
48
                //! reads most types from the given file, moving the file pointer along
 
49
                template <class T>
 
50
                static void read(io::IReadFile* file, T &out, bool bigEndian=false);
 
51
 
 
52
                //! reads a 3d vector from the file, moving the file pointer along
 
53
                static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false);
 
54
 
 
55
                //! reads a 2d vector from the file, moving the file pointer along
 
56
                static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false);
 
57
 
 
58
                //! reads a null terminated string from the file, moving the file pointer along
 
59
                static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false);
 
60
 
 
61
        };
 
62
}
 
63
 
 
64
} // end namespace irr
 
65
 
 
66
#endif // __C_SMF_MESH_LOADER_H_INCLUDED__
 
67