ModelImportManager Class Reference


Detailed Description

This class stores and manages model import records.

Each record corresponds to an apf file that needs to be loaded. When are new record is added to the manager, it first goes onto an 'offline' queue and waits on that queue until it can be requested to load.

#include <ModelImportManager.h>

Inheritance diagram for ModelImportManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool  addModelImport (ModelImportRef modelImport)
  Creates a new model import info record, adds it to the map and returns its unique id.
bool  removeModelImport (const awSupport::Id &id)
void  closeFile (awString::IString id)
ModelImportRef  getModelImport (const awString::IString &id) const
ModelImportRef  getModelImportById (const awString::IString &id) const
ModelImportRef  getModelImportByIndex (int) const
awSupport::Id  generateUniqueImportId (const awSupport::Id &fromThisId)
bool  needsPrune () const
void  prune ()
bool  isResetted ()
void  reset (bool releaseAll=false)
int  modelImportCount () const
bool  loadModelsPending () const
  Returns true if there are any new models to load.
bool  loadModels (ModelLoadProgressRef modelProgress=NULL)
  Requests load of the models.
void  requestLoad (ModelImportRef modelImport)
  Request the load for an existing model import.
bool  mergeModelsPending () const
  Returns true if there are any models that have been loaded and need to be merged with the scene.
int  mergeModels (double timeBudget)
  Merges models that have been loaded with the scnee.
void  setSynchronousOnly (bool state)
void  addReservedId (const awSupport::Id &id)
const ModelImportMap modelImportMap () const
bool  setWorkingDirectory (const awString::IString &directory)
const awString::IString &  getWorkingDirectory () const
void  setObjectLoader (ObjectApfDataLoaderRef objectLoader)
ObjectApfDataLoaderRef  getObjectLoader ()

Static Public Member Functions

static ModelImportManager instance ()
  Singleton access with lazy creation and explicit destruction.
static void  destruct ()

Protected Member Functions

  ModelImportManager ()
virtual  ~ModelImportManager ()

Constructor & Destructor Documentation

ModelImportManager ( ) [protected]
virtual ~ModelImportManager ( ) [protected, virtual]

Member Function Documentation

static ModelImportManager& instance ( ) [static]

Singleton access with lazy creation and explicit destruction.

exists() just tells us if the instance() is already created.

static void destruct ( ) [static]
bool addModelImport ( ModelImportRef  modelImport )

Creates a new model import info record, adds it to the map and returns its unique id.

bool removeModelImport ( const awSupport::Id id )
void closeFile ( awString::IString  id )
ModelImportRef getModelImport ( const awString::IString &  id ) const
ModelImportRef getModelImportById ( const awString::IString &  id ) const
ModelImportRef getModelImportByIndex ( int  ) const
awSupport::Id generateUniqueImportId ( const awSupport::Id fromThisId )
bool needsPrune ( ) const
bool isResetted ( )
void reset ( bool  releaseAll = false )
int modelImportCount ( ) const
bool loadModelsPending ( ) const

Returns true if there are any new models to load.

bool loadModels ( ModelLoadProgressRef  modelProgress = NULL )

Requests load of the models.

Returns true if there are any models to monitor their progress.

void requestLoad ( ModelImportRef  modelImport )

Request the load for an existing model import.

bool mergeModelsPending ( ) const

Returns true if there are any models that have been loaded and need to be merged with the scene.

int mergeModels ( double  timeBudget )

Merges models that have been loaded with the scnee.

void setSynchronousOnly ( bool  state )
void addReservedId ( const awSupport::Id id )
const ModelImportMap& modelImportMap ( ) const
bool setWorkingDirectory ( const awString::IString &  directory )
const awString::IString& getWorkingDirectory ( ) const
void setObjectLoader ( ObjectApfDataLoaderRef  objectLoader )

ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager
ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager ModelImportManager