]> git.lizzy.rs Git - irrlicht.git/blob - include/IMeshTextureLoader.h
Prepare GUI for IME support
[irrlicht.git] / include / IMeshTextureLoader.h
1 // This file is part of the "Irrlicht Engine".\r
2 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
3 \r
4 #ifndef IRR_I_MESH_TEXTURE_LOADER_H_INCLUDED__\r
5 #define IRR_I_MESH_TEXTURE_LOADER_H_INCLUDED__\r
6 \r
7 #include "path.h"\r
8 #include "IReferenceCounted.h"\r
9 \r
10 namespace irr\r
11 {\r
12 \r
13 namespace video\r
14 {\r
15         class ITexture;\r
16 }\r
17 namespace io\r
18 {\r
19         class IReadFile;\r
20 }\r
21 \r
22 namespace scene\r
23 {\r
24 \r
25 //! Finding and loading textures inside meshloaders.\r
26 /** A texture loader can search for a texture in several paths.\r
27 For example relative to a given texture-path, relative to the current\r
28 working directory or relative to a mesh- and/or material-file.\r
29 */\r
30 class IMeshTextureLoader : public virtual IReferenceCounted\r
31 {\r
32 public:\r
33 \r
34         //! Destructor\r
35         virtual ~IMeshTextureLoader() {}\r
36 \r
37         //! Set a custom texture path.\r
38     /** This is the first path the texture-loader should search.  */\r
39         virtual void setTexturePath(const irr::io::path& path) = 0;\r
40 \r
41         //! Get the current custom texture path.\r
42         virtual const irr::io::path& getTexturePath() const = 0;\r
43 \r
44         //! Get the texture by searching for it in all paths that makes sense for the given textureName.\r
45         /** Usually you do not have to use this method, it is used internally by IMeshLoader's.\r
46         \param textureName Texturename as used in the mesh-format\r
47         \return Pointer to the texture. Returns 0 if loading failed.*/\r
48         virtual irr::video::ITexture* getTexture(const irr::io::path& textureName) = 0;\r
49 \r
50         //! Meshloaders will search paths relative to the meshFile.\r
51         /** Usually you do not have to use this method, it is used internally by IMeshLoader's.\r
52                 Any values you set here will likely be overwritten internally. */\r
53         virtual void setMeshFile(const irr::io::IReadFile* meshFile)  = 0;\r
54 \r
55         //! Meshloaders will try to look relative to the path of the materialFile\r
56         /** Usually you do not have to use this method, it is used internally by IMeshLoader's.\r
57         Any values you set here will likely be overwritten internally.  */\r
58         virtual void setMaterialFile(const irr::io::IReadFile* materialFile)  = 0;\r
59 };\r
60 \r
61 \r
62 } // end namespace scene\r
63 } // end namespace irr\r
64 \r
65 #endif\r