mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:33:27 +02:00
remove unused octree method
This commit is contained in:
parent
846506901a
commit
271575c832
2 changed files with 0 additions and 33 deletions
|
@ -591,38 +591,6 @@ void Octree::eraseAllOctreeElements(bool createNewRoot) {
|
||||||
_isDirty = true;
|
_isDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Octree::processRemoveOctreeElementsBitstream(const unsigned char* bitstream, int bufferSizeBytes) {
|
|
||||||
//unsigned short int itemNumber = (*((unsigned short int*)&bitstream[sizeof(PACKET_HEADER)]));
|
|
||||||
|
|
||||||
int numBytesPacketHeader = numBytesForPacketHeader(reinterpret_cast<const char*>(bitstream));
|
|
||||||
unsigned short int sequence = (*((unsigned short int*)(bitstream + numBytesPacketHeader)));
|
|
||||||
quint64 sentAt = (*((quint64*)(bitstream + numBytesPacketHeader + sizeof(sequence))));
|
|
||||||
|
|
||||||
int atByte = numBytesPacketHeader + sizeof(sequence) + sizeof(sentAt);
|
|
||||||
|
|
||||||
unsigned char* voxelCode = (unsigned char*)&bitstream[atByte];
|
|
||||||
while (atByte < bufferSizeBytes) {
|
|
||||||
int maxSize = bufferSizeBytes - atByte;
|
|
||||||
int codeLength = numberOfThreeBitSectionsInCode(voxelCode, maxSize);
|
|
||||||
|
|
||||||
if (codeLength == OVERFLOWED_OCTCODE_BUFFER) {
|
|
||||||
qCDebug(octree, "WARNING! Got remove voxel bitstream that would overflow buffer in numberOfThreeBitSectionsInCode(),"
|
|
||||||
" bailing processing of packet!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int voxelDataSize = bytesRequiredForCodeLength(codeLength) + SIZE_OF_COLOR_DATA;
|
|
||||||
|
|
||||||
if (atByte + voxelDataSize <= bufferSizeBytes) {
|
|
||||||
deleteOctalCodeFromTree(voxelCode, COLLAPSE_EMPTY_TREE);
|
|
||||||
voxelCode += voxelDataSize;
|
|
||||||
atByte += voxelDataSize;
|
|
||||||
} else {
|
|
||||||
qCDebug(octree, "WARNING! Got remove voxel bitstream that would overflow buffer, bailing processing!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: this is an expensive call. Don't call it unless you really need to reaverage the entire tree (from startElement)
|
// Note: this is an expensive call. Don't call it unless you really need to reaverage the entire tree (from startElement)
|
||||||
void Octree::reaverageOctreeElements(OctreeElement* startElement) {
|
void Octree::reaverageOctreeElements(OctreeElement* startElement) {
|
||||||
if (!startElement) {
|
if (!startElement) {
|
||||||
|
|
|
@ -254,7 +254,6 @@ public:
|
||||||
|
|
||||||
virtual void eraseAllOctreeElements(bool createNewRoot = true);
|
virtual void eraseAllOctreeElements(bool createNewRoot = true);
|
||||||
|
|
||||||
void processRemoveOctreeElementsBitstream(const unsigned char* bitstream, int bufferSizeBytes);
|
|
||||||
void readBitstreamToTree(const unsigned char* bitstream, unsigned long int bufferSizeBytes, ReadBitstreamToTreeParams& args);
|
void readBitstreamToTree(const unsigned char* bitstream, unsigned long int bufferSizeBytes, ReadBitstreamToTreeParams& args);
|
||||||
void deleteOctalCodeFromTree(const unsigned char* codeBuffer, bool collapseEmptyTrees = DONT_COLLAPSE);
|
void deleteOctalCodeFromTree(const unsigned char* codeBuffer, bool collapseEmptyTrees = DONT_COLLAPSE);
|
||||||
void reaverageOctreeElements(OctreeElement* startElement = NULL);
|
void reaverageOctreeElements(OctreeElement* startElement = NULL);
|
||||||
|
|
Loading…
Reference in a new issue