mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
added decodeOctCode to voxel-edit
This commit is contained in:
parent
e32bfc38f5
commit
f230eeadab
1 changed files with 23 additions and 0 deletions
|
@ -272,7 +272,30 @@ int main(int argc, const char * argv[])
|
|||
} else {
|
||||
qDebug() << "Unexpected number of parameters for getOctCode\n";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* DECODE_OCTCODE = "--decodeOctCode";
|
||||
const char* decodeParam = getCmdOption(argc, argv, DECODE_OCTCODE);
|
||||
if (decodeParam) {
|
||||
|
||||
QString decodeParamsString(decodeParam);
|
||||
unsigned char* octalCodeToDecode = hexStringToOctalCode(decodeParamsString);
|
||||
|
||||
VoxelPositionSize details;
|
||||
voxelDetailsForCode(octalCodeToDecode, details);
|
||||
|
||||
delete[] octalCodeToDecode;
|
||||
|
||||
qDebug() << "octal code to decode: " << decodeParamsString << "\n";
|
||||
qDebug() << "Details for Octal Code:\n";
|
||||
qDebug() << " x:" << details.x << "[" << details.x * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " y:" << details.y << "[" << details.y * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " z:" << details.z << "[" << details.z * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " s:" << details.s << "[" << details.s * TREE_SCALE << "]" << "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Handles taking and SVO and splitting it into multiple SVOs based on
|
||||
// jurisdiction details
|
||||
|
|
Loading…
Reference in a new issue