mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +02:00
more VoxelSystem vs VoxelTree cleanup
This commit is contained in:
parent
63bebc9afc
commit
176270f639
4 changed files with 3 additions and 39 deletions
|
@ -143,11 +143,11 @@ void ImportTask::run() {
|
|||
|
||||
// Then we call the righ method for the job
|
||||
if (_filename.endsWith(".png", Qt::CaseInsensitive)) {
|
||||
voxelSystem->readFromSquareARGB32Pixels(_filename.toLocal8Bit().data());
|
||||
voxelSystem->getTree()->readFromSquareARGB32Pixels(_filename.toLocal8Bit().data());
|
||||
} else if (_filename.endsWith(".svo", Qt::CaseInsensitive)) {
|
||||
voxelSystem->readFromSVOFile(_filename.toLocal8Bit().data());
|
||||
voxelSystem->getTree()->readFromSVOFile(_filename.toLocal8Bit().data());
|
||||
} else if (_filename.endsWith(".schematic", Qt::CaseInsensitive)) {
|
||||
voxelSystem->readFromSchematicFile(_filename.toLocal8Bit().data());
|
||||
voxelSystem->getTree()->readFromSchematicFile(_filename.toLocal8Bit().data());
|
||||
} else {
|
||||
// We should never get here.
|
||||
qDebug() << "[ERROR] Invalid file extension." << endl;
|
||||
|
|
|
@ -524,34 +524,6 @@ void VoxelSystem::initVoxelMemory() {
|
|||
_readArraysLock.unlock();
|
||||
}
|
||||
|
||||
void VoxelSystem::writeToSVOFile(const char* filename, VoxelTreeElement* element) const {
|
||||
_tree->writeToSVOFile(filename, element);
|
||||
}
|
||||
|
||||
bool VoxelSystem::readFromSVOFile(const char* filename) {
|
||||
bool result = _tree->readFromSVOFile(filename);
|
||||
if (result) {
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool VoxelSystem::readFromSquareARGB32Pixels(const char *filename) {
|
||||
bool result = _tree->readFromSquareARGB32Pixels(filename);
|
||||
if (result) {
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool VoxelSystem::readFromSchematicFile(const char* filename) {
|
||||
bool result = _tree->readFromSchematicFile(filename);
|
||||
if (result) {
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
int VoxelSystem::parseData(const QByteArray& packet) {
|
||||
bool showTimingDetails = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||
PerformanceWarning warn(showTimingDetails, "VoxelSystem::parseData()",showTimingDetails);
|
||||
|
|
|
@ -67,11 +67,6 @@ public:
|
|||
|
||||
ViewFrustum* getLastCulledViewFrustum() { return &_lastCulledViewFrustum; }
|
||||
|
||||
void writeToSVOFile(const char* filename, VoxelTreeElement* element) const;
|
||||
bool readFromSVOFile(const char* filename);
|
||||
bool readFromSquareARGB32Pixels(const char* filename);
|
||||
bool readFromSchematicFile(const char* filename);
|
||||
|
||||
void setMaxVoxels(int maxVoxels);
|
||||
long int getMaxVoxels() const { return _maxVoxels; }
|
||||
unsigned long getVoxelMemoryUsageRAM() const { return _memoryUsageRAM; }
|
||||
|
|
|
@ -235,9 +235,6 @@ public:
|
|||
// these will read/write files that match the wireformat, excluding the 'V' leading
|
||||
void writeToSVOFile(const char* filename, OctreeElement* node = NULL);
|
||||
bool readFromSVOFile(const char* filename);
|
||||
// reads voxels from square image with alpha as a Y-axis
|
||||
bool readFromSquareARGB32Pixels(const char *filename);
|
||||
bool readFromSchematicFile(const char* filename);
|
||||
|
||||
// Octree does not currently handle its own locking, caller must use these to lock/unlock
|
||||
void lockForRead() { lock.lockForRead(); }
|
||||
|
|
Loading…
Reference in a new issue