Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::IMeshTextureLoader Class Referenceabstract

Finding and loading textures inside meshloaders. More...

#include <nirtcpp/core/engine/IMeshTextureLoader.hpp>

Inheritance diagram for nirt::scene::IMeshTextureLoader:
Inheritance graph
Collaboration diagram for nirt::scene::IMeshTextureLoader:
Collaboration graph

Public Member Functions

virtual ~IMeshTextureLoader ()
 Destructor.
 
virtual void setTexturePath (const nirt::io::path &path)=0
 Set a custom texture path.
 
virtual const nirt::io::pathgetTexturePath () const =0
 Get the current custom texture path.
 
virtual nirt::video::ITexturegetTexture (const nirt::io::path &textureName)=0
 Get the texture by searching for it in all paths that makes sense for the given textureName.
 
virtual void setMeshFile (const nirt::io::IReadFile *meshFile)=0
 Meshloaders will search paths relative to the meshFile.
 
virtual void setMaterialFile (const nirt::io::IReadFile *materialFile)=0
 Meshloaders will try to look relative to the path of the materialFile.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Finding and loading textures inside meshloaders.

A texture loader can search for a texture in several paths. For example relative to a given texture-path, relative to the current working directory or relative to a mesh- and/or material-file.

Member Function Documentation

◆ getTexture()

virtual nirt::video::ITexture * nirt::scene::IMeshTextureLoader::getTexture ( const nirt::io::path textureName)
pure virtual

Get the texture by searching for it in all paths that makes sense for the given textureName.

Usually you do not have to use this method, it is used internally by IMeshLoader's.

Parameters
textureNameTexturename as used in the mesh-format
Returns
Pointer to the texture. Returns 0 if loading failed.

◆ setMaterialFile()

virtual void nirt::scene::IMeshTextureLoader::setMaterialFile ( const nirt::io::IReadFile materialFile)
pure virtual

Meshloaders will try to look relative to the path of the materialFile.

Usually you do not have to use this method, it is used internally by IMeshLoader's. Any values you set here will likely be overwritten internally.

◆ setMeshFile()

virtual void nirt::scene::IMeshTextureLoader::setMeshFile ( const nirt::io::IReadFile meshFile)
pure virtual

Meshloaders will search paths relative to the meshFile.

Usually you do not have to use this method, it is used internally by IMeshLoader's. Any values you set here will likely be overwritten internally.

◆ setTexturePath()

virtual void nirt::scene::IMeshTextureLoader::setTexturePath ( const nirt::io::path path)
pure virtual

Set a custom texture path.

This is the first path the texture-loader should search.


The documentation for this class was generated from the following file:

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print