1 // This file is part of the "Irrlicht Engine".
\r
2 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
4 #ifndef IRR_I_MESH_TEXTURE_LOADER_H_INCLUDED__
\r
5 #define IRR_I_MESH_TEXTURE_LOADER_H_INCLUDED__
\r
8 #include "IReferenceCounted.h"
\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
30 class IMeshTextureLoader : public virtual IReferenceCounted
\r
35 virtual ~IMeshTextureLoader() {}
\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
41 //! Get the current custom texture path.
\r
42 virtual const irr::io::path& getTexturePath() const = 0;
\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
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
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
62 } // end namespace scene
\r
63 } // end namespace irr
\r