mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:28:02 +02:00
CR feedback
This commit is contained in:
parent
fb4424e975
commit
166ad4f73d
2 changed files with 3 additions and 8 deletions
|
@ -354,17 +354,12 @@ void VoxelTree::readCodeColorBufferToTree(unsigned char *codeColorBuffer, bool d
|
|||
void VoxelTree::processRemoveVoxelBitstream(unsigned char * bitstream, int bufferSizeBytes) {
|
||||
// XXXBHG: validate buffer is at least 4 bytes long? other guards??
|
||||
unsigned short int itemNumber = (*((unsigned short int*)&bitstream[1]));
|
||||
printLog("processRemoveVoxelBitstream() receivedBytes=%d itemNumber=%d\n",bufferSizeBytes,itemNumber);
|
||||
int atByte = 3;
|
||||
unsigned char* pVoxelData = (unsigned char*)&bitstream[3];
|
||||
while (atByte < bufferSizeBytes) {
|
||||
unsigned char octets = (unsigned char)*pVoxelData;
|
||||
int voxelDataSize = bytesRequiredForCodeLength(octets)+3; // 3 for color!
|
||||
|
||||
float* vertices = firstVertexForCode(pVoxelData);
|
||||
printLog("deleting voxel at: %f,%f,%f\n",vertices[0],vertices[1],vertices[2]);
|
||||
delete []vertices;
|
||||
|
||||
deleteVoxelCodeFromTree(pVoxelData);
|
||||
|
||||
pVoxelData+=voxelDataSize;
|
||||
|
|
Loading…
Reference in a new issue