mirror of
https://github.com/lubosz/overte.git
synced 2025-08-11 06:46:18 +02:00
Merge pull request #2743 from Atlante45/clockSkew_win_bug
Clock skew win bug
This commit is contained in:
commit
8a823ee4c4
4 changed files with 163 additions and 139 deletions
|
@ -62,6 +62,8 @@ PacketVersion versionForPacketType(PacketType type) {
|
||||||
case PacketTypeVoxelSet:
|
case PacketTypeVoxelSet:
|
||||||
case PacketTypeVoxelSetDestructive:
|
case PacketTypeVoxelSetDestructive:
|
||||||
return 1;
|
return 1;
|
||||||
|
case PacketTypeOctreeStats:
|
||||||
|
return 1;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -646,70 +646,70 @@ int OctreeSceneStats::unpackFromMessage(const unsigned char* sourceBuffer, int a
|
||||||
|
|
||||||
|
|
||||||
void OctreeSceneStats::printDebugDetails() {
|
void OctreeSceneStats::printDebugDetails() {
|
||||||
qDebug("\n------------------------------");
|
qDebug() << "\n------------------------------";
|
||||||
qDebug("OctreeSceneStats:");
|
qDebug() << "OctreeSceneStats:";
|
||||||
qDebug(" start : %llu", (long long unsigned int)_start);
|
qDebug() << "start: " << _start;
|
||||||
qDebug(" end : %llu", (long long unsigned int)_end);
|
qDebug() << "end: " << _end;
|
||||||
qDebug(" elapsed : %llu", (long long unsigned int)_elapsed);
|
qDebug() << "elapsed: " << _elapsed;
|
||||||
qDebug(" encoding : %llu", (long long unsigned int)_totalEncodeTime);
|
qDebug() << "encoding: " << _totalEncodeTime;
|
||||||
qDebug();
|
qDebug();
|
||||||
qDebug(" full scene: %s", debug::valueOf(_isFullScene));
|
qDebug() << "full scene: " << debug::valueOf(_isFullScene);
|
||||||
qDebug(" moving: %s", debug::valueOf(_isMoving));
|
qDebug() << "moving: " << debug::valueOf(_isMoving);
|
||||||
qDebug();
|
qDebug();
|
||||||
qDebug(" packets: %d", _packets);
|
qDebug() << "packets: " << _packets;
|
||||||
qDebug(" bytes : %ld", _bytes);
|
qDebug() << "bytes: " << _bytes;
|
||||||
qDebug();
|
qDebug();
|
||||||
qDebug(" total elements : %lu", _totalElements );
|
qDebug() << "total elements: " << _totalElements;
|
||||||
qDebug(" internal : %lu", _totalInternal );
|
qDebug() << "internal: " << _totalInternal;
|
||||||
qDebug(" leaves : %lu", _totalLeaves );
|
qDebug() << "leaves: " << _totalLeaves;
|
||||||
qDebug(" traversed : %lu", _traversed );
|
qDebug() << "traversed: " << _traversed;
|
||||||
qDebug(" internal : %lu", _internal );
|
qDebug() << "internal: " << _internal;
|
||||||
qDebug(" leaves : %lu", _leaves );
|
qDebug() << "leaves: " << _leaves;
|
||||||
qDebug(" skipped distance : %lu", _skippedDistance );
|
qDebug() << "skipped distance: " << _skippedDistance;
|
||||||
qDebug(" internal : %lu", _internalSkippedDistance );
|
qDebug() << "internal: " << _internalSkippedDistance;
|
||||||
qDebug(" leaves : %lu", _leavesSkippedDistance );
|
qDebug() << "leaves: " << _leavesSkippedDistance;
|
||||||
qDebug(" skipped out of view : %lu", _skippedOutOfView );
|
qDebug() << "skipped out of view: " << _skippedOutOfView;
|
||||||
qDebug(" internal : %lu", _internalSkippedOutOfView );
|
qDebug() << "internal: " << _internalSkippedOutOfView;
|
||||||
qDebug(" leaves : %lu", _leavesSkippedOutOfView );
|
qDebug() << "leaves: " << _leavesSkippedOutOfView;
|
||||||
qDebug(" skipped was in view : %lu", _skippedWasInView );
|
qDebug() << "skipped was in view: " << _skippedWasInView;
|
||||||
qDebug(" internal : %lu", _internalSkippedWasInView );
|
qDebug() << "internal: " << _internalSkippedWasInView;
|
||||||
qDebug(" leaves : %lu", _leavesSkippedWasInView );
|
qDebug() << "leaves: " << _leavesSkippedWasInView;
|
||||||
qDebug(" skipped no change : %lu", _skippedNoChange );
|
qDebug() << "skipped no change: " << _skippedNoChange;
|
||||||
qDebug(" internal : %lu", _internalSkippedNoChange );
|
qDebug() << "internal: " << _internalSkippedNoChange;
|
||||||
qDebug(" leaves : %lu", _leavesSkippedNoChange );
|
qDebug() << "leaves: " << _leavesSkippedNoChange;
|
||||||
qDebug(" skipped occluded : %lu", _skippedOccluded );
|
qDebug() << "skipped occluded: " << _skippedOccluded;
|
||||||
qDebug(" internal : %lu", _internalSkippedOccluded );
|
qDebug() << "internal: " << _internalSkippedOccluded;
|
||||||
qDebug(" leaves : %lu", _leavesSkippedOccluded );
|
qDebug() << "leaves: " << _leavesSkippedOccluded;
|
||||||
qDebug();
|
qDebug();
|
||||||
qDebug(" color sent : %lu", _colorSent );
|
qDebug() << "color sent: " << _colorSent;
|
||||||
qDebug(" internal : %lu", _internalColorSent );
|
qDebug() << "internal: " << _internalColorSent;
|
||||||
qDebug(" leaves : %lu", _leavesColorSent );
|
qDebug() << "leaves: " << _leavesColorSent;
|
||||||
qDebug(" Didn't Fit : %lu", _didntFit );
|
qDebug() << "Didn't Fit: " << _didntFit;
|
||||||
qDebug(" internal : %lu", _internalDidntFit );
|
qDebug() << "internal: " << _internalDidntFit;
|
||||||
qDebug(" leaves : %lu", _leavesDidntFit );
|
qDebug() << "leaves: " << _leavesDidntFit;
|
||||||
qDebug(" color bits : %lu", _colorBitsWritten );
|
qDebug() << "color bits: " << _colorBitsWritten;
|
||||||
qDebug(" exists bits : %lu", _existsBitsWritten );
|
qDebug() << "exists bits: " << _existsBitsWritten;
|
||||||
qDebug(" in packet bit : %lu", _existsInPacketBitsWritten);
|
qDebug() << "in packet bit: " << _existsInPacketBitsWritten;
|
||||||
qDebug(" trees removed : %lu", _treesRemoved );
|
qDebug() << "trees removed: " << _treesRemoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeSceneStats::ItemInfo OctreeSceneStats::_ITEMS[] = {
|
OctreeSceneStats::ItemInfo OctreeSceneStats::_ITEMS[] = {
|
||||||
{ "Elapsed" , GREENISH , 2 , "Elapsed,fps" },
|
{ "Elapsed", GREENISH, 2, "Elapsed,fps" },
|
||||||
{ "Encode" , YELLOWISH , 2 , "Time,fps" },
|
{ "Encode", YELLOWISH, 2, "Time,fps" },
|
||||||
{ "Network" , GREYISH , 3 , "Packets,Bytes,KBPS" },
|
{ "Network", GREYISH, 3, "Packets,Bytes,KBPS" },
|
||||||
{ "Octrees on Server" , GREENISH , 3 , "Total,Internal,Leaves" },
|
{ "Octrees on Server", GREENISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Octrees Sent" , YELLOWISH , 5 , "Total,Bits/Octree,Avg Bits/Octree,Internal,Leaves" },
|
{ "Octrees Sent", YELLOWISH, 5, "Total,Bits/Octree,Avg Bits/Octree,Internal,Leaves" },
|
||||||
{ "Colors Sent" , GREYISH , 3 , "Total,Internal,Leaves" },
|
{ "Colors Sent", GREYISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Bitmasks Sent" , GREENISH , 3 , "Colors,Exists,In Packets" },
|
{ "Bitmasks Sent", GREENISH, 3, "Colors,Exists,In Packets" },
|
||||||
{ "Traversed" , YELLOWISH , 3 , "Total,Internal,Leaves" },
|
{ "Traversed", YELLOWISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - Total" , GREYISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - Total", GREYISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - Distance" , GREENISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - Distance", GREENISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - Out of View", YELLOWISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - Out of View", YELLOWISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - Was in View", GREYISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - Was in View", GREYISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - No Change" , GREENISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - No Change", GREENISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Skipped - Occluded" , YELLOWISH , 3 , "Total,Internal,Leaves" },
|
{ "Skipped - Occluded", YELLOWISH, 3, "Total,Internal,Leaves" },
|
||||||
{ "Didn't fit in packet" , GREYISH , 4 , "Total,Internal,Leaves,Removed" },
|
{ "Didn't fit in packet", GREYISH, 4, "Total,Internal,Leaves,Removed" },
|
||||||
{ "Mode" , GREENISH , 4 , "Moving,Stationary,Partial,Full" },
|
{ "Mode", GREENISH, 4, "Moving,Stationary,Partial,Full" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* OctreeSceneStats::getItemValue(Item item) {
|
const char* OctreeSceneStats::getItemValue(Item item) {
|
||||||
|
@ -732,12 +732,14 @@ const char* OctreeSceneStats::getItemValue(Item item) {
|
||||||
case ITEM_PACKETS: {
|
case ITEM_PACKETS: {
|
||||||
float elapsedSecs = ((float)_elapsed / (float)USECS_PER_SECOND);
|
float elapsedSecs = ((float)_elapsed / (float)USECS_PER_SECOND);
|
||||||
calculatedKBPS = elapsedSecs == 0 ? 0 : ((_bytes * 8) / elapsedSecs) / 1000;
|
calculatedKBPS = elapsedSecs == 0 ? 0 : ((_bytes * 8) / elapsedSecs) / 1000;
|
||||||
sprintf(_itemValueBuffer, "%d packets %lu bytes (%d kbps)", _packets, _bytes, calculatedKBPS);
|
sprintf(_itemValueBuffer, "%d packets %lu bytes (%d kbps)", _packets, (long unsigned int)_bytes, calculatedKBPS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_VOXELS_SERVER: {
|
case ITEM_VOXELS_SERVER: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_totalElements, _totalInternal, _totalLeaves);
|
(long unsigned int)_totalElements,
|
||||||
|
(long unsigned int)_totalInternal,
|
||||||
|
(long unsigned int)_totalLeaves);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_VOXELS: {
|
case ITEM_VOXELS: {
|
||||||
|
@ -745,12 +747,14 @@ const char* OctreeSceneStats::getItemValue(Item item) {
|
||||||
float calculatedBPV = total == 0 ? 0 : (_bytes * 8) / total;
|
float calculatedBPV = total == 0 ? 0 : (_bytes * 8) / total;
|
||||||
float averageBPV = _bitsPerOctreeAverage.getAverage();
|
float averageBPV = _bitsPerOctreeAverage.getAverage();
|
||||||
sprintf(_itemValueBuffer, "%lu (%.2f bits/octree Average: %.2f bits/octree) %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu (%.2f bits/octree Average: %.2f bits/octree) %lu internal %lu leaves",
|
||||||
total, calculatedBPV, averageBPV, _existsInPacketBitsWritten, _colorSent);
|
total, calculatedBPV, averageBPV,
|
||||||
|
(long unsigned int)_existsInPacketBitsWritten,
|
||||||
|
(long unsigned int)_colorSent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_TRAVERSED: {
|
case ITEM_TRAVERSED: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_traversed, _internal, _leaves);
|
(long unsigned int)_traversed, (long unsigned int)_internal, (long unsigned int)_leaves);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED: {
|
case ITEM_SKIPPED: {
|
||||||
|
@ -769,42 +773,59 @@ const char* OctreeSceneStats::getItemValue(Item item) {
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED_DISTANCE: {
|
case ITEM_SKIPPED_DISTANCE: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_skippedDistance, _internalSkippedDistance, _leavesSkippedDistance);
|
(long unsigned int)_skippedDistance,
|
||||||
|
(long unsigned int)_internalSkippedDistance,
|
||||||
|
(long unsigned int)_leavesSkippedDistance);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED_OUT_OF_VIEW: {
|
case ITEM_SKIPPED_OUT_OF_VIEW: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_skippedOutOfView, _internalSkippedOutOfView, _leavesSkippedOutOfView);
|
(long unsigned int)_skippedOutOfView,
|
||||||
|
(long unsigned int)_internalSkippedOutOfView,
|
||||||
|
(long unsigned int)_leavesSkippedOutOfView);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED_WAS_IN_VIEW: {
|
case ITEM_SKIPPED_WAS_IN_VIEW: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_skippedWasInView, _internalSkippedWasInView, _leavesSkippedWasInView);
|
(long unsigned int)_skippedWasInView,
|
||||||
|
(long unsigned int)_internalSkippedWasInView,
|
||||||
|
(long unsigned int)_leavesSkippedWasInView);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED_NO_CHANGE: {
|
case ITEM_SKIPPED_NO_CHANGE: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_skippedNoChange, _internalSkippedNoChange, _leavesSkippedNoChange);
|
(long unsigned int)_skippedNoChange,
|
||||||
|
(long unsigned int)_internalSkippedNoChange,
|
||||||
|
(long unsigned int)_leavesSkippedNoChange);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_SKIPPED_OCCLUDED: {
|
case ITEM_SKIPPED_OCCLUDED: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_skippedOccluded, _internalSkippedOccluded, _leavesSkippedOccluded);
|
(long unsigned int)_skippedOccluded,
|
||||||
|
(long unsigned int)_internalSkippedOccluded,
|
||||||
|
(long unsigned int)_leavesSkippedOccluded);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_COLORS: {
|
case ITEM_COLORS: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves",
|
||||||
_colorSent, _internalColorSent, _leavesColorSent);
|
(long unsigned int)_colorSent,
|
||||||
|
(long unsigned int)_internalColorSent,
|
||||||
|
(long unsigned int)_leavesColorSent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_DIDNT_FIT: {
|
case ITEM_DIDNT_FIT: {
|
||||||
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves (removed: %lu)",
|
sprintf(_itemValueBuffer, "%lu total %lu internal %lu leaves (removed: %lu)",
|
||||||
_didntFit, _internalDidntFit, _leavesDidntFit, _treesRemoved);
|
(long unsigned int)_didntFit,
|
||||||
|
(long unsigned int)_internalDidntFit,
|
||||||
|
(long unsigned int)_leavesDidntFit,
|
||||||
|
(long unsigned int)_treesRemoved);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_BITS: {
|
case ITEM_BITS: {
|
||||||
sprintf(_itemValueBuffer, "colors: %lu, exists: %lu, in packets: %lu",
|
sprintf(_itemValueBuffer, "colors: %lu, exists: %lu, in packets: %lu",
|
||||||
_colorBitsWritten, _existsBitsWritten, _existsInPacketBitsWritten);
|
(long unsigned int)_colorBitsWritten,
|
||||||
|
(long unsigned int)_existsBitsWritten,
|
||||||
|
(long unsigned int)_existsInPacketBitsWritten);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ITEM_MODE: {
|
case ITEM_MODE: {
|
||||||
|
|
|
@ -146,30 +146,30 @@ public:
|
||||||
const std::vector<unsigned char*>& getJurisdictionEndNodes() const { return _jurisdictionEndNodes; }
|
const std::vector<unsigned char*>& getJurisdictionEndNodes() const { return _jurisdictionEndNodes; }
|
||||||
|
|
||||||
bool isMoving() const { return _isMoving; };
|
bool isMoving() const { return _isMoving; };
|
||||||
unsigned long getTotalElements() const { return _totalElements; }
|
quint64 getTotalElements() const { return _totalElements; }
|
||||||
unsigned long getTotalInternal() const { return _totalInternal; }
|
quint64 getTotalInternal() const { return _totalInternal; }
|
||||||
unsigned long getTotalLeaves() const { return _totalLeaves; }
|
quint64 getTotalLeaves() const { return _totalLeaves; }
|
||||||
unsigned long getTotalEncodeTime() const { return _totalEncodeTime; }
|
quint64 getTotalEncodeTime() const { return _totalEncodeTime; }
|
||||||
unsigned long getElapsedTime() const { return _elapsed; }
|
quint64 getElapsedTime() const { return _elapsed; }
|
||||||
|
|
||||||
unsigned long getLastFullElapsedTime() const { return _lastFullElapsed; }
|
quint64 getLastFullElapsedTime() const { return _lastFullElapsed; }
|
||||||
unsigned long getLastFullTotalEncodeTime() const { return _lastFullTotalEncodeTime; }
|
quint64 getLastFullTotalEncodeTime() const { return _lastFullTotalEncodeTime; }
|
||||||
unsigned int getLastFullTotalPackets() const { return _lastFullTotalPackets; }
|
quint32 getLastFullTotalPackets() const { return _lastFullTotalPackets; }
|
||||||
unsigned long getLastFullTotalBytes() const { return _lastFullTotalBytes; }
|
quint64 getLastFullTotalBytes() const { return _lastFullTotalBytes; }
|
||||||
|
|
||||||
// Used in client implementations to track individual octree packets
|
// Used in client implementations to track individual octree packets
|
||||||
void trackIncomingOctreePacket(const QByteArray& packet, bool wasStatsPacket, int nodeClockSkewUsec);
|
void trackIncomingOctreePacket(const QByteArray& packet, bool wasStatsPacket, int nodeClockSkewUsec);
|
||||||
|
|
||||||
unsigned int getIncomingPackets() const { return _incomingPacket; }
|
quint32 getIncomingPackets() const { return _incomingPacket; }
|
||||||
unsigned long getIncomingBytes() const { return _incomingBytes; }
|
quint64 getIncomingBytes() const { return _incomingBytes; }
|
||||||
unsigned long getIncomingWastedBytes() const { return _incomingWastedBytes; }
|
quint64 getIncomingWastedBytes() const { return _incomingWastedBytes; }
|
||||||
unsigned int getIncomingOutOfOrder() const { return _incomingLate + _incomingEarly; }
|
quint32 getIncomingOutOfOrder() const { return _incomingLate + _incomingEarly; }
|
||||||
unsigned int getIncomingLikelyLost() const { return _incomingLikelyLost; }
|
quint32 getIncomingLikelyLost() const { return _incomingLikelyLost; }
|
||||||
unsigned int getIncomingRecovered() const { return _incomingRecovered; }
|
quint32 getIncomingRecovered() const { return _incomingRecovered; }
|
||||||
unsigned int getIncomingEarly() const { return _incomingEarly; }
|
quint32 getIncomingEarly() const { return _incomingEarly; }
|
||||||
unsigned int getIncomingLate() const { return _incomingLate; }
|
quint32 getIncomingLate() const { return _incomingLate; }
|
||||||
unsigned int getIncomingReallyLate() const { return _incomingReallyLate; }
|
quint32 getIncomingReallyLate() const { return _incomingReallyLate; }
|
||||||
unsigned int getIncomingPossibleDuplicate() const { return _incomingPossibleDuplicate; }
|
quint32 getIncomingPossibleDuplicate() const { return _incomingPossibleDuplicate; }
|
||||||
float getIncomingFlightTimeAverage() { return _incomingFlightTimeAverage.getAverage(); }
|
float getIncomingFlightTimeAverage() { return _incomingFlightTimeAverage.getAverage(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -178,7 +178,8 @@ private:
|
||||||
|
|
||||||
bool _isReadyToSend;
|
bool _isReadyToSend;
|
||||||
unsigned char _statsMessage[MAX_PACKET_SIZE];
|
unsigned char _statsMessage[MAX_PACKET_SIZE];
|
||||||
int _statsMessageLength;
|
|
||||||
|
qint32 _statsMessageLength;
|
||||||
|
|
||||||
// scene timing data in usecs
|
// scene timing data in usecs
|
||||||
bool _isStarted;
|
bool _isStarted;
|
||||||
|
@ -188,8 +189,8 @@ private:
|
||||||
|
|
||||||
quint64 _lastFullElapsed;
|
quint64 _lastFullElapsed;
|
||||||
quint64 _lastFullTotalEncodeTime;
|
quint64 _lastFullTotalEncodeTime;
|
||||||
unsigned int _lastFullTotalPackets;
|
quint32 _lastFullTotalPackets;
|
||||||
unsigned long _lastFullTotalBytes;
|
quint64 _lastFullTotalBytes;
|
||||||
|
|
||||||
SimpleMovingAverage _elapsedAverage;
|
SimpleMovingAverage _elapsedAverage;
|
||||||
SimpleMovingAverage _bitsPerOctreeAverage;
|
SimpleMovingAverage _bitsPerOctreeAverage;
|
||||||
|
@ -198,46 +199,46 @@ private:
|
||||||
quint64 _encodeStart;
|
quint64 _encodeStart;
|
||||||
|
|
||||||
// scene octree related data
|
// scene octree related data
|
||||||
unsigned long _totalElements;
|
quint64 _totalElements;
|
||||||
unsigned long _totalInternal;
|
quint64 _totalInternal;
|
||||||
unsigned long _totalLeaves;
|
quint64 _totalLeaves;
|
||||||
|
|
||||||
unsigned long _traversed;
|
quint64 _traversed;
|
||||||
unsigned long _internal;
|
quint64 _internal;
|
||||||
unsigned long _leaves;
|
quint64 _leaves;
|
||||||
|
|
||||||
unsigned long _skippedDistance;
|
quint64 _skippedDistance;
|
||||||
unsigned long _internalSkippedDistance;
|
quint64 _internalSkippedDistance;
|
||||||
unsigned long _leavesSkippedDistance;
|
quint64 _leavesSkippedDistance;
|
||||||
|
|
||||||
unsigned long _skippedOutOfView;
|
quint64 _skippedOutOfView;
|
||||||
unsigned long _internalSkippedOutOfView;
|
quint64 _internalSkippedOutOfView;
|
||||||
unsigned long _leavesSkippedOutOfView;
|
quint64 _leavesSkippedOutOfView;
|
||||||
|
|
||||||
unsigned long _skippedWasInView;
|
quint64 _skippedWasInView;
|
||||||
unsigned long _internalSkippedWasInView;
|
quint64 _internalSkippedWasInView;
|
||||||
unsigned long _leavesSkippedWasInView;
|
quint64 _leavesSkippedWasInView;
|
||||||
|
|
||||||
unsigned long _skippedNoChange;
|
quint64 _skippedNoChange;
|
||||||
unsigned long _internalSkippedNoChange;
|
quint64 _internalSkippedNoChange;
|
||||||
unsigned long _leavesSkippedNoChange;
|
quint64 _leavesSkippedNoChange;
|
||||||
|
|
||||||
unsigned long _skippedOccluded;
|
quint64 _skippedOccluded;
|
||||||
unsigned long _internalSkippedOccluded;
|
quint64 _internalSkippedOccluded;
|
||||||
unsigned long _leavesSkippedOccluded;
|
quint64 _leavesSkippedOccluded;
|
||||||
|
|
||||||
unsigned long _colorSent;
|
quint64 _colorSent;
|
||||||
unsigned long _internalColorSent;
|
quint64 _internalColorSent;
|
||||||
unsigned long _leavesColorSent;
|
quint64 _leavesColorSent;
|
||||||
|
|
||||||
unsigned long _didntFit;
|
quint64 _didntFit;
|
||||||
unsigned long _internalDidntFit;
|
quint64 _internalDidntFit;
|
||||||
unsigned long _leavesDidntFit;
|
quint64 _leavesDidntFit;
|
||||||
|
|
||||||
unsigned long _colorBitsWritten;
|
quint64 _colorBitsWritten;
|
||||||
unsigned long _existsBitsWritten;
|
quint64 _existsBitsWritten;
|
||||||
unsigned long _existsInPacketBitsWritten;
|
quint64 _existsInPacketBitsWritten;
|
||||||
unsigned long _treesRemoved;
|
quint64 _treesRemoved;
|
||||||
|
|
||||||
// Accounting Notes:
|
// Accounting Notes:
|
||||||
//
|
//
|
||||||
|
@ -255,22 +256,22 @@ private:
|
||||||
//
|
//
|
||||||
|
|
||||||
// scene network related data
|
// scene network related data
|
||||||
unsigned int _packets;
|
quint32 _packets;
|
||||||
unsigned long _bytes;
|
quint64 _bytes;
|
||||||
unsigned int _passes;
|
quint32 _passes;
|
||||||
|
|
||||||
// incoming packets stats
|
// incoming packets stats
|
||||||
unsigned int _incomingPacket;
|
quint32 _incomingPacket;
|
||||||
unsigned long _incomingBytes;
|
quint64 _incomingBytes;
|
||||||
unsigned long _incomingWastedBytes;
|
quint64 _incomingWastedBytes;
|
||||||
|
|
||||||
uint16_t _incomingLastSequence; /// last incoming sequence number
|
quint16 _incomingLastSequence; /// last incoming sequence number
|
||||||
unsigned int _incomingLikelyLost; /// count of packets likely lost, may be off by _incomingReallyLate count
|
quint32 _incomingLikelyLost; /// count of packets likely lost, may be off by _incomingReallyLate count
|
||||||
unsigned int _incomingRecovered; /// packets that were late, and we had in our missing list, we consider recovered
|
quint32 _incomingRecovered; /// packets that were late, and we had in our missing list, we consider recovered
|
||||||
unsigned int _incomingEarly; /// out of order earlier than expected
|
quint32 _incomingEarly; /// out of order earlier than expected
|
||||||
unsigned int _incomingLate; /// out of order later than expected
|
quint32 _incomingLate; /// out of order later than expected
|
||||||
unsigned int _incomingReallyLate; /// out of order and later than MAX_MISSING_SEQUENCE_OLD_AGE late
|
quint32 _incomingReallyLate; /// out of order and later than MAX_MISSING_SEQUENCE_OLD_AGE late
|
||||||
unsigned int _incomingPossibleDuplicate; /// out of order possibly a duplicate
|
quint32 _incomingPossibleDuplicate; /// out of order possibly a duplicate
|
||||||
QSet<uint16_t> _missingSequenceNumbers;
|
QSet<uint16_t> _missingSequenceNumbers;
|
||||||
SimpleMovingAverage _incomingFlightTimeAverage;
|
SimpleMovingAverage _incomingFlightTimeAverage;
|
||||||
|
|
||||||
|
@ -280,7 +281,7 @@ private:
|
||||||
|
|
||||||
|
|
||||||
static ItemInfo _ITEMS[];
|
static ItemInfo _ITEMS[];
|
||||||
static int const MAX_ITEM_VALUE_LENGTH = 128;
|
static const int MAX_ITEM_VALUE_LENGTH = 128;
|
||||||
char _itemValueBuffer[MAX_ITEM_VALUE_LENGTH];
|
char _itemValueBuffer[MAX_ITEM_VALUE_LENGTH];
|
||||||
|
|
||||||
unsigned char* _jurisdictionRoot;
|
unsigned char* _jurisdictionRoot;
|
||||||
|
|
|
@ -615,7 +615,7 @@ int unpackClipValueFromTwoByte(const unsigned char* buffer, float& clipValue) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int packFloatToByte(unsigned char* buffer, float value, float scaleBy) {
|
int packFloatToByte(unsigned char* buffer, float value, float scaleBy) {
|
||||||
unsigned char holder;
|
quint8 holder;
|
||||||
const float CONVERSION_RATIO = (255 / scaleBy);
|
const float CONVERSION_RATIO = (255 / scaleBy);
|
||||||
holder = floorf(value * CONVERSION_RATIO);
|
holder = floorf(value * CONVERSION_RATIO);
|
||||||
memcpy(buffer, &holder, sizeof(holder));
|
memcpy(buffer, &holder, sizeof(holder));
|
||||||
|
@ -623,7 +623,7 @@ int packFloatToByte(unsigned char* buffer, float value, float scaleBy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int unpackFloatFromByte(const unsigned char* buffer, float& value, float scaleBy) {
|
int unpackFloatFromByte(const unsigned char* buffer, float& value, float scaleBy) {
|
||||||
unsigned char holder;
|
quint8 holder;
|
||||||
memcpy(&holder, buffer, sizeof(holder));
|
memcpy(&holder, buffer, sizeof(holder));
|
||||||
value = ((float)holder / (float) 255) * scaleBy;
|
value = ((float)holder / (float) 255) * scaleBy;
|
||||||
return sizeof(holder);
|
return sizeof(holder);
|
||||||
|
|
Loading…
Reference in a new issue