Assimp  v4.1. (December 2018)
Assimp::BatchLoader Class Reference

FOR IMPORTER PLUGINS ONLY: A helper class to the pleasure of importers that need to load many external meshes recursively. More...

Public Member Functions

unsigned int AddLoadRequest (const std::string &file, unsigned int steps=0, const PropertyMap *map=NULL)
 Add a new file to the list of files to be loaded. More...
 
 BatchLoader (IOSystem *pIO, bool validate=false)
 Construct a batch loader from a given IO system to be used to access external files. More...
 
aiSceneGetImport (unsigned int which)
 Get an imported scene. More...
 
bool getValidation () const
 Returns the current validation step. More...
 
void LoadAll ()
 Waits until all scenes have been loaded. More...
 
void setValidation (bool enabled)
 Sets the validation step. More...
 
 ~BatchLoader ()
 The class destructor. More...
 

Detailed Description

FOR IMPORTER PLUGINS ONLY: A helper class to the pleasure of importers that need to load many external meshes recursively.

The class uses several threads to load these meshes (or at least it could, this has not yet been implemented at the moment).

Note
The class may not be used by more than one thread

Constructor & Destructor Documentation

◆ BatchLoader()

BatchLoader::BatchLoader ( IOSystem pIO,
bool  validate = false 
)
explicit

Construct a batch loader from a given IO system to be used to access external files.

◆ ~BatchLoader()

BatchLoader::~BatchLoader ( )

The class destructor.

Member Function Documentation

◆ AddLoadRequest()

unsigned int BatchLoader::AddLoadRequest ( const std::string &  file,
unsigned int  steps = 0,
const PropertyMap map = NULL 
)

Add a new file to the list of files to be loaded.

Parameters
fileFile to be loaded
stepsPost-processing steps to be executed on the file
mapOptional configuration properties
Returns
'Load request channel' - an unique ID that can later be used to access the imported file data.
See also
GetImport

◆ GetImport()

aiScene * BatchLoader::GetImport ( unsigned int  which)

Get an imported scene.

This polls the import from the internal request list. If an import is requested several times, this function can be called several times, too.

Parameters
whichLRWC returned by AddLoadRequest().
Returns
NULL if there is no scene with this file name in the queue of the scene hasn't been loaded yet.

◆ getValidation()

bool BatchLoader::getValidation ( ) const

Returns the current validation step.

Returns
The current validation step.

◆ LoadAll()

void BatchLoader::LoadAll ( )

Waits until all scenes have been loaded.

This returns immediately if no scenes are queued.

◆ setValidation()

void BatchLoader::setValidation ( bool  enabled)

Sets the validation step.

True for enable validation during postprocess.

Parameters
enableTrue for validation.

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