![]() |
Polygon Crucher SDK - Documentation
Documentation
|
CBatchOptimizer allows to perform batch optimization providing BatchCruncherOptions settings and calling CBatchOptimizer::Batch. More...
CBatchOptimizer allows to perform batch optimization providing BatchCruncherOptions settings and calling CBatchOptimizer::Batch.
It is possible to provide different kind of callback for handling an user progress bar or provide a customized load / save 3d file mechanism.
#include <PolygonCruncherInterface.h>
Public Types | |
enum | BatchState { BATCH_INACTIVE = 0 , BATCH_INIT_BEFORE_BATCH , BATCH_BEFORE_OPEN_LOG_FILE , BATCH_AFTER_OPEN_LOG_FILE , BATCH_START_BATCH , BATCH_PRELOAD_FILE , BATCH_POSTLOAD_FILE , BATCH_PREPROCESS , BATCH_POSTPROCESS , BATCH_PREOPTIMIZE , BATCH_POSTOPTIMIZE , BATCH_PREMAGICCRUNCHER , BATCH_POSTMAGICCRUNCHER , BATCH_PRESAVE_SCENE , BATCH_POSTSAVE_SCENE , BATCH_FREE_SCENE , BATCH_END_BATCH } |
typedef enum CBatchOptimizer::BatchState | BatchState |
Public Member Functions | |
CBatchOptimizer (const BatchCruncherOptions &settings, xWndHandle parentWindow=NULL) | |
Initialize an optimization batch providing specific settings through BatchCruncherOptions. | |
const CCustomData & | GetSettingsData () const |
void | SetSettingsData (const CCustomData &settingsData) |
unsigned int | GetFlags () const |
Return BatchCruncherOptionsFlags flags. | |
xWndHandle | GetParentWindow () const |
optional parent window for overidden classes | |
CStdioFileEx * | GetLogFile () const |
return the log file | |
Batch callbacks | |
Can be used by dialog to get folder from settings. If initFromSettings set, the batchinfo is initialized from BatchCruncherOptions | |
void | SetCallbackData (void *data) |
Sets an opaque pointer which is provided in the different callbacks. | |
void | SetProgressCallback (CruncherProgressCallback callback) |
Provides a progress callback to provide feedback to user. | |
void | SetLoadCallback (LoadCruncherBatchCallback callback) |
Provides a callback for loading files which can be used instead of the default callback. | |
void | SetSaveCallback (SaveCruncherBatchCallback callback) |
Provides a callback for saving files which can be used instead of the default callback. The callback is repeatedly called for the same loaded scene, depending on the requested optimization ratio for the batch operation. | |
CXString | GetCurrentOptimizedFilePath () const |
Returns the currently processed file. | |
BatchState | GetBatchState () const |
Returns the current batch state. | |
virtual bool | CheckCancel () |
Override to handle cancel on the process. Returning true will cancel the operation cancel. | |
virtual void | OnBatchStateChanged (BatchState state, void *info) |
virtual void | Log (const CXString &loginfo, bool replacePrevLine=false) |
Override this method to catch some different step in the batch. | |
virtual bool | Batch () |
Start the batch using the provided BatchCruncherOptions settings. | |
The batch running state which is provided to CBatchOptimizer::OnBatchStateChanged
|
virtual |
Override this method to catch some different step in the batch.
Override this method to catch different log information