History

Added support for "destructive" vs "non-destructive" voxel create - changed VoxelTree to support destructive and non-destructive mode - added protocol packet headers to differentiate - added new UI to switch modes - default mode now, non-destructive.

ZappoMan committed 13 years ago

Commit 8dc61d81 parent a0179078 files · +79 −52Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+8−6
@@ -1020,22 +1020,24 @@ VoxelNode* VoxelSystem::getVoxelAt(float x, float y, float z, float s) const { · 1019 unmodified lines
10201020 return _tree->getVoxelAt(x, y, z, s);
10211021 };
10221022
1023−void VoxelSystem::createVoxel(float x, float y, float z, float s, unsigned char red, unsigned char green, unsigned char blue) {
1023+void VoxelSystem::createVoxel(float x, float y, float z, float s,
1024+ unsigned char red, unsigned char green, unsigned char blue, bool destructive) {
10241025 pthread_mutex_lock(&_treeLock);
10251026
10261027 //printLog("VoxelSystem::createVoxel(%f,%f,%f,%f)\n",x,y,z,s);
1027− _tree->createVoxel(x, y, z, s, red, green, blue);
1028+ _tree->createVoxel(x, y, z, s, red, green, blue, destructive);
10281029 setupNewVoxelsForDrawing();
10291030
10301031 pthread_mutex_unlock(&_treeLock);
10311032 };
10321033
1033−void VoxelSystem::createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color) {
1034− _tree->createLine(point1, point2, unitSize, color);
1034+void VoxelSystem::createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color, bool destructive) {
1035+ _tree->createLine(point1, point2, unitSize, color, destructive);
10351036 setupNewVoxelsForDrawing();
10361037 };
10371038
1038−void VoxelSystem::createSphere(float r,float xc, float yc, float zc, float s, bool solid, creationMode mode, bool debug) {
1039− _tree->createSphere(r, xc, yc, zc, s, solid, mode, debug);
1039+void VoxelSystem::createSphere(float r,float xc, float yc, float zc, float s, bool solid,
1040+ creationMode mode, bool destructive, bool debug) {
1041+ _tree->createSphere(r, xc, yc, zc, s, solid, mode, destructive, debug);
10401042 setupNewVoxelsForDrawing();
10411043 };

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