Saga3D API Documentation  1.0-RC4
saga::scene::IMeshLoader Class Referenceabstract

Class which is able to load a static/animated mesh from a file. More...

#include <IMeshLoader.h>

Public Member Functions

 IMeshLoader ()
 Constructor. More...
 
virtual ~IMeshLoader ()
 Destructor. More...
 
virtual bool isSupportedExtension (const std::string &filename) const =0
 Returns true if the file might be loaded by this class. More...
 
virtual std::shared_ptr< IMeshcreateMesh (void *data, const std::size_t size, const std::string &extension)=0
 Loads a mesh from the file. More...
 

Detailed Description

Class which is able to load a static/animated mesh from a file.

If you want Irrlicht be able to load meshes of currently unsupported file formats (e.g. .cob), then implement this and add your new Meshloader with ISceneManager::addExternalMeshLoader() to the engine.

Definition at line 18 of file IMeshLoader.h.

Constructor & Destructor Documentation

◆ IMeshLoader()

saga::scene::IMeshLoader::IMeshLoader ( )
inline

Constructor.

Definition at line 22 of file IMeshLoader.h.

◆ ~IMeshLoader()

virtual saga::scene::IMeshLoader::~IMeshLoader ( )
inlinevirtual

Destructor.

Definition at line 25 of file IMeshLoader.h.

Member Function Documentation

◆ createMesh()

virtual std::shared_ptr<IMesh> saga::scene::IMeshLoader::createMesh ( void *  data,
const std::size_t  size,
const std::string &  extension 
)
pure virtual

Loads a mesh from the file.

Parameters
dataPointer to mesh file in memory to read.
sizeSize of mesh file.
Returns
Pointer to the created mesh. Returns nullptr if loading failed.

◆ isSupportedExtension()

virtual bool saga::scene::IMeshLoader::isSupportedExtension ( const std::string &  filename) const
pure virtual

Returns true if the file might be loaded by this class.

This decision should be based on the file extension (e.g. ".cob") only.

Parameters
filenameName of the file to test.
Returns
True if the file might be loaded by this class.

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