From 23ef5b5404bc295f68723aa558f97a2fadf65e6a Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 4 Jun 2014 10:22:19 -0700 Subject: [PATCH] added some comments --- libraries/octree/src/Octree.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index 3ec1871023..cbdc4753dc 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -602,7 +602,6 @@ public: bool findRayIntersectionOp(OctreeElement* element, void* extraData) { RayArgs* args = static_cast(extraData); - bool keepSearching = true; if (element->findRayIntersection(args->origin, args->direction, keepSearching, args->element, args->distance, args->face, args->intersectedObject)) { @@ -1336,14 +1335,23 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElement* element, } } - // write the color data... + // write the child element data... if (continueThisLevel && params.includeColor) { for (int i = 0; i < NUMBER_OF_CHILDREN; i++) { if (oneAtBit(childrenColoredBits, i)) { OctreeElement* childElement = element->getChildAtIndex(i); if (childElement) { + int bytesBeforeChild = packetData->getUncompressedSize(); + + // TODO: we want to support the ability for a childElement to "partially" write it's data. + // for example, consider the case of the model server where the entire contents of the + // element may be larger than can fit in a single MTU/packetData. In this case, we want + // to allow the appendElementData() to respond that it produced partial data, which should be + // written, but that the childElement needs to be reprocessed in an additional pass or passes + // to be completed. In the case that an element was partially written, we need to continueThisLevel = childElement->appendElementData(packetData, params); + int bytesAfterChild = packetData->getUncompressedSize(); if (!continueThisLevel) {