more VoxelSystem vs VoxelTree cleanup

This commit is contained in:
ZappoMan 2014-03-02 16:51:40 -08:00
parent 63bebc9afc
commit 176270f639
4 changed files with 3 additions and 39 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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; }

View file

@ -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(); }