ErrorCode Tree::parse_common_options(FileOptions &options) { double tmp_dbl; int tmp_int; // MAX_PER_LEAF: max entities per leaf; default = 6 ErrorCode rval = options.get_int_option("MAX_PER_LEAF", tmp_int); if (MB_SUCCESS == rval) maxPerLeaf = std::max(tmp_int, 1); // MAX_DEPTH: max depth of the tree; default = 30 rval = options.get_int_option("MAX_DEPTH", tmp_int); if (MB_SUCCESS == rval) maxDepth = tmp_int; if (maxDepth < 1) maxDepth = std::numeric_limits<unsigned>::max(); // MIN_WIDTH: minimum width of box, used like a tolerance; default = 1.0e-10 rval = options.get_real_option("MIN_WIDTH", tmp_dbl); if (MB_SUCCESS == rval) minWidth = tmp_dbl; // MESHSET_FLAGS: flags passed into meshset creation for tree nodes; should be a value from // ENTITY_SET_PROPERTY (see Types.hpp); default = MESHSET_SET rval = options.get_int_option("MESHSET_FLAGS", tmp_int); if (MB_SUCCESS == rval && 0 <= tmp_int) meshsetFlags = (unsigned) tmp_int; else if (0 > tmp_int) return MB_FAILURE; // CLEAN_UP: if false, do not delete tree sets upon tree class destruction; default = true bool tmp_bool; rval = options.get_toggle_option("CLEAN_UP", true, tmp_bool); if (MB_SUCCESS == rval && !tmp_bool) cleanUp = false; // TAG_NAME: tag name to store tree information on tree nodes; default = "AKDTree" std::string tmp_str; rval = options.get_str_option("TAG_NAME", tmp_str); if (MB_SUCCESS == rval) boxTagName = tmp_str; return MB_SUCCESS; }