History

first cut at export and import of voxels

ZappoMan committed 13 years ago

Commit d1d2e751 parent 7aebbe37 files · +68 −8Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 7 files). Show all

Unified · Split

interface/src/VoxelSystem.cpp+12−0
@@ -70,6 +70,18 @@ void VoxelSystem::loadVoxelsFile(const char* fileName, bool wantColorRandomizer) · 69 unmodified lines
7070 setupNewVoxelsForDrawing();
7171 }
7272
73+void VoxelSystem::writeToFileV2(const char* filename, VoxelNode* node) const {
74+ _tree->writeToFileV2(filename, node);
75+}
76+
77+bool VoxelSystem::readFromFileV2(const char* filename, VoxelNode* node) {
78+ bool result = _tree->readFromFileV2(filename, node);
79+ if (result) {
80+ setupNewVoxelsForDrawing();
81+ }
82+ return result;
83+}
84+
7385 long int VoxelSystem::getVoxelsCreated() {
7486 return _tree->voxelsCreated;
7587 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t