History

create and delete voxels locally

ZappoMan committed 13 years ago

Commit bd3ea6e1 parent b4ceac73 files · +40 −0Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+27−0
@@ -898,3 +898,30 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 897 unmodified lines
898 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);898 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);
899 899
900}900}
901
902
903void VoxelSystem::deleteVoxelAt(float x, float y, float z, float s) {
904 printLog("VoxelSystem::deleteVoxelAt(%f,%f,%f,%f)\n",x,y,z,s);
905 _tree->deleteVoxelAt(x, y, z, s);
906 setupNewVoxelsForDrawing();
907};
908
909VoxelNode* VoxelSystem::getVoxelAt(float x, float y, float z, float s) const {
910 return _tree->getVoxelAt(x, y, z, s);
911};
912
913void VoxelSystem::createVoxel(float x, float y, float z, float s, unsigned char red, unsigned char green, unsigned char blue) {
914 //printLog("VoxelSystem::createVoxel(%f,%f,%f,%f)\n",x,y,z,s);
915 _tree->createVoxel(x, y, z, s, red, green, blue);
916 setupNewVoxelsForDrawing();
917};
918
919void VoxelSystem::createLine(glm::vec3 point1, glm::vec3 point2, float unitSize, rgbColor color) {
920 _tree->createLine(point1, point2, unitSize, color);
921 setupNewVoxelsForDrawing();
922};
923
924void VoxelSystem::createSphere(float r,float xc, float yc, float zc, float s, bool solid, creationMode mode, bool debug) {
925 _tree->createSphere(r, xc, yc, zc, s, solid, mode, debug);
926 setupNewVoxelsForDrawing();
927};