mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 14:52:46 +02:00
more voxel delete debugging, use memcmp() instead of ==
This commit is contained in:
parent
f9dc41011a
commit
8988796285
2 changed files with 5 additions and 2 deletions
|
@ -178,7 +178,10 @@ void VoxelTree::deleteVoxelCodeFromTree(unsigned char *codeBuffer) {
|
||||||
printOctalCode(nodeToDelete->octalCode);
|
printOctalCode(nodeToDelete->octalCode);
|
||||||
|
|
||||||
// If the node exists...
|
// If the node exists...
|
||||||
if (*nodeToDelete->octalCode == *codeBuffer) {
|
int lengthInBytes = bytesRequiredForCodeLength(*codeBuffer); // includes octet count, not color!
|
||||||
|
printf("compare octal codes of length %d\n",lengthInBytes);
|
||||||
|
|
||||||
|
if (0==memcmp(nodeToDelete->octalCode,codeBuffer,lengthInBytes)) {
|
||||||
printf("found node to delete...\n");
|
printf("found node to delete...\n");
|
||||||
|
|
||||||
float* vertices = firstVertexForCode(nodeToDelete->octalCode);
|
float* vertices = firstVertexForCode(nodeToDelete->octalCode);
|
||||||
|
|
|
@ -11,7 +11,7 @@ function send_voxels($inputFileName,$server,$port,$command) {
|
||||||
$netData = pack("cv",ord($command),$voxNum);
|
$netData = pack("cv",ord($command),$voxNum);
|
||||||
|
|
||||||
$packetSize = 3; // to start
|
$packetSize = 3; // to start
|
||||||
while ($packetSize < 800) {
|
while ($packetSize < 1450) {
|
||||||
$octets = fread($inputFile,1);
|
$octets = fread($inputFile,1);
|
||||||
$octets = (int)ord($octets);
|
$octets = (int)ord($octets);
|
||||||
echo "read octets=$octets\n";
|
echo "read octets=$octets\n";
|
||||||
|
|
Loading…
Reference in a new issue