Polygon Crucher SDK - Documentation
Documentation
|
This class allows to perform batch optimization, which means process a set of files. More...
This class allows to perform batch optimization, which means process a set of files.
BatchCruncherOptions is construct using a CCustomData filled with the BatchCruncherOptions::Parameters properly initialized. Some methods allows to define the batch folder or the file to be process during optimization.
The options are then provided to CBatchOptimizer object and a call to CBatchOptimizer::Batch starts the batch.
#include <PolygonCruncherInterface.h>
Public Types | |
enum | Parameters { CRUNCHER_SRCMODE_PARAM = MAKE_CUSTOM_ID('S', 'R', 'M', 'D') , CRUNCHER_SRCFILES_PARAM = MAKE_CUSTOM_ID('S', 'R', 'F', 'I') , CRUNCHER_SRCDIR_PARAM = MAKE_CUSTOM_ID('S', 'R', 'D', 'I') , CRUNCHER_SRCSUBDIR_PARAM = MAKE_CUSTOM_ID('S', 'R', 'S', 'D') , CRUNCHER_SRCKINDOF_PARAM = MAKE_CUSTOM_ID('K', 'I', 'N', 'D') , CRUNCHER_SRCEXT_PARAM = MAKE_CUSTOM_ID('E', 'X', 'T', 'E') , CRUNCHER_OPTIMIZE_PREDEFINED_LEVEL_NBR = 5 , CRUNCHER_OPTIMIZE_LEVEL1 = MAKE_CUSTOM_ID('L', 'E', 'V', '1') , CRUNCHER_OPTIMIZE_LEVEL2 = MAKE_CUSTOM_ID('L', 'E', 'V', '2') , CRUNCHER_OPTIMIZE_LEVEL3 = MAKE_CUSTOM_ID('L', 'E', 'V', '3') , CRUNCHER_OPTIMIZE_LEVEL4 = MAKE_CUSTOM_ID('L', 'E', 'V', '4') , CRUNCHER_OPTIMIZE_LEVEL5 = MAKE_CUSTOM_ID('L', 'E', 'V', '5') , CRUNCHER_OPTIMIZE_LEVEL_NBR = MAKE_CUSTOM_ID('L', 'E', 'V', 'N') , CRUNCHER_OPTIMIZE_START_LEVEL = MAKE_CUSTOM_ID('L', 'E', 'V', 'S') , CRUNCHER_OPTIMIZE_LEVEL_MODE = MAKE_CUSTOM_ID('L', 'E', 'V', 'M') , CRUNCHER_OPTIMIZE_MAGICCRUNCHER_SIMILARITY = MAKE_CUSTOM_ID('M', 'C', 'S', 'M') , CRUNCHER_OPTIMIZE_MAGICCRUNCHER_FAST = MAKE_CUSTOM_ID('M', 'C', 'F', 'S') , CRUNCHER_OPTIMIZE_MODE = MAKE_CUSTOM_ID('M', 'O', 'D', 'E') , CRUNCHER_OPTIMIZE_PROGRESSIVE_RATIO = MAKE_CUSTOM_ID('P', 'G', 'R', 'T') , CRUNCHER_OPTIMIZE_CORNER_MODE = MAKE_CUSTOM_ID('C', 'R', 'M', 'D') , CRUNCHER_OPTIMIZE_HIDDEN_NODE = MAKE_CUSTOM_ID('H', 'D', 'N', 'D') , CRUNCHER_OPTIMIZE_MERGE_POINTS = MAKE_CUSTOM_ID('M', 'R', 'G', 'P') , CRUNCHER_OPTIMIZE_MERGE_POINTS_THRESHOLD = MAKE_CUSTOM_ID('M', 'R', 'P', 'T') , CRUNCHER_OPTIMIZE_MERGE_FACES = MAKE_CUSTOM_ID('M', 'R', 'G', 'F') , CRUNCHER_OPTIMIZE_MERGE_FACES_THRESHOLD = MAKE_CUSTOM_ID('M', 'R', 'F', 'T') , CRUNCHER_OPTIMIZE_MATERIAL_FRONTIER = MAKE_CUSTOM_ID('K', 'P', 'M', 'A') , CRUNCHER_OPTIMIZE_MATERIAL_FRONTIER_MODE = MAKE_CUSTOM_ID('M', 'A', 'M', 'D') , CRUNCHER_OPTIMIZE_FAVORITE_COMPACITY = MAKE_CUSTOM_ID('C', 'O', 'M', 'P') , CRUNCHER_OPTIMIZE_LIMIT_RATIO = MAKE_CUSTOM_ID('L', 'M', 'R', 'T') , CRUNCHER_OPTIMIZE_LOCK_POINT = MAKE_CUSTOM_ID('L', 'K', 'P', 'T') , CRUNCHER_OPTIMIZE_PREVENT_FLIP = MAKE_CUSTOM_ID('F', 'L', 'I', 'P') , CRUNCHER_OPTIMIZE_KEEP_VC = MAKE_CUSTOM_ID('K', 'P', 'V', 'C') , CRUNCHER_OPTIMIZE_VC_MODE = MAKE_CUSTOM_ID('V', 'C', 'M', 'D') , CRUNCHER_OPTIMIZE_TOLERANCE_VC = MAKE_CUSTOM_ID('T', 'L', 'V', 'C') , CRUNCHER_OPTIMIZE_KEEP_UV = MAKE_CUSTOM_ID('K', 'P', 'U', 'V') , CRUNCHER_OPTIMIZE_UV_MODE = MAKE_CUSTOM_ID('U', 'V', 'M', 'D') , CRUNCHER_OPTIMIZE_TOLERANCE_UV = MAKE_CUSTOM_ID('T', 'L', 'U', 'V') , CRUNCHER_OPTIMIZE_KEEP_NORMALS = MAKE_CUSTOM_ID('K', 'P', 'N', 'R') , CRUNCHER_OPTIMIZE_NORMAL_MODE = MAKE_CUSTOM_ID('N', 'R', 'M', 'D') , CRUNCHER_OPTIMIZE_NORMAL_THRESHOLD = MAKE_CUSTOM_ID('N', 'R', 'T', 'H') , CRUNCHER_OPTIMIZE_SYMETRY_MODE = MAKE_CUSTOM_ID('S', 'Y', 'M', 'E') , CRUNCHER_OPTIMIZE_SYMETRY_TOLERANCE = MAKE_CUSTOM_ID('S', 'Y', 'T', 'L') , CRUNCHER_OPTIMIZE_CONVERT_ONLY = MAKE_CUSTOM_ID('C', 'V', 'O', 'L') , CRUNCHER_DSTNAME_MODE = MAKE_CUSTOM_ID('N', 'A', 'M', 'E') , CRUNCHER_DSTPREFIX_PARAM = MAKE_CUSTOM_ID('D', 'S', 'P', 'X') , CRUNCHER_DSTSUFFIX_PARAM = MAKE_CUSTOM_ID('D', 'S', 'S', 'X') , CRUNCHER_DSTMODE_PARAM = MAKE_CUSTOM_ID('D', 'S', 'M', 'D') , CRUNCHER_DSTSUBDIR_PARAM = MAKE_CUSTOM_ID('D', 'S', 'S', 'D') , CRUNCHER_DSTNEWDIR_PARAM = MAKE_CUSTOM_ID('D', 'S', 'N', 'D') , CRUNCHER_DSTRECREATEDIR_PARAM = MAKE_CUSTOM_ID('D', 'S', 'R', 'D') , CRUNCHER_DSTRENAME_PARAM = MAKE_CUSTOM_ID('D', 'S', 'R', 'E') , CRUNCHER_DSTUPDATE_MODE = MAKE_CUSTOM_ID('U', 'P', 'D', 'M') , CRUNCHER_DSTLOG_NAME = MAKE_CUSTOM_ID('D', 'S', 'L', 'G') , CRUNCHER_DSTLOG_AUTORENAME = MAKE_CUSTOM_ID('L', 'G', 'R', 'N') , CRUNCHER_ALBUMFILES_PARAM = MAKE_CUSTOM_ID('A', 'L', 'F', 'I') , CRUNCHER_SELDIR_PARAM = MAKE_CUSTOM_ID('S', 'E', 'D', 'I') } |
enum | DefaultValues { DEFAULT_NORMAL_ANGLE = 10 , DEFAULT_VC_TOLERANCE = 128 , DEFAULT_UV_TOLERANCE = 0 , DEFAULT_SYMETRY_TOLERANCE = 1 , DEFAULT_MERGEPOINTS_TOLERANCE = 0 , DEFAULT_MERGEFACES_TOLERANCE = 0 } |
enum | BatchCruncherOptionsFlags { BATCH_CRUNCHER_DEFAULT = 0x00 , BATCH_HANDLE_SCENE_DELETION = 0x01 , BATCH_NO_SPLASH = 0x02 , BATCH_NO_LOGWINDOW = 0x04 , BATCH_NO_DIALOG = 0x08 , BATCH_LOG_AUTOCLOSE = 0x10 , BATCH_NO_CANCEL_BY_ESCAPTE = 0x100 , BATCH_NO_MODE_CHOICE = 0x100 , BATCH_NO_CURRENT_DIRECTORY_CHOICE = 0x200 , BATCH_ENABLE_FILE_SELECTION = 0x400 , BATCH_ALBUM_MODE = 0x800 } |
enum | BatchEnum { CRUNCHER_BATCH_PREFS1 = MAKE_CUSTOM_ID('C', 'R', 'N', 'C') , CRUNCHER_BATCH_PREFS2 = MAKE_CUSTOM_ID('B', 'A', 'T', 'C') } |
typedef enum BatchCruncherOptions::Parameters | Parameters |
typedef enum BatchCruncherOptions::DefaultValues | DefaultValues |
typedef enum BatchCruncherOptions::BatchCruncherOptionsFlags | BatchCruncherOptionsFlags |
These options give control on the way the batch module is used | |
These options give control on the Polygon Cruncher batch dialog |
Public Member Functions | |
BatchCruncherOptions (CCustomData &batchSettingsData, unsigned int flags=BATCH_CRUNCHER_DEFAULT) | |
bool | InitFromCommandLine (int argc, char *argv[]) |
void | SetCurrentFolder (const CXString &folder) |
CXString | GetCurrentFolder () const |
void | SetFileToOptimize (const CXString &file) |
void | SetFilesToOptimize (const CXStringArray &files, bool albumSet=false) |
void | SetPreferencesFilePath (const CXString &preffile) |
CXString | GetPreferencesFilePath () const |
void | PrefsLoadBatchOptions () |
void | PrefsSaveBatchOptions () const |
const CCustomData & | GetSettingsData () const |
unsigned int | GetFlags () |
Specific options for the batch optimization
A set of default values for some parameters of the optimization
The following information fill a CCustomData in order to call the batch module remotely. The CCustomData is provided through BatchCruncherOptions::data and provided through DoBatchOptimization