mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-30 09:43:08 +02:00
initial newline removal from all QDebug calls
This commit is contained in:
parent
a8bbe41642
commit
987c639e36
72 changed files with 479 additions and 488 deletions
animation-server/src
assignment-client/src
domain-server/src
interface/src
Application.cppAudio.cppBuckyBalls.cppDataServerClient.cppEnvironment.cppMenu.cppOscilloscope.cppPairingHandler.cppUtil.cppVoxelHideShowThread.cppVoxelImporter.cppVoxelPacketProcessor.cppVoxelSystem.cpp
avatar
devices
main.cpprenderer
starfield
libraries
audio/src
avatars/src
metavoxels/src
octree-server/src
octree/src
CoverageMap.cppCoverageMapV2.cppJurisdictionMap.cppOctree.cppOctreeEditPacketSender.cppOctreeElement.cppOctreePersistThread.cppOctreeProjectedPolygon.cppOctreeRenderer.cppOctreeSceneStats.cppViewFrustum.cpp
particles/src
script-engine/src
shared/src
Assignment.cppGeometryUtil.cppHifiSockAddr.cppLogging.cppNetworkPacket.cppNode.cppNodeList.cppOctalCode.cppPacketHeaders.cppPerfStat.cppSharedUtil.cppSharedUtil.h
voxel-server/src
voxels/src
voxel-edit/src
|
@ -598,10 +598,10 @@ void* animateVoxels(void* args) {
|
|||
|
||||
bool firstTime = true;
|
||||
|
||||
qDebug() << "Setting PPS to " << ::packetsPerSecond << "\n";
|
||||
qDebug() << "Setting PPS to " << ::packetsPerSecond;
|
||||
::voxelEditPacketSender->setPacketsPerSecond(::packetsPerSecond);
|
||||
|
||||
qDebug() << "PPS set to " << ::voxelEditPacketSender->getPacketsPerSecond() << "\n";
|
||||
qDebug() << "PPS set to " << ::voxelEditPacketSender->getPacketsPerSecond();
|
||||
|
||||
while (true) {
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ void Agent::run() {
|
|||
QNetworkAccessManager *networkManager = new QNetworkAccessManager(this);
|
||||
QNetworkReply *reply = networkManager->get(QNetworkRequest(QUrl(scriptURLString)));
|
||||
|
||||
qDebug() << "Downloading script at" << scriptURLString << "\n";
|
||||
qDebug() << "Downloading script at" << scriptURLString;
|
||||
|
||||
QEventLoop loop;
|
||||
QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||
|
@ -76,7 +76,7 @@ void Agent::run() {
|
|||
|
||||
QString scriptContents(reply->readAll());
|
||||
|
||||
qDebug() << "Downloaded script:" << scriptContents << "\n";
|
||||
qDebug() << "Downloaded script:" << scriptContents;
|
||||
|
||||
timeval startTime;
|
||||
gettimeofday(&startTime, NULL);
|
||||
|
|
|
@ -83,7 +83,7 @@ AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
|||
}
|
||||
|
||||
// call a timer function every ASSIGNMENT_REQUEST_INTERVAL_MSECS to ask for assignment, if required
|
||||
qDebug() << "Waiting for assignment -" << _requestAssignment << "\n";
|
||||
qDebug() << "Waiting for assignment -" << _requestAssignment;
|
||||
|
||||
QTimer* timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), SLOT(sendAssignmentRequest()));
|
||||
|
@ -121,20 +121,19 @@ void AssignmentClient::readPendingDatagrams() {
|
|||
} else if (packetData[0] == PACKET_TYPE_DEPLOY_ASSIGNMENT || packetData[0] == PACKET_TYPE_CREATE_ASSIGNMENT) {
|
||||
|
||||
if (_currentAssignment) {
|
||||
qDebug() << "Dropping received assignment since we are currently running one.\n";
|
||||
qDebug() << "Dropping received assignment since we are currently running one.";
|
||||
} else {
|
||||
// construct the deployed assignment from the packet data
|
||||
_currentAssignment = AssignmentFactory::unpackAssignment(packetData, receivedBytes);
|
||||
|
||||
qDebug() << "Received an assignment -" << *_currentAssignment << "\n";
|
||||
qDebug() << "Received an assignment -" << *_currentAssignment;
|
||||
|
||||
// switch our nodelist domain IP and port to whoever sent us the assignment
|
||||
if (packetData[0] == PACKET_TYPE_CREATE_ASSIGNMENT) {
|
||||
nodeList->setDomainSockAddr(senderSockAddr);
|
||||
nodeList->setOwnerUUID(_currentAssignment->getUUID());
|
||||
|
||||
qDebug("Destination IP for assignment is %s\n",
|
||||
nodeList->getDomainIP().toString().toStdString().c_str());
|
||||
qDebug() << "Destination IP for assignment is" << nodeList->getDomainIP().toString();
|
||||
|
||||
// start the deployed assignment
|
||||
QThread* workerThread = new QThread(this);
|
||||
|
@ -151,7 +150,7 @@ void AssignmentClient::readPendingDatagrams() {
|
|||
// Starts an event loop, and emits workerThread->started()
|
||||
workerThread->start();
|
||||
} else {
|
||||
qDebug("Received a bad destination socket for assignment.\n");
|
||||
qDebug("Received a bad destination socket for assignment.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -166,7 +165,7 @@ void AssignmentClient::assignmentCompleted() {
|
|||
// reset the logging target to the the CHILD_TARGET_NAME
|
||||
Logging::setTargetName(ASSIGNMENT_CLIENT_TARGET_NAME);
|
||||
|
||||
qDebug("Assignment finished or never started - waiting for new assignment\n");
|
||||
qDebug("Assignment finished or never started - waiting for new assignment.");
|
||||
|
||||
_currentAssignment = NULL;
|
||||
|
||||
|
|
|
@ -47,10 +47,10 @@ void AssignmentClientMonitor::spawnChildClient() {
|
|||
connect(assignmentClient, SIGNAL(finished(int, QProcess::ExitStatus)), this,
|
||||
SLOT(childProcessFinished(int, QProcess::ExitStatus)));
|
||||
|
||||
qDebug() << "Spawned a child client with PID" << assignmentClient->pid() << "\n";
|
||||
qDebug() << "Spawned a child client with PID" << assignmentClient->pid();
|
||||
}
|
||||
|
||||
void AssignmentClientMonitor::childProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
qDebug() << "Replacing dead child assignment client with a new one.\n";
|
||||
qDebug("Replacing dead child assignment client with a new one");
|
||||
spawnChildClient();
|
||||
}
|
|
@ -295,7 +295,7 @@ void AudioMixer::run() {
|
|||
if (usecToSleep > 0) {
|
||||
usleep(usecToSleep);
|
||||
} else {
|
||||
qDebug("Took too much time, not sleeping!\n");
|
||||
qDebug() << "AudioMixer loop took" << -usecToSleep << "of extra time. Not sleeping.";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ void AvatarMixer::run() {
|
|||
if (usecToSleep > 0) {
|
||||
usleep(usecToSleep);
|
||||
} else {
|
||||
qDebug() << "Took too much time, not sleeping!\n";
|
||||
qDebug() << "AvatarMixer loop took too" << -usecToSleep << "of extra time. Won't sleep.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ void MetavoxelSession::sendDelta() {
|
|||
}
|
||||
|
||||
void MetavoxelSession::timedOut() {
|
||||
qDebug() << "Session timed out [sessionId=" << _sessionId << ", sender=" << _sender << "]\n";
|
||||
qDebug() << "Session timed out [sessionId=" << _sessionId << ", sender=" << _sender << "]";
|
||||
_server->removeSession(_sessionId);
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,8 @@ void DomainServer::readAvailableDatagrams() {
|
|||
// construct the requested assignment from the packet data
|
||||
Assignment requestAssignment(packetData, receivedBytes);
|
||||
|
||||
qDebug("Received a request for assignment type %i from %s.\n", requestAssignment.getType(), qPrintable(senderSockAddr.getAddress().toString()));
|
||||
qDebug("Received a request for assignment type %i from %s.",
|
||||
requestAssignment.getType(), qPrintable(senderSockAddr.getAddress().toString()));
|
||||
|
||||
Assignment* assignmentToDeploy = deployableAssignmentForRequest(requestAssignment);
|
||||
|
||||
|
@ -249,7 +250,7 @@ void DomainServer::readAvailableDatagrams() {
|
|||
}
|
||||
|
||||
} else {
|
||||
qDebug("Received an invalid assignment request from %s.\n", qPrintable(senderSockAddr.getAddress().toString()));
|
||||
qDebug() << "Received an invalid assignment request from" << senderSockAddr.getAddress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -464,7 +465,7 @@ void DomainServer::civetwebUploadHandler(struct mg_connection *connection, const
|
|||
// rename the saved script to the GUID of the assignment and move it to the script host locaiton
|
||||
rename(path, newPath.toLocal8Bit().constData());
|
||||
|
||||
qDebug("Saved a script for assignment at %s\n", newPath.toLocal8Bit().constData());
|
||||
qDebug("Saved a script for assignment at %s", newPath.toLocal8Bit().constData());
|
||||
|
||||
// add the script assigment to the assignment queue
|
||||
// lock the assignment queue mutex since we're operating on a different thread than DS main
|
||||
|
@ -474,7 +475,7 @@ void DomainServer::civetwebUploadHandler(struct mg_connection *connection, const
|
|||
}
|
||||
|
||||
void DomainServer::addReleasedAssignmentBackToQueue(Assignment* releasedAssignment) {
|
||||
qDebug() << "Adding assignment" << *releasedAssignment << " back to queue.\n";
|
||||
qDebug() << "Adding assignment" << *releasedAssignment << " back to queue.";
|
||||
|
||||
// find this assignment in the static file
|
||||
for (int i = 0; i < MAX_STATIC_ASSIGNMENT_FILE_ASSIGNMENTS; i++) {
|
||||
|
@ -535,8 +536,8 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
|
||||
// Handle Domain/Voxel Server configuration command line arguments
|
||||
if (_voxelServerConfig) {
|
||||
qDebug("Reading Voxel Server Configuration.\n");
|
||||
qDebug() << "config: " << _voxelServerConfig << "\n";
|
||||
qDebug("Reading Voxel Server Configuration.");
|
||||
qDebug() << "config: " << _voxelServerConfig;
|
||||
|
||||
QString multiConfig((const char*) _voxelServerConfig);
|
||||
QStringList multiConfigList = multiConfig.split(";");
|
||||
|
@ -545,7 +546,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
for (int i = 0; i < multiConfigList.size(); i++) {
|
||||
QString config = multiConfigList.at(i);
|
||||
|
||||
qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData());
|
||||
qDebug("config[%d]=%s", i, config.toLocal8Bit().constData());
|
||||
|
||||
// Now, parse the config to check for a pool
|
||||
const char ASSIGNMENT_CONFIG_POOL_OPTION[] = "--pool";
|
||||
|
@ -558,7 +559,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
int spaceAfterPoolIndex = config.indexOf(' ', spaceBeforePoolIndex);
|
||||
|
||||
assignmentPool = config.mid(spaceBeforePoolIndex + 1, spaceAfterPoolIndex);
|
||||
qDebug() << "The pool for this voxel-assignment is" << assignmentPool << "\n";
|
||||
qDebug() << "The pool for this voxel-assignment is" << assignmentPool;
|
||||
}
|
||||
|
||||
Assignment voxelServerAssignment(Assignment::CreateCommand,
|
||||
|
@ -577,8 +578,8 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
|
||||
// Handle Domain/Particle Server configuration command line arguments
|
||||
if (_particleServerConfig) {
|
||||
qDebug("Reading Particle Server Configuration.\n");
|
||||
qDebug() << "config: " << _particleServerConfig << "\n";
|
||||
qDebug("Reading Particle Server Configuration.");
|
||||
qDebug() << "config: " << _particleServerConfig;
|
||||
|
||||
QString multiConfig((const char*) _particleServerConfig);
|
||||
QStringList multiConfigList = multiConfig.split(";");
|
||||
|
@ -587,7 +588,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
for (int i = 0; i < multiConfigList.size(); i++) {
|
||||
QString config = multiConfigList.at(i);
|
||||
|
||||
qDebug("config[%d]=%s\n", i, config.toLocal8Bit().constData());
|
||||
qDebug("config[%d]=%s", i, config.toLocal8Bit().constData());
|
||||
|
||||
// Now, parse the config to check for a pool
|
||||
const char ASSIGNMENT_CONFIG_POOL_OPTION[] = "--pool";
|
||||
|
@ -600,7 +601,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
int spaceAfterPoolIndex = config.indexOf(' ', spaceBeforePoolIndex);
|
||||
|
||||
assignmentPool = config.mid(spaceBeforePoolIndex + 1, spaceAfterPoolIndex);
|
||||
qDebug() << "The pool for this particle-assignment is" << assignmentPool << "\n";
|
||||
qDebug() << "The pool for this particle-assignment is" << assignmentPool;
|
||||
}
|
||||
|
||||
Assignment particleServerAssignment(Assignment::CreateCommand,
|
||||
|
@ -624,7 +625,7 @@ void DomainServer::prepopulateStaticAssignmentFile() {
|
|||
metavoxelAssignment.setPayload((const unsigned char*)_metavoxelServerConfig, strlen(_metavoxelServerConfig));
|
||||
}
|
||||
|
||||
qDebug() << "Adding" << numFreshStaticAssignments << "static assignments to fresh file.\n";
|
||||
qDebug() << "Adding" << numFreshStaticAssignments << "static assignments to fresh file.";
|
||||
|
||||
_staticAssignmentFile.open(QIODevice::WriteOnly);
|
||||
_staticAssignmentFile.write((char*) &freshStaticAssignments, sizeof(freshStaticAssignments));
|
||||
|
@ -787,7 +788,7 @@ void DomainServer::addStaticAssignmentsBackToQueueAfterRestart() {
|
|||
// this assignment has not been fulfilled - reset the UUID and add it to the assignment queue
|
||||
_staticAssignments[i].resetUUID();
|
||||
|
||||
qDebug() << "Adding static assignment to queue -" << _staticAssignments[i] << "\n";
|
||||
qDebug() << "Adding static assignment to queue -" << _staticAssignments[i];
|
||||
|
||||
_assignmentQueueMutex.lock();
|
||||
_assignmentQueue.push_back(&_staticAssignments[i]);
|
||||
|
|
|
@ -86,8 +86,9 @@ const float MIRROR_REARVIEW_DISTANCE = 0.65f;
|
|||
const float MIRROR_REARVIEW_BODY_DISTANCE = 2.3f;
|
||||
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString &message) {
|
||||
fprintf(stdout, "%s", message.toLocal8Bit().constData());
|
||||
Application::getInstance()->getLogger()->addMessage(message.toLocal8Bit().constData());
|
||||
QString messageWithNewLine = message + "\n";
|
||||
fprintf(stdout, "%s", messageWithNewLine.toLocal8Bit().constData());
|
||||
Application::getInstance()->getLogger()->addMessage(messageWithNewLine.toLocal8Bit().constData());
|
||||
}
|
||||
|
||||
Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||
|
@ -155,7 +156,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
// call Menu getInstance static method to set up the menu
|
||||
_window->setMenuBar(Menu::getInstance());
|
||||
|
||||
qDebug("[VERSION] Build sequence: %i\n", BUILD_VERSION);
|
||||
qDebug("[VERSION] Build sequence: %i", BUILD_VERSION);
|
||||
|
||||
unsigned int listenPort = 0; // bind to an ephemeral port by default
|
||||
const char** constArgv = const_cast<const char**>(argv);
|
||||
|
@ -310,7 +311,7 @@ void Application::storeSizeAndPosition() {
|
|||
}
|
||||
|
||||
void Application::initializeGL() {
|
||||
qDebug( "Created Display Window.\n" );
|
||||
qDebug( "Created Display Window.");
|
||||
|
||||
// initialize glut for shape drawing; Qt apparently initializes it on OS X
|
||||
#ifndef __APPLE__
|
||||
|
@ -325,15 +326,15 @@ void Application::initializeGL() {
|
|||
_viewFrustumOffsetCamera.setFarClip(500.0 * TREE_SCALE);
|
||||
|
||||
initDisplay();
|
||||
qDebug( "Initialized Display.\n" );
|
||||
qDebug( "Initialized Display.");
|
||||
|
||||
init();
|
||||
qDebug( "Init() complete.\n" );
|
||||
qDebug( "init() complete.");
|
||||
|
||||
// create thread for receipt of data via UDP
|
||||
if (_enableNetworkThread) {
|
||||
pthread_create(&_networkReceiveThread, NULL, networkReceive, NULL);
|
||||
qDebug("Network receive thread created.\n");
|
||||
qDebug("Network receive thread created.");
|
||||
}
|
||||
|
||||
// create thread for parsing of voxel data independent of the main network and rendering threads
|
||||
|
@ -342,7 +343,7 @@ void Application::initializeGL() {
|
|||
_voxelHideShowThread.initialize(_enableProcessVoxelsThread);
|
||||
_particleEditSender.initialize(_enableProcessVoxelsThread);
|
||||
if (_enableProcessVoxelsThread) {
|
||||
qDebug("Voxel parsing thread created.\n");
|
||||
qDebug("Voxel parsing thread created.");
|
||||
}
|
||||
|
||||
// call terminate before exiting
|
||||
|
@ -362,9 +363,7 @@ void Application::initializeGL() {
|
|||
if (_justStarted) {
|
||||
float startupTime = (usecTimestampNow() - usecTimestamp(&_applicationStartupTime)) / 1000000.0;
|
||||
_justStarted = false;
|
||||
char title[50];
|
||||
sprintf(title, "Interface: %4.2f seconds\n", startupTime);
|
||||
qDebug("%s", title);
|
||||
qDebug("Startup time: %4.2f seconds.", startupTime);
|
||||
const char LOGSTASH_INTERFACE_START_TIME_KEY[] = "interface-start-time";
|
||||
|
||||
// ask the Logstash class to record the startup time
|
||||
|
@ -1707,9 +1706,9 @@ void Application::exportVoxels() {
|
|||
|
||||
void Application::importVoxels() {
|
||||
if (_voxelImporter.exec()) {
|
||||
qDebug("[DEBUG] Import succedded.\n");
|
||||
qDebug("[DEBUG] Import succeeded.");
|
||||
} else {
|
||||
qDebug("[DEBUG] Import failed.\n");
|
||||
qDebug("[DEBUG] Import failed.");
|
||||
}
|
||||
|
||||
// restore the main window's active state
|
||||
|
@ -1890,7 +1889,7 @@ void Application::init() {
|
|||
if (Menu::getInstance()->getAudioJitterBufferSamples() != 0) {
|
||||
_audio.setJitterBufferSamples(Menu::getInstance()->getAudioJitterBufferSamples());
|
||||
}
|
||||
qDebug("Loaded settings.\n");
|
||||
qDebug("Loaded settings");
|
||||
|
||||
if (!_profile.getUsername().isEmpty()) {
|
||||
// we have a username for this avatar, ask the data-server for the mesh URL for this avatar
|
||||
|
@ -2784,7 +2783,7 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
}
|
||||
|
||||
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||
qDebug("Servers: total %d, in view %d, unknown jurisdiction %d \n",
|
||||
qDebug("Servers: total %d, in view %d, unknown jurisdiction %d",
|
||||
totalServers, inViewServers, unknownJurisdictionServers);
|
||||
}
|
||||
|
||||
|
@ -2805,7 +2804,7 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
}
|
||||
|
||||
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||
qDebug("perServerPPS: %d perUnknownServer: %d\n", perServerPPS, perUnknownServer);
|
||||
qDebug("perServerPPS: %d perUnknownServer: %d", perServerPPS, perUnknownServer);
|
||||
}
|
||||
|
||||
for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
|
||||
|
@ -2824,7 +2823,7 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
if (jurisdictions.find(nodeUUID) == jurisdictions.end()) {
|
||||
unknownView = true; // assume it's in view
|
||||
if (wantExtraDebugging) {
|
||||
qDebug() << "no known jurisdiction for node " << *node << ", assume it's visible.\n";
|
||||
qDebug() << "no known jurisdiction for node " << *node << ", assume it's visible.";
|
||||
}
|
||||
} else {
|
||||
const JurisdictionMap& map = (jurisdictions)[nodeUUID];
|
||||
|
@ -2845,7 +2844,7 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
}
|
||||
} else {
|
||||
if (wantExtraDebugging) {
|
||||
qDebug() << "Jurisdiction without RootCode for node " << *node << ". That's unusual!\n";
|
||||
qDebug() << "Jurisdiction without RootCode for node " << *node << ". That's unusual!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2855,7 +2854,7 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
} else if (unknownView) {
|
||||
if (wantExtraDebugging) {
|
||||
qDebug() << "no known jurisdiction for node " << *node << ", give it budget of "
|
||||
<< perUnknownServer << " to send us jurisdiction.\n";
|
||||
<< perUnknownServer << " to send us jurisdiction.";
|
||||
}
|
||||
|
||||
// set the query's position/orientation to be degenerate in a manner that will get the scene quickly
|
||||
|
@ -2868,11 +2867,11 @@ void Application::queryOctree(NODE_TYPE serverType, PACKET_TYPE packetType, Node
|
|||
_voxelQuery.setCameraNearClip(0.1);
|
||||
_voxelQuery.setCameraFarClip(0.1);
|
||||
if (wantExtraDebugging) {
|
||||
qDebug() << "Using 'minimal' camera position for node " << *node << "\n";
|
||||
qDebug() << "Using 'minimal' camera position for node" << *node;
|
||||
}
|
||||
} else {
|
||||
if (wantExtraDebugging) {
|
||||
qDebug() << "Using regular camera position for node " << *node << "\n";
|
||||
qDebug() << "Using regular camera position for node" << *node;
|
||||
}
|
||||
}
|
||||
_voxelQuery.setMaxOctreePacketsPerSecond(perUnknownServer);
|
||||
|
@ -3729,9 +3728,6 @@ glm::vec2 Application::getScaledScreenPoint(glm::vec2 projectedPoint) {
|
|||
|
||||
// render the coverage map on screen
|
||||
void Application::renderCoverageMapV2() {
|
||||
|
||||
//qDebug("renderCoverageMap()\n");
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glLineWidth(2.0);
|
||||
glBegin(GL_LINES);
|
||||
|
@ -3775,8 +3771,6 @@ void Application::renderCoverageMapsV2Recursively(CoverageMapV2* map) {
|
|||
// render the coverage map on screen
|
||||
void Application::renderCoverageMap() {
|
||||
|
||||
//qDebug("renderCoverageMap()\n");
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glLineWidth(2.0);
|
||||
glBegin(GL_LINES);
|
||||
|
@ -4180,7 +4174,7 @@ void Application::updateWindowTitle(){
|
|||
title += _profile.getLastDomain();
|
||||
title += buildVersion;
|
||||
|
||||
qDebug("Application title set to: %s.\n", title.toStdString().c_str());
|
||||
qDebug("Application title set to: %s", title.toStdString().c_str());
|
||||
_window->setWindowTitle(title);
|
||||
}
|
||||
|
||||
|
@ -4199,7 +4193,7 @@ void Application::domainChanged(QString domain) {
|
|||
_particleServerJurisdictions.clear();
|
||||
|
||||
// reset our persist thread
|
||||
qDebug() << "domainChanged()... domain=" << domain << " swapping persist cache\n";
|
||||
qDebug() << "Domain changed to" << domain << ". Swapping persist cache.";
|
||||
updateLocalOctreeCache();
|
||||
}
|
||||
|
||||
|
@ -4476,14 +4470,12 @@ void Application::loadScript() {
|
|||
QByteArray fileNameAscii = fileNameString.toLocal8Bit();
|
||||
const char* fileName = fileNameAscii.data();
|
||||
|
||||
printf("fileName:%s\n",fileName);
|
||||
|
||||
std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate);
|
||||
if(!file.is_open()) {
|
||||
printf("error loading file\n");
|
||||
qDebug("Error loading file %s", fileName);
|
||||
return;
|
||||
}
|
||||
qDebug("loading file %s...\n", fileName);
|
||||
qDebug("Loading file %s...", fileName);
|
||||
|
||||
// get file length....
|
||||
unsigned long fileLength = file.tellg();
|
||||
|
@ -4575,7 +4567,7 @@ void Application::updateLocalOctreeCache(bool firstTime) {
|
|||
_persistThread = new OctreePersistThread(_voxels.getTree(),
|
||||
localVoxelCacheFileName.toLocal8Bit().constData(),LOCAL_CACHE_PERSIST_INTERVAL);
|
||||
|
||||
qDebug() << "updateLocalOctreeCache()... localVoxelCacheFileName=" << localVoxelCacheFileName << "\n";
|
||||
qDebug() << "updateLocalOctreeCache()... localVoxelCacheFileName=" << localVoxelCacheFileName;
|
||||
|
||||
if (_persistThread) {
|
||||
_voxels.beginLoadingLocalVoxelCache(); // while local voxels are importing, don't do individual node VBO updates
|
||||
|
|
|
@ -136,8 +136,8 @@ bool adjustedFormatForAudioDevice(const QAudioDeviceInfo& audioDevice,
|
|||
const QAudioFormat& desiredAudioFormat,
|
||||
QAudioFormat& adjustedAudioFormat) {
|
||||
if (!audioDevice.isFormatSupported(desiredAudioFormat)) {
|
||||
qDebug() << "The desired format for audio I/O is" << desiredAudioFormat << "\n";
|
||||
qDebug() << "The desired audio format is not supported by this device.\n";
|
||||
qDebug() << "The desired format for audio I/O is" << desiredAudioFormat;
|
||||
qDebug("The desired audio format is not supported by this device");
|
||||
|
||||
if (desiredAudioFormat.channelCount() == 1) {
|
||||
adjustedAudioFormat = desiredAudioFormat;
|
||||
|
@ -244,10 +244,10 @@ void Audio::start() {
|
|||
|
||||
QAudioDeviceInfo inputDeviceInfo = defaultAudioDeviceForMode(QAudio::AudioInput);
|
||||
|
||||
qDebug() << "The audio input device is" << inputDeviceInfo.deviceName() << "\n";
|
||||
qDebug() << "The audio input device is" << inputDeviceInfo.deviceName();
|
||||
|
||||
if (adjustedFormatForAudioDevice(inputDeviceInfo, _desiredInputFormat, _inputFormat)) {
|
||||
qDebug() << "The format to be used for audio input is" << _inputFormat << "\n";
|
||||
qDebug() << "The format to be used for audio input is" << _inputFormat;
|
||||
|
||||
_audioInput = new QAudioInput(inputDeviceInfo, _inputFormat, this);
|
||||
_numInputCallbackBytes = NETWORK_BUFFER_LENGTH_BYTES_PER_CHANNEL * _inputFormat.channelCount()
|
||||
|
@ -257,10 +257,10 @@ void Audio::start() {
|
|||
|
||||
QAudioDeviceInfo outputDeviceInfo = defaultAudioDeviceForMode(QAudio::AudioOutput);
|
||||
|
||||
qDebug() << "The audio output device is" << outputDeviceInfo.deviceName() << "\n";
|
||||
qDebug() << "The audio output device is" << outputDeviceInfo.deviceName();
|
||||
|
||||
if (adjustedFormatForAudioDevice(outputDeviceInfo, _desiredOutputFormat, _outputFormat)) {
|
||||
qDebug() << "The format to be used for audio output is" << _outputFormat << "\n";
|
||||
qDebug() << "The format to be used for audio output is" << _outputFormat;
|
||||
|
||||
_inputRingBuffer.resizeForFrameSize(_numInputCallbackBytes * CALLBACK_ACCELERATOR_RATIO / sizeof(int16_t));
|
||||
_inputDevice = _audioInput->start();
|
||||
|
@ -279,7 +279,7 @@ void Audio::start() {
|
|||
return;
|
||||
}
|
||||
|
||||
qDebug() << "Unable to set up audio I/O because of a problem with input or output formats.\n";
|
||||
qDebug() << "Unable to set up audio I/O because of a problem with input or output formats.";
|
||||
}
|
||||
|
||||
void Audio::handleAudioInput() {
|
||||
|
@ -448,7 +448,7 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
|
|||
if (!_ringBuffer.isNotStarvedOrHasMinimumSamples(NETWORK_BUFFER_LENGTH_SAMPLES_STEREO
|
||||
+ (_jitterBufferSamples * 2))) {
|
||||
// starved and we don't have enough to start, keep waiting
|
||||
qDebug() << "Buffer is starved and doesn't have enough samples to start. Held back.\n";
|
||||
qDebug() << "Buffer is starved and doesn't have enough samples to start. Held back.";
|
||||
} else {
|
||||
// We are either already playing back, or we have enough audio to start playing back.
|
||||
_ringBuffer.setIsStarved(false);
|
||||
|
@ -518,7 +518,7 @@ void Audio::addReceivedAudioToBuffer(const QByteArray& audioByteArray) {
|
|||
} else if (_audioOutput->bytesFree() == _audioOutput->bufferSize()) {
|
||||
// we don't have any audio data left in the output buffer, and the ring buffer from
|
||||
// the network has nothing in it either - we just starved
|
||||
qDebug() << "Audio output just starved.\n";
|
||||
qDebug() << "Audio output just starved.";
|
||||
_ringBuffer.setIsStarved(true);
|
||||
_numFramesDisplayStarve = 10;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ BuckyBalls::BuckyBalls() {
|
|||
colors[1] = glm::vec3(0.64f, 0.16f, 0.16f);
|
||||
colors[2] = glm::vec3(0.31f, 0.58f, 0.80f);
|
||||
|
||||
qDebug("Creating buckyballs...\n");
|
||||
qDebug("Creating buckyballs...");
|
||||
for (int i = 0; i < NUM_BBALLS; i++) {
|
||||
_bballPosition[i] = CORNER_BBALLS + randVector() * RANGE_BBALLS;
|
||||
int element = (rand() % NUM_ELEMENTS);
|
||||
|
|
|
@ -140,7 +140,7 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
|
|||
if (keyList[i] == DataServerKey::FaceMeshURL) {
|
||||
|
||||
if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {
|
||||
qDebug("Changing user's face model URL to %s\n", valueList[i].toLocal8Bit().constData());
|
||||
qDebug("Changing user's face model URL to %s", valueList[i].toLocal8Bit().constData());
|
||||
Application::getInstance()->getProfile()->setFaceModelURL(QUrl(valueList[i]));
|
||||
} else {
|
||||
// mesh URL for a UUID, find avatar in our list
|
||||
|
@ -159,7 +159,7 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
|
|||
} else if (keyList[i] == DataServerKey::SkeletonURL) {
|
||||
|
||||
if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {
|
||||
qDebug("Changing user's skeleton URL to %s\n", valueList[i].toLocal8Bit().constData());
|
||||
qDebug("Changing user's skeleton URL to %s", valueList[i].toLocal8Bit().constData());
|
||||
Application::getInstance()->getProfile()->setSkeletonModelURL(QUrl(valueList[i]));
|
||||
} else {
|
||||
// skeleton URL for a UUID, find avatar in our list
|
||||
|
@ -190,7 +190,7 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
|
|||
qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() <<
|
||||
", position to" << valueList[i + 1].toLocal8Bit().constData() <<
|
||||
", and orientation to" << valueList[i + 2].toLocal8Bit().constData() <<
|
||||
"to go to" << userString << "\n";
|
||||
"to go to" << userString;
|
||||
|
||||
NodeList::getInstance()->setDomainHostname(valueList[i]);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ Environment::~Environment() {
|
|||
|
||||
void Environment::init() {
|
||||
if (_initialized) {
|
||||
qDebug("[ERROR] Environment is already initialized.\n");
|
||||
qDebug("[ERROR] Environment is already initialized.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ Menu* Menu::getInstance() {
|
|||
menuInstanceMutex.lock();
|
||||
|
||||
if (!_instance) {
|
||||
qDebug("First call to Menu::getInstance() - initing menu.\n");
|
||||
qDebug("First call to Menu::getInstance() - initing menu.");
|
||||
|
||||
_instance = new Menu();
|
||||
}
|
||||
|
@ -978,7 +978,7 @@ void Menu::goToLocation() {
|
|||
// send a node kill request, indicating to other clients that they should play the "disappeared" effect
|
||||
NodeList::getInstance()->sendKillNode(&NODE_TYPE_AVATAR_MIXER, 1);
|
||||
|
||||
qDebug("Going To Location: %f, %f, %f...\n", x, y, z);
|
||||
qDebug("Going To Location: %f, %f, %f...", x, y, z);
|
||||
myAvatar->setPosition(newAvatarPos);
|
||||
}
|
||||
}
|
||||
|
@ -1027,7 +1027,7 @@ void Menu::pasteToVoxel() {
|
|||
if (locationToPaste == octalCodeToHexString(octalCodeDestination)) {
|
||||
Application::getInstance()->pasteVoxelsToOctalCode(octalCodeDestination);
|
||||
} else {
|
||||
qDebug() << "problem with octcode...\n";
|
||||
qDebug() << "Problem with octcode...";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#include <cstring>
|
||||
#include <algorithm>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include "InterfaceConfig.h"
|
||||
|
||||
#include "Oscilloscope.h"
|
||||
|
|
|
@ -47,7 +47,7 @@ void PairingHandler::sendPairRequest() {
|
|||
(localAddress >> 24) & 0xFF,
|
||||
NodeList::getInstance()->getNodeSocket().localPort());
|
||||
|
||||
qDebug("Sending pair packet: %s\n", pairPacket);
|
||||
qDebug("Sending pair packet: %s", pairPacket);
|
||||
|
||||
HifiSockAddr pairingServerSocket(PAIRING_SERVER_HOSTNAME, PAIRING_SERVER_PORT);
|
||||
|
||||
|
|
|
@ -610,7 +610,7 @@ void runTimingTests() {
|
|||
gettimeofday(&endTime, NULL);
|
||||
}
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("gettimeofday() usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
qDebug("gettimeofday() usecs: %f", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
|
||||
// Random number generation
|
||||
gettimeofday(&startTime, NULL);
|
||||
|
@ -619,7 +619,7 @@ void runTimingTests() {
|
|||
}
|
||||
gettimeofday(&endTime, NULL);
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("rand() stored in array usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
qDebug("rand() stored in array usecs: %f", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
|
||||
// Random number generation using randFloat()
|
||||
gettimeofday(&startTime, NULL);
|
||||
|
@ -628,7 +628,7 @@ void runTimingTests() {
|
|||
}
|
||||
gettimeofday(&endTime, NULL);
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("randFloat() stored in array usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
qDebug("randFloat() stored in array usecs: %f", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
|
||||
// PowF function
|
||||
fTest = 1145323.2342f;
|
||||
|
@ -638,7 +638,7 @@ void runTimingTests() {
|
|||
}
|
||||
gettimeofday(&endTime, NULL);
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("powf(f, 0.5) usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
qDebug("powf(f, 0.5) usecs: %f", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
|
||||
// Vector Math
|
||||
float distance;
|
||||
|
@ -651,7 +651,7 @@ void runTimingTests() {
|
|||
}
|
||||
gettimeofday(&endTime, NULL);
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("vector math usecs: %f [%f msecs total for %d tests]\n",
|
||||
qDebug("vector math usecs: %f [%f msecs total for %d tests]",
|
||||
1000.0f * elapsedMsecs / (float) numTests, elapsedMsecs, numTests);
|
||||
|
||||
// Vec3 test
|
||||
|
@ -665,7 +665,7 @@ void runTimingTests() {
|
|||
}
|
||||
gettimeofday(&endTime, NULL);
|
||||
elapsedMsecs = diffclock(&startTime, &endTime);
|
||||
qDebug("vec3 assign and dot() usecs: %f\n", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
qDebug("vec3 assign and dot() usecs: %f", 1000.0f * elapsedMsecs / (float) numTests);
|
||||
}
|
||||
|
||||
float loadSetting(QSettings* settings, const char* name, float defaultValue) {
|
||||
|
|
|
@ -33,7 +33,7 @@ bool VoxelHideShowThread::process() {
|
|||
|
||||
bool showExtraDebugging = Application::getInstance()->getLogger()->extraDebugging();
|
||||
if (showExtraDebugging && elapsed > USECS_PER_FRAME) {
|
||||
qDebug() << "VoxelHideShowThread::process()... checkForCulling took " << elapsed << "\n";
|
||||
qDebug() << "VoxelHideShowThread::process()... checkForCulling took" << elapsed;
|
||||
}
|
||||
|
||||
if (isStillRunning()) {
|
||||
|
|
|
@ -181,7 +181,7 @@ void ImportTask::run() {
|
|||
} else if (_filename.endsWith(".schematic", Qt::CaseInsensitive)) {
|
||||
voxelSystem->readFromSchematicFile(_filename.toLocal8Bit().data());
|
||||
} else {
|
||||
qDebug("[ERROR] Invalid file extension.\n");
|
||||
qDebug("[ERROR] Invalid file extension.");
|
||||
}
|
||||
|
||||
voxelSystem->getTree()->reaverageOctreeElements();
|
||||
|
|
|
@ -21,7 +21,7 @@ void VoxelPacketProcessor::processPacket(const HifiSockAddr& senderSockAddr, uns
|
|||
const int WAY_BEHIND = 300;
|
||||
|
||||
if (packetsToProcessCount() > WAY_BEHIND && Application::getInstance()->getLogger()->extraDebugging()) {
|
||||
qDebug("VoxelPacketProcessor::processPacket() packets to process=%d\n", packetsToProcessCount());
|
||||
qDebug("VoxelPacketProcessor::processPacket() packets to process=%d", packetsToProcessCount());
|
||||
}
|
||||
ssize_t messageLength = packetLength;
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ glBufferIndex VoxelSystem::getNextBufferIndex() {
|
|||
// will be "invisible"
|
||||
void VoxelSystem::freeBufferIndex(glBufferIndex index) {
|
||||
if (_voxelsInWriteArrays == 0) {
|
||||
qDebug() << "freeBufferIndex() called when _voxelsInWriteArrays == 0!!!!\n";
|
||||
qDebug() << "freeBufferIndex() called when _voxelsInWriteArrays == 0!";
|
||||
}
|
||||
|
||||
// if the "freed" index was our max index, then just drop the _voxelsInWriteArrays down one...
|
||||
|
@ -214,7 +214,7 @@ void VoxelSystem::freeBufferIndex(glBufferIndex index) {
|
|||
if (Menu::getInstance()->isOptionChecked(MenuOption::AutomaticallyAuditTree)) {
|
||||
for (long i = 0; i < _freeIndexes.size(); i++) {
|
||||
if (_freeIndexes[i] == index) {
|
||||
printf("freeBufferIndex(glBufferIndex index)... index=%ld already in free list!\n", index);
|
||||
printf("freeBufferIndex(glBufferIndex index)... index=%ld already in free list!", index);
|
||||
inList = true;
|
||||
break;
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) {
|
|||
if (Application::getInstance()->getLogger()->extraDebugging()) {
|
||||
qDebug("VoxelSystem::parseData() ... Got Packet Section"
|
||||
" color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d"
|
||||
" subsection:%d sectionLength:%d uncompressed:%d\n",
|
||||
" subsection:%d sectionLength:%d uncompressed:%d",
|
||||
debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
|
||||
sequence, flightTime, numBytes, dataBytes, subsection, sectionLength, packetData.getUncompressedSize());
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ void VoxelSystem::setupNewVoxelsForDrawing() {
|
|||
|
||||
bool extraDebugging = Application::getInstance()->getLogger()->extraDebugging();
|
||||
if (extraDebugging) {
|
||||
qDebug("setupNewVoxelsForDrawing()... _voxelsUpdated=%lu...\n",_voxelsUpdated);
|
||||
qDebug("setupNewVoxelsForDrawing()... _voxelsUpdated=%lu...",_voxelsUpdated);
|
||||
_viewFrustum->printDebugDetails();
|
||||
}
|
||||
}
|
||||
|
@ -801,7 +801,7 @@ void VoxelSystem::cleanupRemovedVoxels() {
|
|||
// This handles cleanup of voxels that were culled as part of our regular out of view culling operation
|
||||
if (!_removedVoxels.isEmpty()) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
|
||||
qDebug() << "cleanupRemovedVoxels().. _removedVoxels=" << _removedVoxels.count() << "\n";
|
||||
qDebug() << "cleanupRemovedVoxels().. _removedVoxels=" << _removedVoxels.count();
|
||||
}
|
||||
while (!_removedVoxels.isEmpty()) {
|
||||
delete _removedVoxels.extract();
|
||||
|
@ -815,7 +815,7 @@ void VoxelSystem::cleanupRemovedVoxels() {
|
|||
if (!_writeRenderFullVBO && (_abandonedVBOSlots > (_voxelsInWriteArrays * TOO_MANY_ABANDONED_RATIO))) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
|
||||
qDebug() << "cleanupRemovedVoxels().. _abandonedVBOSlots ["
|
||||
<< _abandonedVBOSlots << "] > TOO_MANY_ABANDONED_RATIO \n";
|
||||
<< _abandonedVBOSlots << "] > TOO_MANY_ABANDONED_RATIO";
|
||||
}
|
||||
_writeRenderFullVBO = true;
|
||||
}
|
||||
|
@ -982,7 +982,7 @@ int VoxelSystem::updateNodeInArrays(VoxelTreeElement* node, bool reuseIndex, boo
|
|||
// possibly shifting down to lower LOD or something. This debug message is to help identify, if/when/how this
|
||||
// state actually occurs.
|
||||
if (Application::getInstance()->getLogger()->extraDebugging()) {
|
||||
qDebug("OHHHH NOOOOOO!!!! updateNodeInArrays() BAILING (_voxelsInWriteArrays >= _maxVoxels)\n");
|
||||
qDebug("OH NO! updateNodeInArrays() BAILING (_voxelsInWriteArrays >= _maxVoxels)");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ ProgramObject VoxelSystem::_shadowMapProgram;
|
|||
|
||||
void VoxelSystem::init() {
|
||||
if (_initialized) {
|
||||
qDebug("[ERROR] VoxelSystem is already initialized.\n");
|
||||
qDebug("[ERROR] VoxelSystem is already initialized.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1436,7 +1436,7 @@ void VoxelSystem::clearAllNodesBufferIndex() {
|
|||
_tree->recurseTreeWithOperation(clearAllNodesBufferIndexOperation);
|
||||
unlockTree();
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings)) {
|
||||
qDebug("clearing buffer index of %d nodes\n", _nodeCount);
|
||||
qDebug("clearing buffer index of %d nodes", _nodeCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1449,7 +1449,7 @@ bool VoxelSystem::forceRedrawEntireTreeOperation(OctreeElement* element, void* e
|
|||
void VoxelSystem::forceRedrawEntireTree() {
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(forceRedrawEntireTreeOperation);
|
||||
qDebug("forcing redraw of %d nodes\n", _nodeCount);
|
||||
qDebug("forcing redraw of %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1467,7 +1467,7 @@ bool VoxelSystem::randomColorOperation(OctreeElement* element, void* extraData)
|
|||
void VoxelSystem::randomizeVoxelColors() {
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(randomColorOperation);
|
||||
qDebug("setting randomized true color for %d nodes\n", _nodeCount);
|
||||
qDebug("setting randomized true color for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1483,7 +1483,7 @@ bool VoxelSystem::falseColorizeRandomOperation(OctreeElement* element, void* ext
|
|||
void VoxelSystem::falseColorizeRandom() {
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(falseColorizeRandomOperation);
|
||||
qDebug("setting randomized false color for %d nodes\n", _nodeCount);
|
||||
qDebug("setting randomized false color for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1499,7 +1499,7 @@ void VoxelSystem::trueColorize() {
|
|||
PerformanceWarning warn(true, "trueColorize()",true);
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(trueColorizeOperation);
|
||||
qDebug("setting true color for %d nodes\n", _nodeCount);
|
||||
qDebug("setting true color for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1521,7 +1521,7 @@ bool VoxelSystem::falseColorizeInViewOperation(OctreeElement* element, void* ext
|
|||
void VoxelSystem::falseColorizeInView() {
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)_viewFrustum);
|
||||
qDebug("setting in view false color for %d nodes\n", _nodeCount);
|
||||
qDebug("setting in view false color for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1626,7 +1626,7 @@ void VoxelSystem::falseColorizeBySource() {
|
|||
}
|
||||
|
||||
_tree->recurseTreeWithOperation(falseColorizeBySourceOperation, &args);
|
||||
qDebug("setting false color by source for %d nodes\n", _nodeCount);
|
||||
qDebug("setting false color by source for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1679,10 +1679,10 @@ void VoxelSystem::falseColorizeDistanceFromView() {
|
|||
_maxDistance = 0.0;
|
||||
_minDistance = FLT_MAX;
|
||||
_tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation, (void*) _viewFrustum);
|
||||
qDebug("determining distance range for %d nodes\n", _nodeCount);
|
||||
qDebug("determining distance range for %d nodes", _nodeCount);
|
||||
_nodeCount = 0;
|
||||
_tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation, (void*) _viewFrustum);
|
||||
qDebug("setting in distance false color for %d nodes\n", _nodeCount);
|
||||
qDebug("setting in distance false color for %d nodes", _nodeCount);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
}
|
||||
|
@ -1813,7 +1813,7 @@ void VoxelSystem::removeOutOfView() {
|
|||
}
|
||||
bool showRemoveDebugDetails = false;
|
||||
if (showRemoveDebugDetails) {
|
||||
qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d \n",
|
||||
qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d",
|
||||
args.nodesScanned, args.nodesRemoved, args.nodesInside,
|
||||
args.nodesIntersect, args.nodesOutside, _removedVoxels.count()
|
||||
);
|
||||
|
@ -1842,7 +1842,7 @@ void VoxelSystem::showAllLocalVoxels() {
|
|||
|
||||
bool showRemoveDebugDetails = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||
if (showRemoveDebugDetails) {
|
||||
qDebug("showAllLocalVoxels() scanned=%ld \n",args.nodesScanned );
|
||||
qDebug("showAllLocalVoxels() scanned=%ld",args.nodesScanned );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1979,15 +1979,15 @@ void VoxelSystem::hideOutOfView(bool forceFullFrustum) {
|
|||
|
||||
bool extraDebugDetails = false; // Application::getInstance()->getLogger()->extraDebugging();
|
||||
if (extraDebugDetails) {
|
||||
qDebug("hideOutOfView() scanned=%ld removed=%ld show=%ld inside=%ld intersect=%ld outside=%ld\n",
|
||||
qDebug("hideOutOfView() scanned=%ld removed=%ld show=%ld inside=%ld intersect=%ld outside=%ld",
|
||||
args.nodesScanned, args.nodesRemoved, args.nodesShown, args.nodesInside,
|
||||
args.nodesIntersect, args.nodesOutside
|
||||
);
|
||||
qDebug(" inside/inside=%ld intersect/inside=%ld outside/outside=%ld\n",
|
||||
qDebug("inside/inside=%ld intersect/inside=%ld outside/outside=%ld",
|
||||
args.nodesInsideInside, args.nodesIntersectInside, args.nodesOutsideOutside
|
||||
);
|
||||
|
||||
qDebug() << "args.thisViewFrustum....\n";
|
||||
qDebug() << "args.thisViewFrustum....";
|
||||
args.thisViewFrustum.printDebugDetails();
|
||||
}
|
||||
_inhideOutOfView = false;
|
||||
|
@ -2224,7 +2224,7 @@ bool VoxelSystem::falseColorizeRandomEveryOtherOperation(OctreeElement* element,
|
|||
void VoxelSystem::falseColorizeRandomEveryOther() {
|
||||
falseColorizeRandomEveryOtherArgs args;
|
||||
_tree->recurseTreeWithOperation(falseColorizeRandomEveryOtherOperation,&args);
|
||||
qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld\n",
|
||||
qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld",
|
||||
args.totalNodes, args.colorableNodes, args.coloredNodes);
|
||||
_tree->setDirtyBit();
|
||||
setupNewVoxelsForDrawing();
|
||||
|
@ -2294,14 +2294,14 @@ bool VoxelSystem::collectStatsForTreesAndVBOsOperation(OctreeElement* element, v
|
|||
|
||||
const bool extraDebugging = false; // enable for extra debugging
|
||||
if (extraDebugging) {
|
||||
qDebug("node In VBO... [%f,%f,%f] %f ... index=%ld, isDirty=%s, shouldRender=%s \n",
|
||||
qDebug("node In VBO... [%f,%f,%f] %f ... index=%ld, isDirty=%s, shouldRender=%s",
|
||||
voxel->getCorner().x, voxel->getCorner().y, voxel->getCorner().z, voxel->getScale(),
|
||||
nodeIndex, debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));
|
||||
}
|
||||
|
||||
if (args->hasIndexFound[nodeIndex]) {
|
||||
args->duplicateVBOIndex++;
|
||||
qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s \n", nodeIndex,
|
||||
qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s", nodeIndex,
|
||||
debug::valueOf(voxel->isDirty()), debug::valueOf(voxel->getShouldRender()));
|
||||
} else {
|
||||
args->hasIndexFound[nodeIndex] = true;
|
||||
|
@ -2335,17 +2335,17 @@ void VoxelSystem::collectStatsForTreesAndVBOs() {
|
|||
collectStatsForTreesAndVBOsArgs args(_maxVoxels);
|
||||
args.expectedMax = _voxelsInWriteArrays;
|
||||
|
||||
qDebug("CALCULATING Local Voxel Tree Statistics >>>>>>>>>>>>\n");
|
||||
qDebug("CALCULATING Local Voxel Tree Statistics >>>>>>>>>>>>");
|
||||
|
||||
_tree->recurseTreeWithOperation(collectStatsForTreesAndVBOsOperation,&args);
|
||||
|
||||
qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld \n",
|
||||
qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld",
|
||||
args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes);
|
||||
|
||||
qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld \n", debug::valueOf(_voxelsDirty),
|
||||
qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld", debug::valueOf(_voxelsDirty),
|
||||
_voxelsInWriteArrays, minDirty, maxDirty);
|
||||
|
||||
qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld \n",
|
||||
qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld",
|
||||
args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender);
|
||||
|
||||
glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN;
|
||||
|
@ -2358,13 +2358,13 @@ void VoxelSystem::collectStatsForTreesAndVBOs() {
|
|||
}
|
||||
}
|
||||
|
||||
qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld \n",
|
||||
qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld",
|
||||
minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);
|
||||
|
||||
qDebug(" _freeIndexes.size()=%ld \n",
|
||||
qDebug(" _freeIndexes.size()=%ld",
|
||||
_freeIndexes.size());
|
||||
|
||||
qDebug("DONE WITH Local Voxel Tree Statistics >>>>>>>>>>>>\n");
|
||||
qDebug("DONE WITH Local Voxel Tree Statistics >>>>>>>>>>>>");
|
||||
}
|
||||
|
||||
|
||||
|
@ -2550,7 +2550,7 @@ void VoxelSystem::falseColorizeOccluded() {
|
|||
|
||||
_tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedOperation, position, (void*)&args);
|
||||
|
||||
qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld\n",
|
||||
qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld",
|
||||
position.x, position.y,
|
||||
args.totalVoxels, args.coloredVoxels, args.occludedVoxels,
|
||||
args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped,
|
||||
|
@ -2685,7 +2685,7 @@ void VoxelSystem::falseColorizeOccludedV2() {
|
|||
|
||||
void VoxelSystem::nodeAdded(Node* node) {
|
||||
if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
|
||||
qDebug("VoxelSystem... voxel server %s added...\n", node->getUUID().toString().toLocal8Bit().constData());
|
||||
qDebug("VoxelSystem... voxel server %s added...", node->getUUID().toString().toLocal8Bit().constData());
|
||||
_voxelServerCount++;
|
||||
}
|
||||
}
|
||||
|
@ -2708,7 +2708,7 @@ void VoxelSystem::nodeKilled(Node* node) {
|
|||
if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
|
||||
_voxelServerCount--;
|
||||
QUuid nodeUUID = node->getUUID();
|
||||
qDebug("VoxelSystem... voxel server %s removed...\n", nodeUUID.toString().toLocal8Bit().constData());
|
||||
qDebug("VoxelSystem... voxel server %s removed...", nodeUUID.toString().toLocal8Bit().constData());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2777,7 +2777,7 @@ void VoxelSystem::unlockTree() {
|
|||
|
||||
|
||||
void VoxelSystem::localVoxelCacheLoaded() {
|
||||
qDebug() << "localVoxelCacheLoaded()\n";
|
||||
qDebug() << "localVoxelCacheLoaded()";
|
||||
|
||||
// Make sure that the application has properly set up the view frustum for our loaded state
|
||||
Application::getInstance()->initAvatarAndViewFrustum();
|
||||
|
@ -2790,11 +2790,11 @@ void VoxelSystem::localVoxelCacheLoaded() {
|
|||
}
|
||||
|
||||
void VoxelSystem::beginLoadingLocalVoxelCache() {
|
||||
qDebug() << "beginLoadingLocalVoxelCache()\n";
|
||||
qDebug() << "beginLoadingLocalVoxelCache()";
|
||||
_writeRenderFullVBO = true; // this will disable individual node updates
|
||||
_inhideOutOfView = true; // this will disable hidOutOfView which we want to do until local cache is loaded
|
||||
killLocalVoxels();
|
||||
qDebug() << "DONE beginLoadingLocalVoxelCache()\n";
|
||||
qDebug() << "DONE beginLoadingLocalVoxelCache()";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -434,27 +434,27 @@ void Avatar::renderJointConnectingCone(glm::vec3 position1, glm::vec3 position2,
|
|||
}
|
||||
|
||||
void Avatar::goHome() {
|
||||
qDebug("Going Home!\n");
|
||||
qDebug("Going Home!");
|
||||
setPosition(START_LOCATION);
|
||||
}
|
||||
|
||||
void Avatar::increaseSize() {
|
||||
if ((1.f + SCALING_RATIO) * _targetScale < MAX_AVATAR_SCALE) {
|
||||
_targetScale *= (1.f + SCALING_RATIO);
|
||||
qDebug("Changed scale to %f\n", _targetScale);
|
||||
qDebug("Changed scale to %f", _targetScale);
|
||||
}
|
||||
}
|
||||
|
||||
void Avatar::decreaseSize() {
|
||||
if (MIN_AVATAR_SCALE < (1.f - SCALING_RATIO) * _targetScale) {
|
||||
_targetScale *= (1.f - SCALING_RATIO);
|
||||
qDebug("Changed scale to %f\n", _targetScale);
|
||||
qDebug("Changed scale to %f", _targetScale);
|
||||
}
|
||||
}
|
||||
|
||||
void Avatar::resetSize() {
|
||||
_targetScale = 1.0f;
|
||||
qDebug("Reseted scale to %f\n", _targetScale);
|
||||
qDebug("Reseted scale to %f", _targetScale);
|
||||
}
|
||||
|
||||
void Avatar::setScale(const float scale) {
|
||||
|
|
|
@ -116,7 +116,7 @@ void Faceshift::setTCPEnabled(bool enabled) {
|
|||
void Faceshift::connectSocket() {
|
||||
if (_tcpEnabled) {
|
||||
if (!_tcpRetryCount) {
|
||||
qDebug("Faceshift: Connecting...\n");
|
||||
qDebug("Faceshift: Connecting...");
|
||||
}
|
||||
|
||||
_tcpSocket.connectToHost("localhost", FACESHIFT_PORT);
|
||||
|
@ -125,7 +125,7 @@ void Faceshift::connectSocket() {
|
|||
}
|
||||
|
||||
void Faceshift::noteConnected() {
|
||||
qDebug("Faceshift: Connected.\n");
|
||||
qDebug("Faceshift: Connected.");
|
||||
|
||||
// request the list of blendshape names
|
||||
string message;
|
||||
|
@ -136,7 +136,7 @@ void Faceshift::noteConnected() {
|
|||
void Faceshift::noteError(QAbstractSocket::SocketError error) {
|
||||
if (!_tcpRetryCount) {
|
||||
// Only spam log with fail to connect the first time, so that we can keep waiting for server
|
||||
qDebug() << "Faceshift: " << _tcpSocket.errorString() << "\n";
|
||||
qDebug() << "Faceshift: " << _tcpSocket.errorString();
|
||||
}
|
||||
// retry connection after a 2 second delay
|
||||
if (_tcpEnabled) {
|
||||
|
|
|
@ -30,10 +30,10 @@ SixenseManager::~SixenseManager() {
|
|||
void SixenseManager::setFilter(bool filter) {
|
||||
#ifdef HAVE_SIXENSE
|
||||
if (filter) {
|
||||
qDebug("Sixense Filter ON\n");
|
||||
qDebug("Sixense Filter ON");
|
||||
sixenseSetFilterEnabled(1);
|
||||
} else {
|
||||
qDebug("Sixense Filter OFF\n");
|
||||
qDebug("Sixense Filter OFF");
|
||||
sixenseSetFilterEnabled(0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -44,7 +44,7 @@ void Transmitter::checkForLostTransmitter() {
|
|||
int msecsSinceLast = diffclock(_lastReceivedPacket, &now);
|
||||
if (msecsSinceLast > TIME_TO_ASSUME_LOST_MSECS) {
|
||||
resetLevels();
|
||||
qDebug("Transmitter signal lost.\n");
|
||||
qDebug("Transmitter signal lost.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,12 +99,12 @@ void Transmitter::processIncomingData(unsigned char* packetData, int numBytes) {
|
|||
_estimatedRotation.y *= (1.f - DECAY_RATE * DELTA_TIME);
|
||||
|
||||
if (!_isConnected) {
|
||||
qDebug("Transmitter Connected.\n");
|
||||
qDebug("Transmitter Connected.");
|
||||
_isConnected = true;
|
||||
_estimatedRotation *= 0.0;
|
||||
}
|
||||
} else {
|
||||
qDebug("Transmitter packet read error, %d bytes.\n", numBytes);
|
||||
qDebug("Transmitter packet read error, %d bytes.", numBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -473,26 +473,26 @@ static glm::quat xnToGLM(const XnMatrix3X3& matrix) {
|
|||
}
|
||||
|
||||
static void XN_CALLBACK_TYPE newUser(UserGenerator& generator, XnUserID id, void* cookie) {
|
||||
qDebug("Found user %d.\n", id);
|
||||
qDebug("Found user %d.", id);
|
||||
generator.GetSkeletonCap().RequestCalibration(id, false);
|
||||
}
|
||||
|
||||
static void XN_CALLBACK_TYPE lostUser(UserGenerator& generator, XnUserID id, void* cookie) {
|
||||
qDebug("Lost user %d.\n", id);
|
||||
qDebug("Lost user %d.", id);
|
||||
}
|
||||
|
||||
static void XN_CALLBACK_TYPE calibrationStarted(SkeletonCapability& capability, XnUserID id, void* cookie) {
|
||||
qDebug("Calibration started for user %d.\n", id);
|
||||
qDebug("Calibration started for user %d.", id);
|
||||
}
|
||||
|
||||
static void XN_CALLBACK_TYPE calibrationCompleted(SkeletonCapability& capability,
|
||||
XnUserID id, XnCalibrationStatus status, void* cookie) {
|
||||
if (status == XN_CALIBRATION_STATUS_OK) {
|
||||
qDebug("Calibration completed for user %d.\n", id);
|
||||
qDebug("Calibration completed for user %d.", id);
|
||||
capability.StartTracking(id);
|
||||
|
||||
} else {
|
||||
qDebug("Calibration failed to user %d.\n", id);
|
||||
qDebug("Calibration failed to user %d.", id);
|
||||
capability.RequestCalibration(id, true);
|
||||
}
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ void FrameGrabber::grabFrame() {
|
|||
// make sure it's in the format we expect
|
||||
if (image->nChannels != 3 || image->depth != IPL_DEPTH_8U || image->dataOrder != IPL_DATA_ORDER_PIXEL ||
|
||||
image->origin != 0) {
|
||||
qDebug("Invalid webcam image format.\n");
|
||||
qDebug("Invalid webcam image format.");
|
||||
return;
|
||||
}
|
||||
color = image;
|
||||
|
@ -938,7 +938,7 @@ bool FrameGrabber::init() {
|
|||
// load our face cascade
|
||||
switchToResourcesParentIfRequired();
|
||||
if (_faceCascade.empty() && !_faceCascade.load("resources/haarcascades/haarcascade_frontalface_alt.xml")) {
|
||||
qDebug("Failed to load Haar cascade for face tracking.\n");
|
||||
qDebug("Failed to load Haar cascade for face tracking.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ bool FrameGrabber::init() {
|
|||
|
||||
// next, an ordinary webcam
|
||||
if ((_capture = cvCaptureFromCAM(-1)) == 0) {
|
||||
qDebug("Failed to open webcam.\n");
|
||||
qDebug("Failed to open webcam.");
|
||||
return false;
|
||||
}
|
||||
const int IDEAL_FRAME_WIDTH = 320;
|
||||
|
|
|
@ -33,16 +33,16 @@ int main(int argc, const char * argv[]) {
|
|||
if (clockSkewOption) {
|
||||
int clockSkew = atoi(clockSkewOption);
|
||||
usecTimestampNowForceClockSkew(clockSkew);
|
||||
qDebug("clockSkewOption=%s clockSkew=%d\n", clockSkewOption, clockSkew);
|
||||
qDebug("clockSkewOption=%s clockSkew=%d", clockSkewOption, clockSkew);
|
||||
}
|
||||
|
||||
int exitCode;
|
||||
{
|
||||
Application app(argc, const_cast<char**>(argv), startup_time);
|
||||
|
||||
qDebug( "Created QT Application.\n" );
|
||||
qDebug( "Created QT Application.");
|
||||
exitCode = app.exec();
|
||||
}
|
||||
qDebug("Normal exit.\n");
|
||||
qDebug("Normal exit.");
|
||||
return exitCode;
|
||||
}
|
||||
|
|
|
@ -523,11 +523,13 @@ public:
|
|||
|
||||
void printNode(const FBXNode& node, int indent) {
|
||||
QByteArray spaces(indent, ' ');
|
||||
qDebug("%s%s: ", spaces.data(), node.name.data());
|
||||
QDebug nodeDebug = qDebug();
|
||||
|
||||
nodeDebug.nospace() << spaces.data() << node.name.data() << ": ";
|
||||
foreach (const QVariant& property, node.properties) {
|
||||
qDebug() << property;
|
||||
nodeDebug << property;
|
||||
}
|
||||
qDebug() << "\n";
|
||||
|
||||
foreach (const FBXNode& child, node.children) {
|
||||
printNode(child, indent + 1);
|
||||
}
|
||||
|
@ -1271,7 +1273,7 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
QString jointID = childMap.value(clusterID);
|
||||
fbxCluster.jointIndex = modelIDs.indexOf(jointID);
|
||||
if (fbxCluster.jointIndex == -1) {
|
||||
qDebug() << "Joint not in model list: " << jointID << "\n";
|
||||
qDebug() << "Joint not in model list: " << jointID;
|
||||
fbxCluster.jointIndex = 0;
|
||||
}
|
||||
fbxCluster.inverseBindMatrix = glm::inverse(cluster.transformLink) * modelTransform;
|
||||
|
@ -1289,7 +1291,7 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping)
|
|||
FBXCluster cluster;
|
||||
cluster.jointIndex = modelIDs.indexOf(modelID);
|
||||
if (cluster.jointIndex == -1) {
|
||||
qDebug() << "Model not in model list: " << modelID << "\n";
|
||||
qDebug() << "Model not in model list: " << modelID;
|
||||
cluster.jointIndex = 0;
|
||||
}
|
||||
extracted.mesh.clusters.append(cluster);
|
||||
|
|
|
@ -329,10 +329,8 @@ void NetworkGeometry::handleModelReplyError() {
|
|||
const int BASE_DELAY_MS = 1000;
|
||||
if (++_attempts < MAX_ATTEMPTS) {
|
||||
QTimer::singleShot(BASE_DELAY_MS * (int)pow(2.0, _attempts), this, SLOT(makeModelRequest()));
|
||||
debug << " -- retrying...\n";
|
||||
debug << " -- retrying...";
|
||||
|
||||
} else {
|
||||
debug << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -367,7 +365,7 @@ void NetworkGeometry::maybeReadModelWithMapping() {
|
|||
_geometry = url.path().toLower().endsWith(".svo") ? readSVO(model) : readFBX(model, mapping);
|
||||
|
||||
} catch (const QString& error) {
|
||||
qDebug() << "Error reading " << url << ": " << error << "\n";
|
||||
qDebug() << "Error reading " << url << ": " << error;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static ProgramObject* createProgram(const QString& name) {
|
|||
|
||||
void GlowEffect::init() {
|
||||
if (_initialized) {
|
||||
qDebug("[ERROR] GlowEffeect is already initialized.\n");
|
||||
qDebug("[ERROR] GlowEffeect is already initialized.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -284,20 +284,20 @@ QOpenGLFramebufferObject* GlowEffect::render(bool toTexture) {
|
|||
void GlowEffect::cycleRenderMode() {
|
||||
switch(_renderMode = (RenderMode)((_renderMode + 1) % RENDER_MODE_COUNT)) {
|
||||
case ADD_MODE:
|
||||
qDebug() << "Glow mode: Add\n";
|
||||
qDebug() << "Glow mode: Add";
|
||||
break;
|
||||
|
||||
case BLUR_ADD_MODE:
|
||||
qDebug() << "Glow mode: Blur/add\n";
|
||||
qDebug() << "Glow mode: Blur/add";
|
||||
break;
|
||||
|
||||
case BLUR_PERSIST_ADD_MODE:
|
||||
qDebug() << "Glow mode: Blur/persist/add\n";
|
||||
qDebug() << "Glow mode: Blur/persist/add";
|
||||
break;
|
||||
|
||||
default:
|
||||
case DIFFUSE_ADD_MODE:
|
||||
qDebug() << "Glow mode: Diffuse/add\n";
|
||||
qDebug() << "Glow mode: Diffuse/add";
|
||||
break;
|
||||
}
|
||||
_isFirstFrame = true;
|
||||
|
|
|
@ -36,7 +36,7 @@ ProgramObject* PointShader::createPointShaderProgram(const QString& name) {
|
|||
|
||||
void PointShader::init() {
|
||||
if (_initialized) {
|
||||
qDebug("[ERROR] PointShader is already initialized.\n");
|
||||
qDebug("[ERROR] PointShader is already initialized.");
|
||||
return;
|
||||
}
|
||||
switchToResourcesParentIfRequired();
|
||||
|
|
|
@ -333,10 +333,8 @@ void NetworkTexture::handleReplyError() {
|
|||
const int BASE_DELAY_MS = 1000;
|
||||
if (++_attempts < MAX_ATTEMPTS) {
|
||||
QTimer::singleShot(BASE_DELAY_MS * (int)pow(2.0, _attempts), this, SLOT(makeRequest()));
|
||||
debug << " -- retrying...\n";
|
||||
debug << " -- retrying...";
|
||||
|
||||
} else {
|
||||
debug << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ ProgramObject* VoxelShader::createGeometryShaderProgram(const QString& name) {
|
|||
|
||||
void VoxelShader::init() {
|
||||
if (_initialized) {
|
||||
qDebug("[ERROR] TestProgram is already initialized.\n");
|
||||
qDebug("[ERROR] TestProgram is already initialized.");
|
||||
return;
|
||||
}
|
||||
switchToResourcesParentIfRequired();
|
||||
|
|
|
@ -19,7 +19,7 @@ bool Controller::computeStars(unsigned numStars, unsigned seed) {
|
|||
|
||||
this->retile(numStars, _tileResolution);
|
||||
|
||||
qDebug() << "Total time to generate stars: " << ((usecTimestampNow() - usecTimestamp(&startTime)) / 1000) << " msec\n";
|
||||
qDebug() << "Total time to generate stars: " << ((usecTimestampNow() - usecTimestamp(&startTime)) / 1000) << "msec";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ void Generator::computeStarPositions(InputVertices& destination, unsigned limit,
|
|||
vertices->push_back(InputVertex(azimuth, altitude, computeStarColor(STAR_COLORIZATION)));
|
||||
}
|
||||
|
||||
qDebug() << "Total time to generate stars: " << ((usecTimestampNow() - usecTimestamp(&startTime)) / 1000) << " msec\n";
|
||||
qDebug() << "Total time to generate stars: " << ((usecTimestampNow() - usecTimestamp(&startTime)) / 1000) << " msec";
|
||||
}
|
||||
|
||||
// computeStarColor
|
||||
|
|
|
@ -101,7 +101,7 @@ qint64 AudioRingBuffer::writeData(const char* data, qint64 maxSize) {
|
|||
&& (less(_endOfLastWrite, _nextOutput)
|
||||
&& lessEqual(_nextOutput, shiftedPositionAccomodatingWrap(_endOfLastWrite, samplesToCopy)))) {
|
||||
// this read will cross the next output, so call us starved and reset the buffer
|
||||
qDebug() << "Filled the ring buffer. Resetting.\n";
|
||||
qDebug() << "Filled the ring buffer. Resetting.";
|
||||
_endOfLastWrite = _buffer;
|
||||
_nextOutput = _buffer;
|
||||
_isStarved = true;
|
||||
|
|
|
@ -57,10 +57,10 @@ int PositionalAudioRingBuffer::parsePositionalData(unsigned char* sourceBuffer,
|
|||
|
||||
bool PositionalAudioRingBuffer::shouldBeAddedToMix(int numJitterBufferSamples) {
|
||||
if (!isNotStarvedOrHasMinimumSamples(NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL + numJitterBufferSamples)) {
|
||||
qDebug() << "Starved and do not have minimum samples to start. Buffer held back.\n";
|
||||
qDebug() << "Starved and do not have minimum samples to start. Buffer held back.";
|
||||
return false;
|
||||
} else if (samplesAvailable() < NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL) {
|
||||
qDebug() << "Do not have number of samples needed for interval. Buffer starved.\n";
|
||||
qDebug() << "Do not have number of samples needed for interval. Buffer starved.";
|
||||
_isStarved = true;
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -301,5 +301,5 @@ void AvatarData::setClampedTargetScale(float targetScale) {
|
|||
targetScale = glm::clamp(targetScale, MIN_AVATAR_SCALE, MAX_AVATAR_SCALE);
|
||||
|
||||
_targetScale = targetScale;
|
||||
qDebug() << "Changed scale to " << _targetScale << "\n";
|
||||
qDebug() << "Changed scale to " << _targetScale;
|
||||
}
|
||||
|
|
|
@ -429,7 +429,7 @@ void ScriptedMetavoxelGuide::guide(MetavoxelVisitation& visitation) {
|
|||
_visitation = &visitation;
|
||||
_guideFunction.call(QScriptValue(), _arguments);
|
||||
if (_guideFunction.engine()->hasUncaughtException()) {
|
||||
qDebug() << "Script error: " << _guideFunction.engine()->uncaughtException().toString() << "\n";
|
||||
qDebug() << "Script error: " << _guideFunction.engine()->uncaughtException().toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ void OctreeInboundPacketProcessor::processPacket(const HifiSockAddr& senderSockA
|
|||
if (_myServer->wantsDebugReceiving()) {
|
||||
qDebug() << "PROCESSING THREAD: got '" << packetType << "' packet - " << _receivedPacketCount
|
||||
<< " command from client receivedBytes=" << packetLength
|
||||
<< " sequence=" << sequence << " transitTime=" << transitTime << " usecs\n";
|
||||
<< " sequence=" << sequence << " transitTime=" << transitTime << " usecs";
|
||||
}
|
||||
int atByte = numBytesPacketHeader + sizeof(sequence) + sizeof(sentAt);
|
||||
unsigned char* editData = (unsigned char*)&packetData[atByte];
|
||||
|
@ -114,16 +114,16 @@ void OctreeInboundPacketProcessor::processPacket(const HifiSockAddr& senderSockA
|
|||
senderNode->setLastHeardMicrostamp(usecTimestampNow());
|
||||
nodeUUID = senderNode->getUUID();
|
||||
if (debugProcessPacket) {
|
||||
qDebug() << "sender has uuid=" << nodeUUID << "\n";
|
||||
qDebug() << "sender has uuid=" << nodeUUID;
|
||||
}
|
||||
} else {
|
||||
if (debugProcessPacket) {
|
||||
qDebug() << "sender has no known nodeUUID.\n";
|
||||
qDebug() << "sender has no known nodeUUID.";
|
||||
}
|
||||
}
|
||||
trackInboundPackets(nodeUUID, sequence, transitTime, editsInPacket, processTime, lockWaitTime);
|
||||
} else {
|
||||
printf("unknown packet ignored... packetData[0]=%c\n", packetData[0]);
|
||||
qDebug("unknown packet ignored... packetData[0]=%c", packetData[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ bool OctreeSendThread::process() {
|
|||
}
|
||||
} else {
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("OctreeSendThread::process() waiting for isInitialLoadComplete()\n");
|
||||
qDebug("OctreeSendThread::process() waiting for isInitialLoadComplete()");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ int OctreeSendThread::handlePacketSend(Node* node, OctreeQueryNode* nodeData, in
|
|||
qDebug() << "Adding stats to packet at " << now << " [" << _totalPackets <<"]: sequence: " << sequence <<
|
||||
" statsMessageLength: " << statsMessageLength <<
|
||||
" original size: " << nodeData->getPacketLength() << " [" << _totalBytes <<
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]\n";
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]";
|
||||
}
|
||||
|
||||
// actually send it
|
||||
|
@ -154,7 +154,7 @@ int OctreeSendThread::handlePacketSend(Node* node, OctreeQueryNode* nodeData, in
|
|||
if (debug) {
|
||||
qDebug() << "Sending separate stats packet at " << now << " [" << _totalPackets <<"]: sequence: " << sequence <<
|
||||
" size: " << statsMessageLength << " [" << _totalBytes <<
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]\n";
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]";
|
||||
}
|
||||
|
||||
trueBytesSent += statsMessageLength;
|
||||
|
@ -174,7 +174,7 @@ int OctreeSendThread::handlePacketSend(Node* node, OctreeQueryNode* nodeData, in
|
|||
if (debug) {
|
||||
qDebug() << "Sending packet at " << now << " [" << _totalPackets <<"]: sequence: " << sequence <<
|
||||
" size: " << nodeData->getPacketLength() << " [" << _totalBytes <<
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]\n";
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]";
|
||||
}
|
||||
}
|
||||
nodeData->stats.markAsSent();
|
||||
|
@ -194,7 +194,7 @@ int OctreeSendThread::handlePacketSend(Node* node, OctreeQueryNode* nodeData, in
|
|||
if (debug) {
|
||||
qDebug() << "Sending packet at " << now << " [" << _totalPackets <<"]: sequence: " << sequence <<
|
||||
" size: " << nodeData->getPacketLength() << " [" << _totalBytes <<
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]\n";
|
||||
"] wasted bytes:" << thisWastedBytes << " [" << _totalWastedBytes << "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- format change "
|
||||
"wantColor=%s wantCompression=%s SENDING PARTIAL PACKET! currentPacketIsColor=%s "
|
||||
"currentPacketIsCompressed=%s\n",
|
||||
"currentPacketIsCompressed=%s",
|
||||
__LINE__,
|
||||
debug::valueOf(wantColor), debug::valueOf(wantCompression),
|
||||
debug::valueOf(nodeData->getCurrentPacketIsColor()),
|
||||
|
@ -245,7 +245,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
packetsSentThisInterval += handlePacketSend(node, nodeData, trueBytesSent, truePacketsSent);
|
||||
} else {
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("wantColor=%s wantCompression=%s FIXING HEADER! currentPacketIsColor=%s currentPacketIsCompressed=%s\n",
|
||||
qDebug("wantColor=%s wantCompression=%s FIXING HEADER! currentPacketIsColor=%s currentPacketIsCompressed=%s",
|
||||
debug::valueOf(wantColor), debug::valueOf(wantCompression),
|
||||
debug::valueOf(nodeData->getCurrentPacketIsColor()),
|
||||
debug::valueOf(nodeData->getCurrentPacketIsCompressed()) );
|
||||
|
@ -257,7 +257,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
targetSize = nodeData->getAvailable() - sizeof(OCTREE_PACKET_INTERNAL_SECTION_SIZE);
|
||||
}
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("line:%d _packetData.changeSettings() wantCompression=%s targetSize=%d\n", __LINE__,
|
||||
qDebug("line:%d _packetData.changeSettings() wantCompression=%s targetSize=%d", __LINE__,
|
||||
debug::valueOf(wantCompression), targetSize);
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
}
|
||||
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("wantColor/isColor=%s/%s wantCompression/isCompressed=%s/%s viewFrustumChanged=%s, getWantLowResMoving()=%s\n",
|
||||
qDebug("wantColor/isColor=%s/%s wantCompression/isCompressed=%s/%s viewFrustumChanged=%s, getWantLowResMoving()=%s",
|
||||
debug::valueOf(wantColor), debug::valueOf(nodeData->getCurrentPacketIsColor()),
|
||||
debug::valueOf(wantCompression), debug::valueOf(nodeData->getCurrentPacketIsCompressed()),
|
||||
debug::valueOf(viewFrustumChanged), debug::valueOf(nodeData->getWantLowResMoving()));
|
||||
|
@ -274,7 +274,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
const ViewFrustum* lastViewFrustum = wantDelta ? &nodeData->getLastKnownViewFrustum() : NULL;
|
||||
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("packetDistributor() viewFrustumChanged=%s, nodeBag.isEmpty=%s, viewSent=%s\n",
|
||||
qDebug("packetDistributor() viewFrustumChanged=%s, nodeBag.isEmpty=%s, viewSent=%s",
|
||||
debug::valueOf(viewFrustumChanged), debug::valueOf(nodeData->nodeBag.isEmpty()),
|
||||
debug::valueOf(nodeData->getViewSent())
|
||||
);
|
||||
|
@ -285,7 +285,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
if (viewFrustumChanged || nodeData->nodeBag.isEmpty()) {
|
||||
uint64_t now = usecTimestampNow();
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("(viewFrustumChanged=%s || nodeData->nodeBag.isEmpty() =%s)...\n",
|
||||
qDebug("(viewFrustumChanged=%s || nodeData->nodeBag.isEmpty() =%s)...",
|
||||
debug::valueOf(viewFrustumChanged), debug::valueOf(nodeData->nodeBag.isEmpty()));
|
||||
if (nodeData->getLastTimeBagEmpty() > 0) {
|
||||
float elapsedSceneSend = (now - nodeData->getLastTimeBagEmpty()) / 1000000.0f;
|
||||
|
@ -294,7 +294,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
} else {
|
||||
qDebug("elapsed time to send scene = %f seconds", elapsedSceneSend);
|
||||
}
|
||||
qDebug(" [occlusionCulling:%s, wantDelta:%s, wantColor:%s ]\n",
|
||||
qDebug("[ occlusionCulling:%s, wantDelta:%s, wantColor:%s ]",
|
||||
debug::valueOf(nodeData->getWantOcclusionCulling()), debug::valueOf(wantDelta),
|
||||
debug::valueOf(wantColor));
|
||||
}
|
||||
|
@ -323,12 +323,12 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
unsigned long elapsedTime = nodeData->stats.getElapsedTime();
|
||||
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- completed scene \n", __LINE__ );
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- completed scene", __LINE__ );
|
||||
}
|
||||
int packetsJustSent = handlePacketSend(node, nodeData, trueBytesSent, truePacketsSent);
|
||||
packetsSentThisInterval += packetsJustSent;
|
||||
if (forceDebugging) {
|
||||
qDebug("packetsJustSent=%d packetsSentThisInterval=%d\n", packetsJustSent, packetsSentThisInterval);
|
||||
qDebug("packetsJustSent=%d packetsSentThisInterval=%d", packetsJustSent, packetsSentThisInterval);
|
||||
}
|
||||
|
||||
if (forceDebugging || _myServer->wantsDebugSending()) {
|
||||
|
@ -338,7 +338,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
<< " elapsed:" << elapsedTime
|
||||
<< " Packets:" << _totalPackets
|
||||
<< " Bytes:" << _totalBytes
|
||||
<< " Wasted:" << _totalWastedBytes << "\n";
|
||||
<< " Wasted:" << _totalWastedBytes;
|
||||
}
|
||||
|
||||
// start tracking our stats
|
||||
|
@ -354,7 +354,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
qDebug() << "Scene started at " << usecTimestampNow()
|
||||
<< " Packets:" << _totalPackets
|
||||
<< " Bytes:" << _totalBytes
|
||||
<< " Wasted:" << _totalWastedBytes << "\n";
|
||||
<< " Wasted:" << _totalWastedBytes;
|
||||
}
|
||||
|
||||
::startSceneSleepTime = _usleepTime;
|
||||
|
@ -382,7 +382,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
int maxPacketsPerInterval = std::min(clientMaxPacketsPerInterval, _myServer->getPacketsPerClientPerInterval());
|
||||
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("truePacketsSent=%d packetsSentThisInterval=%d maxPacketsPerInterval=%d server PPI=%d nodePPS=%d nodePPI=%d\n",
|
||||
qDebug("truePacketsSent=%d packetsSentThisInterval=%d maxPacketsPerInterval=%d server PPI=%d nodePPS=%d nodePPI=%d",
|
||||
truePacketsSent, packetsSentThisInterval, maxPacketsPerInterval, _myServer->getPacketsPerClientPerInterval(),
|
||||
nodeData->getMaxOctreePacketsPerSecond(), clientMaxPacketsPerInterval);
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
bool completedScene = false;
|
||||
while (somethingToSend && packetsSentThisInterval < maxPacketsPerInterval) {
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("truePacketsSent=%d packetsSentThisInterval=%d maxPacketsPerInterval=%d server PPI=%d nodePPS=%d nodePPI=%d\n",
|
||||
qDebug("truePacketsSent=%d packetsSentThisInterval=%d maxPacketsPerInterval=%d server PPI=%d nodePPS=%d nodePPI=%d",
|
||||
truePacketsSent, packetsSentThisInterval, maxPacketsPerInterval, _myServer->getPacketsPerClientPerInterval(),
|
||||
nodeData->getMaxOctreePacketsPerSecond(), clientMaxPacketsPerInterval);
|
||||
}
|
||||
|
@ -471,14 +471,14 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
if (writtenSize > nodeData->getAvailable()) {
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- "
|
||||
"writtenSize[%d] > available[%d] too big, sending packet as is.\n",
|
||||
"writtenSize[%d] > available[%d] too big, sending packet as is.",
|
||||
__LINE__, writtenSize, nodeData->getAvailable());
|
||||
}
|
||||
packetsSentThisInterval += handlePacketSend(node, nodeData, trueBytesSent, truePacketsSent);
|
||||
}
|
||||
|
||||
if (forceDebugging || (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug())) {
|
||||
qDebug(">>>>>> calling writeToPacket() available=%d compressedSize=%d uncompressedSize=%d target=%d\n",
|
||||
qDebug(">>>>>> calling writeToPacket() available=%d compressedSize=%d uncompressedSize=%d target=%d",
|
||||
nodeData->getAvailable(), _packetData.getFinalizedSize(),
|
||||
_packetData.getUncompressedSize(), _packetData.getTargetSize());
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
int targetSize = MAX_OCTREE_PACKET_DATA_SIZE;
|
||||
if (sendNow) {
|
||||
if (forceDebugging) {
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- sendNow = TRUE\n", __LINE__);
|
||||
qDebug("about to call handlePacketSend() .... line: %d -- sendNow = TRUE", __LINE__);
|
||||
}
|
||||
packetsSentThisInterval += handlePacketSend(node, nodeData, trueBytesSent, truePacketsSent);
|
||||
if (wantCompression) {
|
||||
|
@ -515,7 +515,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
targetSize = nodeData->getAvailable() - sizeof(OCTREE_PACKET_INTERNAL_SECTION_SIZE) - COMPRESS_PADDING;
|
||||
}
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("line:%d _packetData.changeSettings() wantCompression=%s targetSize=%d\n",__LINE__,
|
||||
qDebug("line:%d _packetData.changeSettings() wantCompression=%s targetSize=%d",__LINE__,
|
||||
debug::valueOf(nodeData->getWantCompression()), targetSize);
|
||||
}
|
||||
_packetData.changeSettings(nodeData->getWantCompression(), targetSize); // will do reset
|
||||
|
@ -546,18 +546,18 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
if (elapsedmsec > 1000) {
|
||||
int elapsedsec = (end - start)/1000000;
|
||||
qDebug("WARNING! packetLoop() took %d seconds [%d milliseconds %d calls in compress] "
|
||||
"to generate %d bytes in %d packets %d nodes still to send\n",
|
||||
"to generate %d bytes in %d packets %d nodes still to send",
|
||||
elapsedsec, elapsedCompressTimeMsecs, elapsedCompressCalls,
|
||||
trueBytesSent, truePacketsSent, nodeData->nodeBag.count());
|
||||
} else {
|
||||
qDebug("WARNING! packetLoop() took %d milliseconds [%d milliseconds %d calls in compress] "
|
||||
"to generate %d bytes in %d packets, %d nodes still to send\n",
|
||||
"to generate %d bytes in %d packets, %d nodes still to send",
|
||||
elapsedmsec, elapsedCompressTimeMsecs, elapsedCompressCalls,
|
||||
trueBytesSent, truePacketsSent, nodeData->nodeBag.count());
|
||||
}
|
||||
} else if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("packetLoop() took %d milliseconds [%d milliseconds %d calls in compress] "
|
||||
"to generate %d bytes in %d packets, %d nodes still to send\n",
|
||||
"to generate %d bytes in %d packets, %d nodes still to send",
|
||||
elapsedmsec, elapsedCompressTimeMsecs, elapsedCompressCalls,
|
||||
trueBytesSent, truePacketsSent, nodeData->nodeBag.count());
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ int OctreeSendThread::packetDistributor(Node* node, OctreeQueryNode* nodeData, b
|
|||
|
||||
if (_myServer->wantsDebugSending() && _myServer->wantsVerboseDebug()) {
|
||||
qDebug("truePacketsSent=%d packetsSentThisInterval=%d maxPacketsPerInterval=%d "
|
||||
"server PPI=%d nodePPS=%d nodePPI=%d\n",
|
||||
"server PPI=%d nodePPS=%d nodePPI=%d",
|
||||
truePacketsSent, packetsSentThisInterval, maxPacketsPerInterval,
|
||||
_myServer->getPacketsPerClientPerInterval(), nodeData->getMaxOctreePacketsPerSecond(),
|
||||
clientMaxPacketsPerInterval);
|
||||
|
|
|
@ -97,7 +97,7 @@ OctreeServer::~OctreeServer() {
|
|||
delete _jurisdiction;
|
||||
_jurisdiction = NULL;
|
||||
|
||||
qDebug() << "OctreeServer::run()... DONE\n";
|
||||
qDebug() << "OctreeServer::run()... DONE";
|
||||
}
|
||||
|
||||
void OctreeServer::initMongoose(int port) {
|
||||
|
@ -127,7 +127,7 @@ int OctreeServer::civetwebRequestHandler(struct mg_connection* connection) {
|
|||
|
||||
#ifdef FORCE_CRASH
|
||||
if (strcmp(ri->uri, "/force_crash") == 0 && strcmp(ri->request_method, "GET") == 0) {
|
||||
qDebug() << "About to force a crash!\n";
|
||||
qDebug() << "About to force a crash!";
|
||||
int foo;
|
||||
int* forceCrash = &foo;
|
||||
mg_printf(connection, "%s", "HTTP/1.0 200 OK\r\n\r\n");
|
||||
|
@ -471,9 +471,9 @@ void OctreeServer::setArguments(int argc, char** argv) {
|
|||
_argc = argc;
|
||||
_argv = const_cast<const char**>(argv);
|
||||
|
||||
qDebug("OctreeServer::setArguments()\n");
|
||||
qDebug("OctreeServer::setArguments()");
|
||||
for (int i = 0; i < _argc; i++) {
|
||||
qDebug("_argv[%d]=%s\n", i, _argv[i]);
|
||||
qDebug("_argv[%d]=%s", i, _argv[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ void OctreeServer::parsePayload() {
|
|||
|
||||
int argCount = configList.size() + 1;
|
||||
|
||||
qDebug("OctreeServer::parsePayload()... argCount=%d\n",argCount);
|
||||
qDebug("OctreeServer::parsePayload()... argCount=%d",argCount);
|
||||
|
||||
_parsedArgV = new char*[argCount];
|
||||
const char* dummy = "config-from-payload";
|
||||
|
@ -499,7 +499,7 @@ void OctreeServer::parsePayload() {
|
|||
QString configItem = configList.at(i-1);
|
||||
_parsedArgV[i] = new char[configItem.length() + sizeof(char)];
|
||||
strcpy(_parsedArgV[i], configItem.toLocal8Bit().constData());
|
||||
qDebug("OctreeServer::parsePayload()... _parsedArgV[%d]=%s\n", i, _parsedArgV[i]);
|
||||
qDebug("OctreeServer::parsePayload()... _parsedArgV[%d]=%s", i, _parsedArgV[i]);
|
||||
}
|
||||
|
||||
setArguments(argCount, _parsedArgV);
|
||||
|
@ -514,7 +514,7 @@ void OctreeServer::processDatagram(const QByteArray& dataByteArray, const HifiSo
|
|||
if (packetType == getMyQueryMessageType()) {
|
||||
bool debug = false;
|
||||
if (debug) {
|
||||
qDebug() << "Got PACKET_TYPE_VOXEL_QUERY at" << usecTimestampNow() << "\n";
|
||||
qDebug() << "Got PACKET_TYPE_VOXEL_QUERY at" << usecTimestampNow();
|
||||
}
|
||||
|
||||
int numBytesPacketHeader = numBytesForPacketHeader((unsigned char*) dataByteArray.data());
|
||||
|
@ -579,22 +579,22 @@ void OctreeServer::run() {
|
|||
const char* JURISDICTION_FILE = "--jurisdictionFile";
|
||||
const char* jurisdictionFile = getCmdOption(_argc, _argv, JURISDICTION_FILE);
|
||||
if (jurisdictionFile) {
|
||||
qDebug("jurisdictionFile=%s\n", jurisdictionFile);
|
||||
qDebug("jurisdictionFile=%s", jurisdictionFile);
|
||||
|
||||
qDebug("about to readFromFile().... jurisdictionFile=%s\n", jurisdictionFile);
|
||||
qDebug("about to readFromFile().... jurisdictionFile=%s", jurisdictionFile);
|
||||
_jurisdiction = new JurisdictionMap(jurisdictionFile);
|
||||
qDebug("after readFromFile().... jurisdictionFile=%s\n", jurisdictionFile);
|
||||
qDebug("after readFromFile().... jurisdictionFile=%s", jurisdictionFile);
|
||||
} else {
|
||||
const char* JURISDICTION_ROOT = "--jurisdictionRoot";
|
||||
const char* jurisdictionRoot = getCmdOption(_argc, _argv, JURISDICTION_ROOT);
|
||||
if (jurisdictionRoot) {
|
||||
qDebug("jurisdictionRoot=%s\n", jurisdictionRoot);
|
||||
qDebug("jurisdictionRoot=%s", jurisdictionRoot);
|
||||
}
|
||||
|
||||
const char* JURISDICTION_ENDNODES = "--jurisdictionEndNodes";
|
||||
const char* jurisdictionEndNodes = getCmdOption(_argc, _argv, JURISDICTION_ENDNODES);
|
||||
if (jurisdictionEndNodes) {
|
||||
qDebug("jurisdictionEndNodes=%s\n", jurisdictionEndNodes);
|
||||
qDebug("jurisdictionEndNodes=%s", jurisdictionEndNodes);
|
||||
}
|
||||
|
||||
if (jurisdictionRoot || jurisdictionEndNodes) {
|
||||
|
@ -619,22 +619,22 @@ void OctreeServer::run() {
|
|||
|
||||
const char* VERBOSE_DEBUG = "--verboseDebug";
|
||||
_verboseDebug = cmdOptionExists(_argc, _argv, VERBOSE_DEBUG);
|
||||
qDebug("verboseDebug=%s\n", debug::valueOf(_verboseDebug));
|
||||
qDebug("verboseDebug=%s", debug::valueOf(_verboseDebug));
|
||||
|
||||
const char* DEBUG_SENDING = "--debugSending";
|
||||
_debugSending = cmdOptionExists(_argc, _argv, DEBUG_SENDING);
|
||||
qDebug("debugSending=%s\n", debug::valueOf(_debugSending));
|
||||
qDebug("debugSending=%s", debug::valueOf(_debugSending));
|
||||
|
||||
const char* DEBUG_RECEIVING = "--debugReceiving";
|
||||
_debugReceiving = cmdOptionExists(_argc, _argv, DEBUG_RECEIVING);
|
||||
qDebug("debugReceiving=%s\n", debug::valueOf(_debugReceiving));
|
||||
qDebug("debugReceiving=%s", debug::valueOf(_debugReceiving));
|
||||
|
||||
// By default we will persist, if you want to disable this, then pass in this parameter
|
||||
const char* NO_PERSIST = "--NoPersist";
|
||||
if (cmdOptionExists(_argc, _argv, NO_PERSIST)) {
|
||||
_wantPersist = false;
|
||||
}
|
||||
qDebug("wantPersist=%s\n", debug::valueOf(_wantPersist));
|
||||
qDebug("wantPersist=%s", debug::valueOf(_wantPersist));
|
||||
|
||||
// if we want Persistence, set up the local file and persist thread
|
||||
if (_wantPersist) {
|
||||
|
@ -648,7 +648,7 @@ void OctreeServer::run() {
|
|||
strcpy(_persistFilename, getMyDefaultPersistFilename());
|
||||
}
|
||||
|
||||
qDebug("persistFilename=%s\n", _persistFilename);
|
||||
qDebug("persistFilename=%s", _persistFilename);
|
||||
|
||||
// now set up PersistThread
|
||||
_persistThread = new OctreePersistThread(_tree, _persistFilename);
|
||||
|
@ -665,7 +665,7 @@ void OctreeServer::run() {
|
|||
if (clockSkewOption) {
|
||||
int clockSkew = atoi(clockSkewOption);
|
||||
usecTimestampNowForceClockSkew(clockSkew);
|
||||
qDebug("clockSkewOption=%s clockSkew=%d\n", clockSkewOption, clockSkew);
|
||||
qDebug("clockSkewOption=%s clockSkew=%d", clockSkewOption, clockSkew);
|
||||
}
|
||||
|
||||
// Check to see if the user passed in a command line option for setting packet send rate
|
||||
|
@ -676,7 +676,7 @@ void OctreeServer::run() {
|
|||
if (_packetsPerClientPerInterval < 1) {
|
||||
_packetsPerClientPerInterval = 1;
|
||||
}
|
||||
qDebug("packetsPerSecond=%s PACKETS_PER_CLIENT_PER_INTERVAL=%d\n", packetsPerSecond, _packetsPerClientPerInterval);
|
||||
qDebug("packetsPerSecond=%s PACKETS_PER_CLIENT_PER_INTERVAL=%d", packetsPerSecond, _packetsPerClientPerInterval);
|
||||
}
|
||||
|
||||
HifiSockAddr senderSockAddr;
|
||||
|
@ -703,7 +703,7 @@ void OctreeServer::run() {
|
|||
if (gmtm != NULL) {
|
||||
strftime(utcBuffer, MAX_TIME_LENGTH, " [%m/%d/%Y %X UTC]", gmtm);
|
||||
}
|
||||
qDebug() << "Now running... started at: " << localBuffer << utcBuffer << "\n";
|
||||
qDebug() << "Now running... started at: " << localBuffer << utcBuffer;
|
||||
|
||||
QTimer* domainServerTimer = new QTimer(this);
|
||||
connect(domainServerTimer, SIGNAL(timeout()), this, SLOT(checkInWithDomainServerOrExit()));
|
||||
|
|
|
@ -71,19 +71,19 @@ CoverageMap::~CoverageMap() {
|
|||
};
|
||||
|
||||
void CoverageMap::printStats() {
|
||||
qDebug("CoverageMap::printStats()...\n");
|
||||
qDebug("MINIMUM_POLYGON_AREA_TO_STORE=%f\n",MINIMUM_POLYGON_AREA_TO_STORE);
|
||||
qDebug("_mapCount=%d\n",_mapCount);
|
||||
qDebug("_checkMapRootCalls=%d\n",_checkMapRootCalls);
|
||||
qDebug("_notAllInView=%d\n",_notAllInView);
|
||||
qDebug("_maxPolygonsUsed=%d\n",CoverageRegion::_maxPolygonsUsed);
|
||||
qDebug("_totalPolygons=%d\n",CoverageRegion::_totalPolygons);
|
||||
qDebug("_occlusionTests=%d\n",CoverageRegion::_occlusionTests);
|
||||
qDebug("_regionSkips=%d\n",CoverageRegion::_regionSkips);
|
||||
qDebug("_tooSmallSkips=%d\n",CoverageRegion::_tooSmallSkips);
|
||||
qDebug("_regionFullSkips=%d\n",CoverageRegion::_regionFullSkips);
|
||||
qDebug("_outOfOrderPolygon=%d\n",CoverageRegion::_outOfOrderPolygon);
|
||||
qDebug("_clippedPolygons=%d\n",CoverageRegion::_clippedPolygons);
|
||||
qDebug("CoverageMap::printStats()...");
|
||||
qDebug("MINIMUM_POLYGON_AREA_TO_STORE=%f",MINIMUM_POLYGON_AREA_TO_STORE);
|
||||
qDebug("_mapCount=%d",_mapCount);
|
||||
qDebug("_checkMapRootCalls=%d",_checkMapRootCalls);
|
||||
qDebug("_notAllInView=%d",_notAllInView);
|
||||
qDebug("_maxPolygonsUsed=%d",CoverageRegion::_maxPolygonsUsed);
|
||||
qDebug("_totalPolygons=%d",CoverageRegion::_totalPolygons);
|
||||
qDebug("_occlusionTests=%d",CoverageRegion::_occlusionTests);
|
||||
qDebug("_regionSkips=%d",CoverageRegion::_regionSkips);
|
||||
qDebug("_tooSmallSkips=%d",CoverageRegion::_tooSmallSkips);
|
||||
qDebug("_regionFullSkips=%d",CoverageRegion::_regionFullSkips);
|
||||
qDebug("_outOfOrderPolygon=%d",CoverageRegion::_outOfOrderPolygon);
|
||||
qDebug("_clippedPolygons=%d",CoverageRegion::_clippedPolygons);
|
||||
}
|
||||
|
||||
void CoverageMap::erase() {
|
||||
|
@ -102,7 +102,7 @@ void CoverageMap::erase() {
|
|||
}
|
||||
|
||||
if (_isRoot && wantDebugging) {
|
||||
qDebug("CoverageMap last to be deleted...\n");
|
||||
qDebug("CoverageMap last to be deleted...");
|
||||
printStats();
|
||||
|
||||
CoverageRegion::_maxPolygonsUsed = 0;
|
||||
|
|
|
@ -78,11 +78,11 @@ void CoverageMapV2::erase() {
|
|||
}
|
||||
|
||||
if (_isRoot && wantDebugging) {
|
||||
qDebug("CoverageMapV2 last to be deleted...\n");
|
||||
qDebug("MINIMUM_POLYGON_AREA_TO_STORE=%f\n",MINIMUM_POLYGON_AREA_TO_STORE);
|
||||
qDebug("_mapCount=%d\n",_mapCount);
|
||||
qDebug("_checkMapRootCalls=%d\n",_checkMapRootCalls);
|
||||
qDebug("_notAllInView=%d\n",_notAllInView);
|
||||
qDebug("CoverageMapV2 last to be deleted...");
|
||||
qDebug("MINIMUM_POLYGON_AREA_TO_STORE=%f",MINIMUM_POLYGON_AREA_TO_STORE);
|
||||
qDebug("_mapCount=%d",_mapCount);
|
||||
qDebug("_checkMapRootCalls=%d",_checkMapRootCalls);
|
||||
qDebug("_notAllInView=%d",_notAllInView);
|
||||
_mapCount = 0;
|
||||
_checkMapRootCalls = 0;
|
||||
_notAllInView = 0;
|
||||
|
|
|
@ -145,7 +145,7 @@ void myDebugPrintOctalCode(const unsigned char* octalCode, bool withNewLine) {
|
|||
|
||||
JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHexCodes) {
|
||||
|
||||
qDebug("JurisdictionMap::JurisdictionMap(const char* rootHexCode=[%p] %s, const char* endNodesHexCodes=[%p] %s)\n",
|
||||
qDebug("JurisdictionMap::JurisdictionMap(const char* rootHexCode=[%p] %s, const char* endNodesHexCodes=[%p] %s)",
|
||||
rootHexCode, rootHexCode, endNodesHexCodes, endNodesHexCodes);
|
||||
|
||||
_rootOctalCode = hexStringToOctalCode(QString(rootHexCode));
|
||||
|
@ -162,7 +162,7 @@ JurisdictionMap::JurisdictionMap(const char* rootHexCode, const char* endNodesHe
|
|||
|
||||
unsigned char* endNodeOctcode = hexStringToOctalCode(endNodeHexString);
|
||||
|
||||
qDebug("JurisdictionMap::JurisdictionMap() endNodeList(%d)=%s\n",
|
||||
qDebug("JurisdictionMap::JurisdictionMap() endNodeList(%d)=%s",
|
||||
i, endNodeHexString.toLocal8Bit().constData());
|
||||
|
||||
//printOctalCode(endNodeOctcode);
|
||||
|
@ -209,7 +209,7 @@ bool JurisdictionMap::readFromFile(const char* filename) {
|
|||
QString settingsFile(filename);
|
||||
QSettings settings(settingsFile, QSettings::IniFormat);
|
||||
QString rootCode = settings.value("root","00").toString();
|
||||
qDebug() << "rootCode=" << rootCode << "\n";
|
||||
qDebug() << "rootCode=" << rootCode;
|
||||
|
||||
_rootOctalCode = hexStringToOctalCode(rootCode);
|
||||
printOctalCode(_rootOctalCode);
|
||||
|
@ -220,7 +220,7 @@ bool JurisdictionMap::readFromFile(const char* filename) {
|
|||
foreach (const QString &childKey, childKeys) {
|
||||
QString childValue = settings.value(childKey).toString();
|
||||
values.insert(childKey, childValue);
|
||||
qDebug() << childKey << "=" << childValue << "\n";
|
||||
qDebug() << childKey << "=" << childValue;
|
||||
|
||||
unsigned char* octcode = hexStringToOctalCode(childValue);
|
||||
printOctalCode(octcode);
|
||||
|
@ -234,11 +234,11 @@ bool JurisdictionMap::readFromFile(const char* filename) {
|
|||
void JurisdictionMap::displayDebugDetails() const {
|
||||
QString rootNodeValue = octalCodeToHexString(_rootOctalCode);
|
||||
|
||||
qDebug() << "root:" << rootNodeValue << "\n";
|
||||
qDebug() << "root:" << rootNodeValue;
|
||||
|
||||
for (int i = 0; i < _endNodes.size(); i++) {
|
||||
QString value = octalCodeToHexString(_endNodes[i]);
|
||||
qDebug() << "End node[" << i << "]: " << rootNodeValue << "\n";
|
||||
qDebug() << "End node[" << i << "]: " << rootNodeValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ void Octree::recurseTreeWithOperation(RecurseOctreeOperation operation, void* ex
|
|||
void Octree::recurseNodeWithOperation(OctreeElement* node, RecurseOctreeOperation operation, void* extraData,
|
||||
int recursionCount) {
|
||||
if (recursionCount > DANGEROUSLY_DEEP_RECURSION) {
|
||||
qDebug() << "Octree::recurseNodeWithOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!\n";
|
||||
qDebug() << "Octree::recurseNodeWithOperation() reached DANGEROUSLY_DEEP_RECURSION, bailing!";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ void Octree::recurseNodeWithOperationDistanceSorted(OctreeElement* node, Recurse
|
|||
const glm::vec3& point, void* extraData, int recursionCount) {
|
||||
|
||||
if (recursionCount > DANGEROUSLY_DEEP_RECURSION) {
|
||||
qDebug() << "Octree::recurseNodeWithOperationDistanceSorted() reached DANGEROUSLY_DEEP_RECURSION, bailing!\n";
|
||||
qDebug() << "Octree::recurseNodeWithOperationDistanceSorted() reached DANGEROUSLY_DEEP_RECURSION, bailing!";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ void Octree::reaverageOctreeElements(OctreeElement* startNode) {
|
|||
recursionCount++;
|
||||
}
|
||||
if (recursionCount > UNREASONABLY_DEEP_RECURSION) {
|
||||
qDebug("Octree::reaverageOctreeElements()... bailing out of UNREASONABLY_DEEP_RECURSION\n");
|
||||
qDebug("Octree::reaverageOctreeElements()... bailing out of UNREASONABLY_DEEP_RECURSION");
|
||||
recursionCount--;
|
||||
return;
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ int Octree::encodeTreeBitstream(OctreeElement* node,
|
|||
|
||||
// you can't call this without a valid node
|
||||
if (!node) {
|
||||
qDebug("WARNING! encodeTreeBitstream() called with node=NULL\n");
|
||||
qDebug("WARNING! encodeTreeBitstream() called with node=NULL");
|
||||
params.stopReason = EncodeBitstreamParams::NULL_NODE;
|
||||
return bytesWritten;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElement* node,
|
|||
|
||||
// you can't call this without a valid node
|
||||
if (!node) {
|
||||
qDebug("WARNING! encodeTreeBitstreamRecursion() called with node=NULL\n");
|
||||
qDebug("WARNING! encodeTreeBitstreamRecursion() called with node=NULL");
|
||||
params.stopReason = EncodeBitstreamParams::NULL_NODE;
|
||||
return bytesAtThisLevel;
|
||||
}
|
||||
|
@ -1312,7 +1312,7 @@ bool Octree::readFromSVOFile(const char* fileName) {
|
|||
emit importSize(1.0f, 1.0f, 1.0f);
|
||||
emit importProgress(0);
|
||||
|
||||
qDebug("loading file %s...\n", fileName);
|
||||
qDebug("Loading file %s...", fileName);
|
||||
|
||||
// get file length....
|
||||
unsigned long fileLength = file.tellg();
|
||||
|
@ -1341,10 +1341,10 @@ bool Octree::readFromSVOFile(const char* fileName) {
|
|||
dataLength -= sizeof(expectedVersion);
|
||||
fileOk = true;
|
||||
} else {
|
||||
qDebug("SVO file version mismatch. Expected: %d Got: %d\n", expectedVersion, gotVersion);
|
||||
qDebug("SVO file version mismatch. Expected: %d Got: %d", expectedVersion, gotVersion);
|
||||
}
|
||||
} else {
|
||||
qDebug("SVO file type mismatch. Expected: %c Got: %c\n", expectedType, gotType);
|
||||
qDebug("SVO file type mismatch. Expected: %c Got: %c", expectedType, gotType);
|
||||
}
|
||||
} else {
|
||||
fileOk = true; // assume the file is ok
|
||||
|
@ -1367,7 +1367,7 @@ void Octree::writeToSVOFile(const char* fileName, OctreeElement* node) {
|
|||
std::ofstream file(fileName, std::ios::out|std::ios::binary);
|
||||
|
||||
if(file.is_open()) {
|
||||
qDebug("saving to file %s...\n", fileName);
|
||||
qDebug("Saving to file %s...", fileName);
|
||||
|
||||
// before reading the file, check to see if this version of the Octree supports file versions
|
||||
if (getWantSVOfileVersions()) {
|
||||
|
|
|
@ -103,7 +103,7 @@ void OctreeEditPacketSender::queuePacketToNode(const QUuid& nodeUUID, unsigned c
|
|||
qDebug() << "OctreeEditPacketSender::queuePacketToNode() queued " << buffer[0] <<
|
||||
" - command to node bytes=" << length <<
|
||||
" sequence=" << sequence <<
|
||||
" transitTimeSoFar=" << transitTime << " usecs\n";
|
||||
" transitTimeSoFar=" << transitTime << " usecs";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,23 +246,25 @@ void OctreeElement::auditChildren(const char* label) const {
|
|||
|
||||
const bool alwaysReport = false; // set this to true to get additional debugging
|
||||
if (alwaysReport || auditFailed) {
|
||||
qDebug("%s... auditChildren() %s <<<< \n", label, (auditFailed ? "FAILED" : "PASSED"));
|
||||
qDebug(" _childrenExternal=%s\n", debug::valueOf(_childrenExternal));
|
||||
qDebug(" childCount=%d\n", getChildCount());
|
||||
qDebug(" _childBitmask=");
|
||||
outputBits(_childBitmask);
|
||||
qDebug("%s... auditChildren() %s <<<<", label, (auditFailed ? "FAILED" : "PASSED"));
|
||||
qDebug(" _childrenExternal=%s", debug::valueOf(_childrenExternal));
|
||||
qDebug(" childCount=%d", getChildCount());
|
||||
|
||||
QDebug bitOutput = qDebug().nospace();
|
||||
bitOutput << " _childBitmask=";
|
||||
outputBits(_childBitmask, bitOutput);
|
||||
|
||||
|
||||
for (int childIndex = 0; childIndex < NUMBER_OF_CHILDREN; childIndex++) {
|
||||
OctreeElement* testChildNew = getChildAtIndex(childIndex);
|
||||
OctreeElement* testChildOld = _childrenArray[childIndex];
|
||||
|
||||
qDebug("child at index %d... testChildOld=%p testChildNew=%p %s \n",
|
||||
qDebug("child at index %d... testChildOld=%p testChildNew=%p %s",
|
||||
childIndex, testChildOld, testChildNew ,
|
||||
((testChildNew != testChildOld) ? " DOES NOT MATCH <<<< BAD <<<<" : " - OK ")
|
||||
);
|
||||
}
|
||||
qDebug("%s... auditChildren() <<<< DONE <<<< \n", label);
|
||||
qDebug("%s... auditChildren() <<<< DONE <<<<", label);
|
||||
}
|
||||
}
|
||||
#endif // def HAS_AUDIT_CHILDREN
|
||||
|
@ -410,7 +412,8 @@ OctreeElement* OctreeElement::getChildAtIndex(int childIndex) const {
|
|||
if (externalIndex < childCount && externalIndex >= 0) {
|
||||
result = _children.external[externalIndex];
|
||||
} else {
|
||||
qDebug("getChildAtIndex() attempt to access external client out of bounds externalIndex=%d <<<<<<<<<< WARNING!!! \n",externalIndex);
|
||||
qDebug("getChildAtIndex() attempt to access external client out of bounds externalIndex=%d <<<<<<<<<< WARNING!!!
|
||||
",externalIndex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -420,7 +423,7 @@ OctreeElement* OctreeElement::getChildAtIndex(int childIndex) const {
|
|||
}
|
||||
#ifdef HAS_AUDIT_CHILDREN
|
||||
if (result != _childrenArray[childIndex]) {
|
||||
qDebug("getChildAtIndex() case:%s result<%p> != _childrenArray[childIndex]<%p> <<<<<<<<<< WARNING!!! \n",
|
||||
qDebug("getChildAtIndex() case:%s result<%p> != _childrenArray[childIndex]<%p> <<<<<<<<<< WARNING!!!",
|
||||
caseStr, result,_childrenArray[childIndex]);
|
||||
}
|
||||
#endif // def HAS_AUDIT_CHILDREN
|
||||
|
@ -1083,7 +1086,7 @@ void OctreeElement::setChildAtIndex(int childIndex, OctreeElement* child) {
|
|||
_externalChildrenMemoryUsage += newChildCount * sizeof(OctreeElement*);
|
||||
} else {
|
||||
//assert(false);
|
||||
qDebug("THIS SHOULD NOT HAPPEN previousChildCount == %d && newChildCount == %d\n",previousChildCount, newChildCount);
|
||||
qDebug("THIS SHOULD NOT HAPPEN previousChildCount == %d && newChildCount == %d",previousChildCount, newChildCount);
|
||||
}
|
||||
|
||||
// check to see if we could store these 4 children locally
|
||||
|
@ -1123,7 +1126,7 @@ OctreeElement* OctreeElement::addChildAtIndex(int childIndex) {
|
|||
bool OctreeElement::safeDeepDeleteChildAtIndex(int childIndex, int recursionCount) {
|
||||
bool deleteApproved = false;
|
||||
if (recursionCount > DANGEROUSLY_DEEP_RECURSION) {
|
||||
qDebug() << "OctreeElement::safeDeepDeleteChildAtIndex() reached DANGEROUSLY_DEEP_RECURSION, bailing!\n";
|
||||
qDebug() << "OctreeElement::safeDeepDeleteChildAtIndex() reached DANGEROUSLY_DEEP_RECURSION, bailing!";
|
||||
return deleteApproved;
|
||||
}
|
||||
OctreeElement* childToDelete = getChildAtIndex(childIndex);
|
||||
|
@ -1162,13 +1165,17 @@ void OctreeElement::printDebugDetails(const char* label) const {
|
|||
setAtBit(childBits,i);
|
||||
}
|
||||
}
|
||||
|
||||
QDebug elementDebug = qDebug().nospace();
|
||||
|
||||
qDebug("%s - Voxel at corner=(%f,%f,%f) size=%f\n isLeaf=%s isDirty=%s shouldRender=%s\n children=", label,
|
||||
_box.getCorner().x, _box.getCorner().y, _box.getCorner().z, _box.getScale(),
|
||||
debug::valueOf(isLeaf()), debug::valueOf(isDirty()), debug::valueOf(getShouldRender()));
|
||||
QString resultString;
|
||||
resultString.sprintf("%s - Voxel at corner=(%f,%f,%f) size=%f\n isLeaf=%s isDirty=%s shouldRender=%s\n children=", label,
|
||||
_box.getCorner().x, _box.getCorner().y, _box.getCorner().z, _box.getScale(),
|
||||
debug::valueOf(isLeaf()), debug::valueOf(isDirty()), debug::valueOf(getShouldRender()));
|
||||
elementDebug << resultString;
|
||||
|
||||
outputBits(childBits, false);
|
||||
qDebug("\n octalCode=");
|
||||
outputBits(childBits, &elementDebug);
|
||||
qDebug("octalCode=");
|
||||
printOctalCode(getOctalCode());
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ bool OctreePersistThread::process() {
|
|||
|
||||
if (!_initialLoadComplete) {
|
||||
uint64_t loadStarted = usecTimestampNow();
|
||||
qDebug() << "loading Octrees from file: " << _filename << "...\n";
|
||||
qDebug() << "loading Octrees from file: " << _filename << "...";
|
||||
|
||||
bool persistantFileRead;
|
||||
|
||||
|
@ -42,20 +42,20 @@ bool OctreePersistThread::process() {
|
|||
_loadTimeUSecs = loadDone - loadStarted;
|
||||
|
||||
_tree->clearDirtyBit(); // the tree is clean since we just loaded it
|
||||
qDebug("DONE loading Octrees from file... fileRead=%s\n", debug::valueOf(persistantFileRead));
|
||||
qDebug("DONE loading Octrees from file... fileRead=%s", debug::valueOf(persistantFileRead));
|
||||
|
||||
unsigned long nodeCount = OctreeElement::getNodeCount();
|
||||
unsigned long internalNodeCount = OctreeElement::getInternalNodeCount();
|
||||
unsigned long leafNodeCount = OctreeElement::getLeafNodeCount();
|
||||
qDebug("Nodes after loading scene %lu nodes %lu internal %lu leaves\n", nodeCount, internalNodeCount, leafNodeCount);
|
||||
qDebug("Nodes after loading scene %lu nodes %lu internal %lu leaves", nodeCount, internalNodeCount, leafNodeCount);
|
||||
|
||||
double usecPerGet = (double)OctreeElement::getGetChildAtIndexTime() / (double)OctreeElement::getGetChildAtIndexCalls();
|
||||
qDebug() << "getChildAtIndexCalls=" << OctreeElement::getGetChildAtIndexCalls()
|
||||
<< " getChildAtIndexTime=" << OctreeElement::getGetChildAtIndexTime() << " perGet=" << usecPerGet << " \n";
|
||||
<< " getChildAtIndexTime=" << OctreeElement::getGetChildAtIndexTime() << " perGet=" << usecPerGet;
|
||||
|
||||
double usecPerSet = (double)OctreeElement::getSetChildAtIndexTime() / (double)OctreeElement::getSetChildAtIndexCalls();
|
||||
qDebug() << "setChildAtIndexCalls=" << OctreeElement::getSetChildAtIndexCalls()
|
||||
<< " setChildAtIndexTime=" << OctreeElement::getSetChildAtIndexTime() << " perset=" << usecPerSet << " \n";
|
||||
<< " setChildAtIndexTime=" << OctreeElement::getSetChildAtIndexTime() << " perset=" << usecPerSet;
|
||||
|
||||
_initialLoadComplete = true;
|
||||
_lastCheck = usecTimestampNow(); // we just loaded, no need to save again
|
||||
|
@ -81,10 +81,10 @@ bool OctreePersistThread::process() {
|
|||
// check the dirty bit and persist here...
|
||||
_lastCheck = usecTimestampNow();
|
||||
if (_tree->isDirty()) {
|
||||
qDebug() << "saving Octrees to file " << _filename << "...\n";
|
||||
qDebug() << "saving Octrees to file " << _filename << "...";
|
||||
_tree->writeToSVOFile(_filename.toLocal8Bit().constData());
|
||||
_tree->clearDirtyBit(); // tree is clean after saving
|
||||
qDebug("DONE saving Octrees to file...\n");
|
||||
qDebug("DONE saving Octrees to file...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,13 +90,9 @@ void BoundingBox::explandToInclude(const BoundingBox& box) {
|
|||
|
||||
|
||||
void BoundingBox::printDebugDetails(const char* label) const {
|
||||
if (label) {
|
||||
qDebug() << label;
|
||||
} else {
|
||||
qDebug("BoundingBox");
|
||||
}
|
||||
qDebug("\n _set=%s\n corner=%f,%f size=%f,%f\n bounds=[(%f,%f) to (%f,%f)]\n",
|
||||
debug::valueOf(_set), corner.x, corner.y, size.x, size.y, corner.x, corner.y, corner.x+size.x, corner.y+size.y);
|
||||
qDebug("%s _set=%s\n corner=%f,%f size=%f,%f\n bounds=[(%f,%f) to (%f,%f)]",
|
||||
(label ? label : "BoundingBox"),
|
||||
debug::valueOf(_set), corner.x, corner.y, size.x, size.y, corner.x, corner.y, corner.x+size.x, corner.y+size.y);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -65,10 +65,9 @@ void OctreeRenderer::processDatagram(const QByteArray& dataByteArray, const Hifi
|
|||
|
||||
if (extraDebugging) {
|
||||
qDebug("OctreeRenderer::processDatagram() ... Got Packet Section"
|
||||
" color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d"
|
||||
"\n",
|
||||
debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
|
||||
sequence, flightTime, packetLength, dataBytes);
|
||||
" color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d",
|
||||
debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
|
||||
sequence, flightTime, packetLength, dataBytes);
|
||||
}
|
||||
|
||||
int subsection = 1;
|
||||
|
@ -96,9 +95,10 @@ void OctreeRenderer::processDatagram(const QByteArray& dataByteArray, const Hifi
|
|||
if (extraDebugging) {
|
||||
qDebug("OctreeRenderer::processDatagram() ... Got Packet Section"
|
||||
" color:%s compressed:%s sequence: %u flight:%d usec size:%d data:%d"
|
||||
" subsection:%d sectionLength:%d uncompressed:%d\n",
|
||||
debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
|
||||
sequence, flightTime, packetLength, dataBytes, subsection, sectionLength, packetData.getUncompressedSize());
|
||||
" subsection:%d sectionLength:%d uncompressed:%d",
|
||||
debug::valueOf(packetIsColored), debug::valueOf(packetIsCompressed),
|
||||
sequence, flightTime, packetLength, dataBytes, subsection, sectionLength,
|
||||
packetData.getUncompressedSize());
|
||||
}
|
||||
_tree->readBitstreamToTree(packetData.getUncompressedData(), packetData.getUncompressedSize(), args);
|
||||
_tree->unlock();
|
||||
|
|
|
@ -624,52 +624,51 @@ int OctreeSceneStats::unpackFromMessage(unsigned char* sourceBuffer, int availab
|
|||
|
||||
|
||||
void OctreeSceneStats::printDebugDetails() {
|
||||
qDebug("\n------------------------------\n");
|
||||
qDebug("OctreeSceneStats:\n");
|
||||
qDebug(" start : %llu \n", (long long unsigned int)_start);
|
||||
qDebug(" end : %llu \n", (long long unsigned int)_end);
|
||||
qDebug(" elapsed : %llu \n", (long long unsigned int)_elapsed);
|
||||
qDebug(" encoding : %llu \n", (long long unsigned int)_totalEncodeTime);
|
||||
qDebug("\n");
|
||||
qDebug(" full scene: %s\n", debug::valueOf(_isFullScene));
|
||||
qDebug(" moving: %s\n", debug::valueOf(_isMoving));
|
||||
qDebug("\n");
|
||||
qDebug(" packets: %d\n", _packets);
|
||||
qDebug(" bytes : %ld\n", _bytes);
|
||||
qDebug("\n");
|
||||
qDebug(" total elements : %lu\n", _totalElements );
|
||||
qDebug(" internal : %lu\n", _totalInternal );
|
||||
qDebug(" leaves : %lu\n", _totalLeaves );
|
||||
qDebug(" traversed : %lu\n", _traversed );
|
||||
qDebug(" internal : %lu\n", _internal );
|
||||
qDebug(" leaves : %lu\n", _leaves );
|
||||
qDebug(" skipped distance : %lu\n", _skippedDistance );
|
||||
qDebug(" internal : %lu\n", _internalSkippedDistance );
|
||||
qDebug(" leaves : %lu\n", _leavesSkippedDistance );
|
||||
qDebug(" skipped out of view : %lu\n", _skippedOutOfView );
|
||||
qDebug(" internal : %lu\n", _internalSkippedOutOfView );
|
||||
qDebug(" leaves : %lu\n", _leavesSkippedOutOfView );
|
||||
qDebug(" skipped was in view : %lu\n", _skippedWasInView );
|
||||
qDebug(" internal : %lu\n", _internalSkippedWasInView );
|
||||
qDebug(" leaves : %lu\n", _leavesSkippedWasInView );
|
||||
qDebug(" skipped no change : %lu\n", _skippedNoChange );
|
||||
qDebug(" internal : %lu\n", _internalSkippedNoChange );
|
||||
qDebug(" leaves : %lu\n", _leavesSkippedNoChange );
|
||||
qDebug(" skipped occluded : %lu\n", _skippedOccluded );
|
||||
qDebug(" internal : %lu\n", _internalSkippedOccluded );
|
||||
qDebug(" leaves : %lu\n", _leavesSkippedOccluded );
|
||||
|
||||
qDebug("\n");
|
||||
qDebug(" color sent : %lu\n", _colorSent );
|
||||
qDebug(" internal : %lu\n", _internalColorSent );
|
||||
qDebug(" leaves : %lu\n", _leavesColorSent );
|
||||
qDebug(" Didn't Fit : %lu\n", _didntFit );
|
||||
qDebug(" internal : %lu\n", _internalDidntFit );
|
||||
qDebug(" leaves : %lu\n", _leavesDidntFit );
|
||||
qDebug(" color bits : %lu\n", _colorBitsWritten );
|
||||
qDebug(" exists bits : %lu\n", _existsBitsWritten );
|
||||
qDebug(" in packet bit : %lu\n", _existsInPacketBitsWritten);
|
||||
qDebug(" trees removed : %lu\n", _treesRemoved );
|
||||
qDebug("\n------------------------------");
|
||||
qDebug("OctreeSceneStats:");
|
||||
qDebug(" start : %llu", (long long unsigned int)_start);
|
||||
qDebug(" end : %llu", (long long unsigned int)_end);
|
||||
qDebug(" elapsed : %llu", (long long unsigned int)_elapsed);
|
||||
qDebug(" encoding : %llu", (long long unsigned int)_totalEncodeTime);
|
||||
qDebug();
|
||||
qDebug(" full scene: %s", debug::valueOf(_isFullScene));
|
||||
qDebug(" moving: %s", debug::valueOf(_isMoving));
|
||||
qDebug();
|
||||
qDebug(" packets: %d", _packets);
|
||||
qDebug(" bytes : %ld", _bytes);
|
||||
qDebug();
|
||||
qDebug(" total elements : %lu", _totalElements );
|
||||
qDebug(" internal : %lu", _totalInternal );
|
||||
qDebug(" leaves : %lu", _totalLeaves );
|
||||
qDebug(" traversed : %lu", _traversed );
|
||||
qDebug(" internal : %lu", _internal );
|
||||
qDebug(" leaves : %lu", _leaves );
|
||||
qDebug(" skipped distance : %lu", _skippedDistance );
|
||||
qDebug(" internal : %lu", _internalSkippedDistance );
|
||||
qDebug(" leaves : %lu", _leavesSkippedDistance );
|
||||
qDebug(" skipped out of view : %lu", _skippedOutOfView );
|
||||
qDebug(" internal : %lu", _internalSkippedOutOfView );
|
||||
qDebug(" leaves : %lu", _leavesSkippedOutOfView );
|
||||
qDebug(" skipped was in view : %lu", _skippedWasInView );
|
||||
qDebug(" internal : %lu", _internalSkippedWasInView );
|
||||
qDebug(" leaves : %lu", _leavesSkippedWasInView );
|
||||
qDebug(" skipped no change : %lu", _skippedNoChange );
|
||||
qDebug(" internal : %lu", _internalSkippedNoChange );
|
||||
qDebug(" leaves : %lu", _leavesSkippedNoChange );
|
||||
qDebug(" skipped occluded : %lu", _skippedOccluded );
|
||||
qDebug(" internal : %lu", _internalSkippedOccluded );
|
||||
qDebug(" leaves : %lu", _leavesSkippedOccluded );
|
||||
qDebug();
|
||||
qDebug(" color sent : %lu", _colorSent );
|
||||
qDebug(" internal : %lu", _internalColorSent );
|
||||
qDebug(" leaves : %lu", _leavesColorSent );
|
||||
qDebug(" Didn't Fit : %lu", _didntFit );
|
||||
qDebug(" internal : %lu", _internalDidntFit );
|
||||
qDebug(" leaves : %lu", _leavesDidntFit );
|
||||
qDebug(" color bits : %lu", _colorBitsWritten );
|
||||
qDebug(" exists bits : %lu", _existsBitsWritten );
|
||||
qDebug(" in packet bit : %lu", _existsInPacketBitsWritten);
|
||||
qDebug(" trees removed : %lu", _treesRemoved );
|
||||
}
|
||||
|
||||
OctreeSceneStats::ItemInfo OctreeSceneStats::_ITEMS[] = {
|
||||
|
|
|
@ -326,43 +326,43 @@ bool ViewFrustum::matches(const ViewFrustum& compareTo, bool debug) const {
|
|||
testMatches(compareTo._eyeOffsetOrientation, _eyeOffsetOrientation);
|
||||
|
||||
if (!result && debug) {
|
||||
qDebug("ViewFrustum::matches()... result=%s\n", debug::valueOf(result));
|
||||
qDebug("%s -- compareTo._position=%f,%f,%f _position=%f,%f,%f\n",
|
||||
qDebug("ViewFrustum::matches()... result=%s", debug::valueOf(result));
|
||||
qDebug("%s -- compareTo._position=%f,%f,%f _position=%f,%f,%f",
|
||||
(testMatches(compareTo._position,_position) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._position.x, compareTo._position.y, compareTo._position.z,
|
||||
_position.x, _position.y, _position.z );
|
||||
qDebug("%s -- compareTo._direction=%f,%f,%f _direction=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._direction=%f,%f,%f _direction=%f,%f,%f",
|
||||
(testMatches(compareTo._direction, _direction) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._direction.x, compareTo._direction.y, compareTo._direction.z,
|
||||
_direction.x, _direction.y, _direction.z );
|
||||
qDebug("%s -- compareTo._up=%f,%f,%f _up=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._up=%f,%f,%f _up=%f,%f,%f",
|
||||
(testMatches(compareTo._up, _up) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._up.x, compareTo._up.y, compareTo._up.z,
|
||||
_up.x, _up.y, _up.z );
|
||||
qDebug("%s -- compareTo._right=%f,%f,%f _right=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._right=%f,%f,%f _right=%f,%f,%f",
|
||||
(testMatches(compareTo._right, _right) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._right.x, compareTo._right.y, compareTo._right.z,
|
||||
_right.x, _right.y, _right.z );
|
||||
qDebug("%s -- compareTo._fieldOfView=%f _fieldOfView=%f\n",
|
||||
qDebug("%s -- compareTo._fieldOfView=%f _fieldOfView=%f",
|
||||
(testMatches(compareTo._fieldOfView, _fieldOfView) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._fieldOfView, _fieldOfView);
|
||||
qDebug("%s -- compareTo._aspectRatio=%f _aspectRatio=%f\n",
|
||||
qDebug("%s -- compareTo._aspectRatio=%f _aspectRatio=%f",
|
||||
(testMatches(compareTo._aspectRatio, _aspectRatio) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._aspectRatio, _aspectRatio);
|
||||
qDebug("%s -- compareTo._nearClip=%f _nearClip=%f\n",
|
||||
qDebug("%s -- compareTo._nearClip=%f _nearClip=%f",
|
||||
(testMatches(compareTo._nearClip, _nearClip) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._nearClip, _nearClip);
|
||||
qDebug("%s -- compareTo._farClip=%f _farClip=%f\n",
|
||||
qDebug("%s -- compareTo._farClip=%f _farClip=%f",
|
||||
(testMatches(compareTo._farClip, _farClip) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._farClip, _farClip);
|
||||
qDebug("%s -- compareTo._focalLength=%f _focalLength=%f\n",
|
||||
qDebug("%s -- compareTo._focalLength=%f _focalLength=%f",
|
||||
(testMatches(compareTo._focalLength, _focalLength) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._focalLength, _focalLength);
|
||||
qDebug("%s -- compareTo._eyeOffsetPosition=%f,%f,%f _eyeOffsetPosition=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._eyeOffsetPosition=%f,%f,%f _eyeOffsetPosition=%f,%f,%f",
|
||||
(testMatches(compareTo._eyeOffsetPosition, _eyeOffsetPosition) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._eyeOffsetPosition.x, compareTo._eyeOffsetPosition.y, compareTo._eyeOffsetPosition.z,
|
||||
_eyeOffsetPosition.x, _eyeOffsetPosition.y, _eyeOffsetPosition.z);
|
||||
qDebug("%s -- compareTo._eyeOffsetOrientation=%f,%f,%f,%f _eyeOffsetOrientation=%f,%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._eyeOffsetOrientation=%f,%f,%f,%f _eyeOffsetOrientation=%f,%f,%f,%f",
|
||||
(testMatches(compareTo._eyeOffsetOrientation, _eyeOffsetOrientation) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._eyeOffsetOrientation.x, compareTo._eyeOffsetOrientation.y,
|
||||
compareTo._eyeOffsetOrientation.z, compareTo._eyeOffsetOrientation.w,
|
||||
|
@ -413,45 +413,45 @@ bool ViewFrustum::isVerySimilar(const ViewFrustum& compareTo, bool debug) const
|
|||
|
||||
if (!result && debug) {
|
||||
qDebug("ViewFrustum::isVerySimilar()... result=%s\n", debug::valueOf(result));
|
||||
qDebug("%s -- compareTo._position=%f,%f,%f _position=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._position=%f,%f,%f _position=%f,%f,%f",
|
||||
(testMatches(compareTo._position,_position, POSITION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
compareTo._position.x, compareTo._position.y, compareTo._position.z,
|
||||
_position.x, _position.y, _position.z );
|
||||
|
||||
qDebug("%s -- positionDistance=%f\n",
|
||||
qDebug("%s -- positionDistance=%f",
|
||||
(testMatches(0,positionDistance, POSITION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
positionDistance);
|
||||
|
||||
qDebug("%s -- angleOrientation=%f\n",
|
||||
qDebug("%s -- angleOrientation=%f",
|
||||
(testMatches(0, angleOrientation, ORIENTATION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
angleOrientation);
|
||||
|
||||
qDebug("%s -- compareTo._fieldOfView=%f _fieldOfView=%f\n",
|
||||
qDebug("%s -- compareTo._fieldOfView=%f _fieldOfView=%f",
|
||||
(testMatches(compareTo._fieldOfView, _fieldOfView) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._fieldOfView, _fieldOfView);
|
||||
qDebug("%s -- compareTo._aspectRatio=%f _aspectRatio=%f\n",
|
||||
qDebug("%s -- compareTo._aspectRatio=%f _aspectRatio=%f",
|
||||
(testMatches(compareTo._aspectRatio, _aspectRatio) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._aspectRatio, _aspectRatio);
|
||||
qDebug("%s -- compareTo._nearClip=%f _nearClip=%f\n",
|
||||
qDebug("%s -- compareTo._nearClip=%f _nearClip=%f",
|
||||
(testMatches(compareTo._nearClip, _nearClip) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._nearClip, _nearClip);
|
||||
qDebug("%s -- compareTo._farClip=%f _farClip=%f\n",
|
||||
qDebug("%s -- compareTo._farClip=%f _farClip=%f",
|
||||
(testMatches(compareTo._farClip, _farClip) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._farClip, _farClip);
|
||||
qDebug("%s -- compareTo._focalLength=%f _focalLength=%f\n",
|
||||
qDebug("%s -- compareTo._focalLength=%f _focalLength=%f",
|
||||
(testMatches(compareTo._focalLength, _focalLength) ? "MATCHES " : "NO MATCH"),
|
||||
compareTo._focalLength, _focalLength);
|
||||
|
||||
qDebug("%s -- compareTo._eyeOffsetPosition=%f,%f,%f _eyeOffsetPosition=%f,%f,%f\n",
|
||||
qDebug("%s -- compareTo._eyeOffsetPosition=%f,%f,%f _eyeOffsetPosition=%f,%f,%f",
|
||||
(testMatches(compareTo._eyeOffsetPosition, _eyeOffsetPosition, POSITION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
compareTo._eyeOffsetPosition.x, compareTo._eyeOffsetPosition.y, compareTo._eyeOffsetPosition.z,
|
||||
_eyeOffsetPosition.x, _eyeOffsetPosition.y, _eyeOffsetPosition.z);
|
||||
|
||||
qDebug("%s -- eyeOffsetpositionDistance=%f\n",
|
||||
qDebug("%s -- eyeOffsetpositionDistance=%f",
|
||||
(testMatches(0,eyeOffsetpositionDistance, EYEOFFSET_POSITION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
eyeOffsetpositionDistance);
|
||||
|
||||
qDebug("%s -- angleEyeOffsetOrientation=%f\n",
|
||||
qDebug("%s -- angleEyeOffsetOrientation=%f",
|
||||
(testMatches(0, angleEyeOffsetOrientation, ORIENTATION_SIMILAR_ENOUGH) ? "IS SIMILAR ENOUGH " : "IS NOT SIMILAR ENOUGH"),
|
||||
angleEyeOffsetOrientation);
|
||||
}
|
||||
|
@ -518,19 +518,19 @@ void ViewFrustum::computeOffAxisFrustum(float& left, float& right, float& bottom
|
|||
}
|
||||
|
||||
void ViewFrustum::printDebugDetails() const {
|
||||
qDebug("ViewFrustum::printDebugDetails()... \n");
|
||||
qDebug("_position=%f,%f,%f\n", _position.x, _position.y, _position.z );
|
||||
qDebug("_direction=%f,%f,%f\n", _direction.x, _direction.y, _direction.z );
|
||||
qDebug("_up=%f,%f,%f\n", _up.x, _up.y, _up.z );
|
||||
qDebug("_right=%f,%f,%f\n", _right.x, _right.y, _right.z );
|
||||
qDebug("_fieldOfView=%f\n", _fieldOfView);
|
||||
qDebug("_aspectRatio=%f\n", _aspectRatio);
|
||||
qDebug("_keyHoleRadius=%f\n", _keyholeRadius);
|
||||
qDebug("_nearClip=%f\n", _nearClip);
|
||||
qDebug("_farClip=%f\n", _farClip);
|
||||
qDebug("_focalLength=%f\n", _focalLength);
|
||||
qDebug("_eyeOffsetPosition=%f,%f,%f\n", _eyeOffsetPosition.x, _eyeOffsetPosition.y, _eyeOffsetPosition.z );
|
||||
qDebug("_eyeOffsetOrientation=%f,%f,%f,%f\n", _eyeOffsetOrientation.x, _eyeOffsetOrientation.y, _eyeOffsetOrientation.z,
|
||||
qDebug("ViewFrustum::printDebugDetails()...");
|
||||
qDebug("_position=%f,%f,%f", _position.x, _position.y, _position.z );
|
||||
qDebug("_direction=%f,%f,%f", _direction.x, _direction.y, _direction.z );
|
||||
qDebug("_up=%f,%f,%f", _up.x, _up.y, _up.z );
|
||||
qDebug("_right=%f,%f,%f", _right.x, _right.y, _right.z );
|
||||
qDebug("_fieldOfView=%f", _fieldOfView);
|
||||
qDebug("_aspectRatio=%f", _aspectRatio);
|
||||
qDebug("_keyHoleRadius=%f", _keyholeRadius);
|
||||
qDebug("_nearClip=%f", _nearClip);
|
||||
qDebug("_farClip=%f", _farClip);
|
||||
qDebug("_focalLength=%f", _focalLength);
|
||||
qDebug("_eyeOffsetPosition=%f,%f,%f", _eyeOffsetPosition.x, _eyeOffsetPosition.y, _eyeOffsetPosition.z );
|
||||
qDebug("_eyeOffsetOrientation=%f,%f,%f,%f", _eyeOffsetOrientation.x, _eyeOffsetOrientation.y, _eyeOffsetOrientation.z,
|
||||
_eyeOffsetOrientation.w );
|
||||
}
|
||||
|
||||
|
|
|
@ -467,10 +467,10 @@ void Particle::adjustEditPacketForClockSkew(unsigned char* codeColorBuffer, ssiz
|
|||
memcpy(dataAt, &lastEditedInServerTime, sizeof(lastEditedInServerTime));
|
||||
const bool wantDebug = false;
|
||||
if (wantDebug) {
|
||||
qDebug("Particle::adjustEditPacketForClockSkew()...\n");
|
||||
qDebug() << " lastEditedInLocalTime: " << lastEditedInLocalTime << "\n";
|
||||
qDebug() << " clockSkew: " << clockSkew << "\n";
|
||||
qDebug() << " lastEditedInServerTime: " << lastEditedInServerTime << "\n";
|
||||
qDebug("Particle::adjustEditPacketForClockSkew()...");
|
||||
qDebug() << " lastEditedInLocalTime: " << lastEditedInLocalTime;
|
||||
qDebug() << " clockSkew: " << clockSkew;
|
||||
qDebug() << " lastEditedInServerTime: " << lastEditedInServerTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include <GeometryUtil.h>
|
||||
|
||||
#include "ParticleTree.h"
|
||||
|
|
|
@ -145,11 +145,11 @@ void ScriptEngine::evaluate() {
|
|||
}
|
||||
|
||||
QScriptValue result = _engine.evaluate(_scriptContents);
|
||||
qDebug() << "Evaluated script.\n";
|
||||
qDebug("Evaluated script.");
|
||||
|
||||
if (_engine.hasUncaughtException()) {
|
||||
int line = _engine.uncaughtExceptionLineNumber();
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString() << "\n";
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,11 +160,11 @@ void ScriptEngine::run() {
|
|||
_isRunning = true;
|
||||
|
||||
QScriptValue result = _engine.evaluate(_scriptContents);
|
||||
qDebug() << "Evaluated script.\n";
|
||||
qDebug("Evaluated script");
|
||||
|
||||
if (_engine.hasUncaughtException()) {
|
||||
int line = _engine.uncaughtExceptionLineNumber();
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString() << "\n";
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << result.toString();
|
||||
}
|
||||
|
||||
timeval startTime;
|
||||
|
@ -221,7 +221,7 @@ void ScriptEngine::run() {
|
|||
|
||||
if (_engine.hasUncaughtException()) {
|
||||
int line = _engine.uncaughtExceptionLineNumber();
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << _engine.uncaughtException().toString() << "\n";
|
||||
qDebug() << "Uncaught exception at line" << line << ":" << _engine.uncaughtException().toString();
|
||||
}
|
||||
}
|
||||
cleanMenuItems();
|
||||
|
|
|
@ -149,7 +149,7 @@ void Assignment::swap(Assignment& otherAssignment) {
|
|||
void Assignment::setPayload(const uchar* payload, int numBytes) {
|
||||
|
||||
if (numBytes > MAX_PAYLOAD_BYTES) {
|
||||
qDebug("Set payload called with number of bytes greater than maximum (%d). Will only transfer %d bytes.\n",
|
||||
qDebug("Set payload called with number of bytes greater than maximum (%d). Will only transfer %d bytes.",
|
||||
MAX_PAYLOAD_BYTES,
|
||||
MAX_PAYLOAD_BYTES);
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include <cstring>
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include "SharedUtil.h"
|
||||
#include "GeometryUtil.h"
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ quint32 getHostOrderLocalAddress() {
|
|||
foreach(const QNetworkAddressEntry &entry, interface.addressEntries()) {
|
||||
// make sure it's an IPv4 address that isn't the loopback
|
||||
if (entry.ip().protocol() == QAbstractSocket::IPv4Protocol && !entry.ip().isLoopback()) {
|
||||
qDebug("Node's local address is %s\n", entry.ip().toString().toLocal8Bit().constData());
|
||||
qDebug("Node's local address is %s", entry.ip().toString().toLocal8Bit().constData());
|
||||
|
||||
// set our localAddress and break out
|
||||
localAddress = entry.ip().toIPv4Address();
|
||||
|
|
|
@ -117,5 +117,5 @@ void Logging::verboseMessageHandler(QtMsgType type, const QMessageLogContext& co
|
|||
prefixString.append(QString(" [%1]").arg(Logging::targetName));
|
||||
}
|
||||
|
||||
fprintf(stdout, "%s %s", prefixString.toLocal8Bit().constData(), message.toLocal8Bit().constData());
|
||||
fprintf(stdout, "%s %s\n", prefixString.toLocal8Bit().constData(), message.toLocal8Bit().constData());
|
||||
}
|
|
@ -29,7 +29,7 @@ void NetworkPacket::copyContents(const HifiSockAddr& sockAddr, const unsigned ch
|
|||
_packetLength = packetLength;
|
||||
memcpy(&_packetData[0], packetData, packetLength);
|
||||
} else {
|
||||
qDebug(">>> NetworkPacket::copyContents() unexpected length=%lu\n",packetLength);
|
||||
qDebug(">>> NetworkPacket::copyContents() unexpected length=%lu",packetLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,12 +107,12 @@ void Node::setLocalSocket(const HifiSockAddr& localSocket) {
|
|||
}
|
||||
|
||||
void Node::activateLocalSocket() {
|
||||
qDebug() << "Activating local socket for node" << *this << "\n";
|
||||
qDebug() << "Activating local socket for node" << *this;
|
||||
_activeSocket = &_localSocket;
|
||||
}
|
||||
|
||||
void Node::activatePublicSocket() {
|
||||
qDebug() << "Activating public socket for node" << *this << "\n";
|
||||
qDebug() << "Activating public socket for node" << *this;
|
||||
_activeSocket = &_publicSocket;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ NodeList::NodeList(char newOwnerType, unsigned short int newSocketListenPort) :
|
|||
_stunRequestsSinceSuccess(0)
|
||||
{
|
||||
_nodeSocket.bind(QHostAddress::AnyIPv4, newSocketListenPort);
|
||||
qDebug() << "NodeList socket is listening on" << _nodeSocket.localPort() << "\n";
|
||||
qDebug() << "NodeList socket is listening on" << _nodeSocket.localPort();
|
||||
}
|
||||
|
||||
NodeList::~NodeList() {
|
||||
|
@ -90,7 +90,7 @@ void NodeList::setDomainHostname(const QString& domainHostname) {
|
|||
// grab the port by reading the string after the colon
|
||||
_domainSockAddr.setPort(atoi(domainHostname.mid(colonIndex + 1, domainHostname.size()).toLocal8Bit().constData()));
|
||||
|
||||
qDebug() << "Updated hostname to" << _domainHostname << "and port to" << _domainSockAddr.getPort() << "\n";
|
||||
qDebug() << "Updated hostname to" << _domainHostname << "and port to" << _domainSockAddr.getPort();
|
||||
|
||||
} else {
|
||||
// no port included with the hostname, simply set the member variable and reset the domain server port to default
|
||||
|
@ -137,7 +137,7 @@ void NodeList::timePingReply(const HifiSockAddr& nodeAddress, unsigned char *pac
|
|||
" oneWayFlightTime: " << oneWayFlightTime << "\n" <<
|
||||
" othersReplyTime: " << othersReplyTime << "\n" <<
|
||||
" othersExprectedReply: " << othersExprectedReply << "\n" <<
|
||||
" clockSkew: " << clockSkew << "\n";
|
||||
" clockSkew: " << clockSkew;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ int NodeList::getNumAliveNodes() const {
|
|||
}
|
||||
|
||||
void NodeList::clear() {
|
||||
qDebug() << "Clearing the NodeList. Deleting all nodes in list.\n";
|
||||
qDebug() << "Clearing the NodeList. Deleting all nodes in list.";
|
||||
|
||||
// delete all of the nodes in the list, set the pointers back to NULL and the number of nodes to 0
|
||||
for (int i = 0; i < _numNodes; i++) {
|
||||
|
@ -358,7 +358,7 @@ void NodeList::sendSTUNRequest() {
|
|||
static HifiSockAddr stunSockAddr(STUN_SERVER_HOSTNAME, STUN_SERVER_PORT);
|
||||
|
||||
if (!_hasCompletedInitialSTUNFailure) {
|
||||
qDebug("Sending intial stun request to %s\n", stunSockAddr.getAddress().toString().toLocal8Bit().constData());
|
||||
qDebug("Sending intial stun request to %s", stunSockAddr.getAddress().toString().toLocal8Bit().constData());
|
||||
}
|
||||
|
||||
_nodeSocket.writeDatagram((char*) stunRequestPacket, sizeof(stunRequestPacket),
|
||||
|
@ -370,7 +370,7 @@ void NodeList::sendSTUNRequest() {
|
|||
if (!_hasCompletedInitialSTUNFailure) {
|
||||
// if we're here this was the last failed STUN request
|
||||
// use our DS as our stun server
|
||||
qDebug("Failed to lookup public address via STUN server at %s:%hu. Using DS for STUN.\n",
|
||||
qDebug("Failed to lookup public address via STUN server at %s:%hu. Using DS for STUN.",
|
||||
STUN_SERVER_HOSTNAME, STUN_SERVER_PORT);
|
||||
|
||||
_hasCompletedInitialSTUNFailure = true;
|
||||
|
@ -433,7 +433,7 @@ void NodeList::processSTUNResponse(unsigned char* packetData, size_t dataBytes)
|
|||
if (newPublicAddress != _publicSockAddr.getAddress() || newPublicPort != _publicSockAddr.getPort()) {
|
||||
_publicSockAddr = HifiSockAddr(newPublicAddress, newPublicPort);
|
||||
|
||||
qDebug("New public socket received from STUN server is %s:%hu\n",
|
||||
qDebug("New public socket received from STUN server is %s:%hu",
|
||||
_publicSockAddr.getAddress().toString().toLocal8Bit().constData(),
|
||||
_publicSockAddr.getPort());
|
||||
|
||||
|
@ -494,7 +494,7 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
|
||||
// Lookup the IP address of the domain server if we need to
|
||||
if (_domainSockAddr.getAddress().isNull()) {
|
||||
qDebug("Looking up DS hostname %s.\n", _domainHostname.toLocal8Bit().constData());
|
||||
qDebug("Looking up DS hostname %s.", _domainHostname.toLocal8Bit().constData());
|
||||
|
||||
QHostInfo domainServerHostInfo = QHostInfo::fromName(_domainHostname);
|
||||
|
||||
|
@ -502,7 +502,7 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
if (domainServerHostInfo.addresses()[i].protocol() == QAbstractSocket::IPv4Protocol) {
|
||||
_domainSockAddr.setAddress(domainServerHostInfo.addresses()[i]);
|
||||
|
||||
qDebug("DS at %s is at %s\n", _domainHostname.toLocal8Bit().constData(),
|
||||
qDebug("DS at %s is at %s", _domainHostname.toLocal8Bit().constData(),
|
||||
_domainSockAddr.getAddress().toString().toLocal8Bit().constData());
|
||||
|
||||
printedDomainServerIP = true;
|
||||
|
@ -512,11 +512,11 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
|
||||
// if we got here without a break out of the for loop then we failed to lookup the address
|
||||
if (i == domainServerHostInfo.addresses().size() - 1) {
|
||||
qDebug("Failed domain server lookup\n");
|
||||
qDebug("Failed domain server lookup");
|
||||
}
|
||||
}
|
||||
} else if (!printedDomainServerIP) {
|
||||
qDebug("Domain Server IP: %s\n", _domainSockAddr.getAddress().toString().toLocal8Bit().constData());
|
||||
qDebug("Domain Server IP: %s", _domainSockAddr.getAddress().toString().toLocal8Bit().constData());
|
||||
printedDomainServerIP = true;
|
||||
}
|
||||
|
||||
|
@ -713,12 +713,12 @@ Node* NodeList::addOrUpdateNode(const QUuid& uuid, char nodeType,
|
|||
// check if we need to change this node's public or local sockets
|
||||
if (publicSocket != node->getPublicSocket()) {
|
||||
node->setPublicSocket(publicSocket);
|
||||
qDebug() << "Public socket change for node" << *node << "\n";
|
||||
qDebug() << "Public socket change for node" << *node;
|
||||
}
|
||||
|
||||
if (localSocket != node->getLocalSocket()) {
|
||||
node->setLocalSocket(localSocket);
|
||||
qDebug() << "Local socket change for node" << *node << "\n";
|
||||
qDebug() << "Local socket change for node" << *node;
|
||||
}
|
||||
|
||||
node->unlock();
|
||||
|
@ -740,7 +740,7 @@ void NodeList::addNodeToList(Node* newNode) {
|
|||
|
||||
++_numNodes;
|
||||
|
||||
qDebug() << "Added" << *newNode << "\n";
|
||||
qDebug() << "Added" << *newNode;
|
||||
|
||||
notifyHooksOfAddedNode(newNode);
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ void NodeList::killNode(Node* node, bool mustLockNode) {
|
|||
node->lock();
|
||||
}
|
||||
|
||||
qDebug() << "Killed " << *node << "\n";
|
||||
qDebug() << "Killed " << *node;
|
||||
|
||||
notifyHooksOfKilledNode(&*node);
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ int numberOfThreeBitSectionsInCode(const unsigned char* octalCode, int maxBytes)
|
|||
|
||||
void printOctalCode(const unsigned char* octalCode) {
|
||||
if (!octalCode) {
|
||||
qDebug("NULL\n");
|
||||
qDebug("NULL");
|
||||
} else {
|
||||
QDebug continuedDebug = qDebug().nospace();
|
||||
for (int i = 0; i < bytesRequiredForCodeLength(numberOfThreeBitSectionsInCode(octalCode)); i++) {
|
||||
outputBits(octalCode[i],false);
|
||||
outputBits(octalCode[i], &continuedDebug);
|
||||
}
|
||||
qDebug("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ bool packetVersionMatch(unsigned char* packetHeader) {
|
|||
if (packetHeader[1] == versionForPacketType(packetHeader[0]) || packetHeader[0] == PACKET_TYPE_STUN_RESPONSE) {
|
||||
return true;
|
||||
} else {
|
||||
qDebug("There is a packet version mismatch for packet with header %c\n", packetHeader[0]);
|
||||
qDebug("There is a packet version mismatch for packet with header %c", packetHeader[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ PerfStat::~PerfStat() {
|
|||
}
|
||||
|
||||
if (wantDebugOut) {
|
||||
qDebug("PerfStats: %s elapsed:%f average:%lf count:%ld total:%lf ut:%ld us:%ld ue:%ld t:%ld s:%ld e:%ld\n",
|
||||
qDebug("PerfStats: %s elapsed:%f average:%lf count:%ld total:%lf ut:%ld us:%ld ue:%ld t:%ld s:%ld e:%ld",
|
||||
this->group.c_str(),elapsed,average,count,totalTime,
|
||||
(long)(end.tv_usec-start.tv_usec), (long)start.tv_usec, (long)end.tv_usec,
|
||||
(long)(end.tv_sec-start.tv_sec), (long)start.tv_sec, (long)end.tv_sec
|
||||
|
@ -113,20 +113,20 @@ PerformanceWarning::~PerformanceWarning() {
|
|||
if ((_alwaysDisplay || _renderWarningsOn) && elapsedmsec > 1) {
|
||||
if (elapsedmsec > 1000) {
|
||||
double elapsedsec = (end - _start) / 1000000.0;
|
||||
qDebug("%s took %.2lf seconds %s\n", _message, elapsedsec, (_alwaysDisplay ? "" : "WARNING!") );
|
||||
qDebug("%s took %.2lf seconds %s", _message, elapsedsec, (_alwaysDisplay ? "" : "WARNING!") );
|
||||
} else {
|
||||
if (_suppressShortTimings) {
|
||||
if (elapsedmsec > 10) {
|
||||
qDebug("%s took %.1lf milliseconds %s\n", _message, elapsedmsec,
|
||||
qDebug("%s took %.1lf milliseconds %s", _message, elapsedmsec,
|
||||
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
||||
}
|
||||
} else {
|
||||
qDebug("%s took %.2lf milliseconds %s\n", _message, elapsedmsec,
|
||||
qDebug("%s took %.2lf milliseconds %s", _message, elapsedmsec,
|
||||
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
||||
}
|
||||
}
|
||||
} else if (_alwaysDisplay) {
|
||||
qDebug("%s took %.2lf milliseconds\n", _message, elapsedmsec);
|
||||
qDebug("%s took %.2lf milliseconds", _message, elapsedmsec);
|
||||
}
|
||||
// if the caller gave us a pointer to store the running total, track it now.
|
||||
if (_runningTotal) {
|
||||
|
|
|
@ -65,30 +65,35 @@ bool shouldDo(float desiredInterval, float deltaTime) {
|
|||
return randFloat() < deltaTime / desiredInterval;
|
||||
}
|
||||
|
||||
void outputBufferBits(const unsigned char* buffer, int length, bool withNewLine) {
|
||||
void outputBufferBits(const unsigned char* buffer, int length, QDebug* continuedDebug) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
outputBits(buffer[i], false);
|
||||
}
|
||||
if (withNewLine) {
|
||||
qDebug("\n");
|
||||
outputBits(buffer[i], continuedDebug);
|
||||
}
|
||||
}
|
||||
|
||||
void outputBits(unsigned char byte, bool withNewLine, bool usePrintf) {
|
||||
if (isalnum(byte)) {
|
||||
usePrintf ? (void)printf("[ %d (%c): ", byte, byte) : qDebug("[ %d (%c): ", byte, byte);
|
||||
} else {
|
||||
usePrintf ? (void)printf("[ %d (0x%x): ", byte, byte) : qDebug("[ %d (0x%x): ", byte, byte);
|
||||
void outputBits(unsigned char byte, QDebug* continuedDebug) {
|
||||
QDebug debug = qDebug().nospace();
|
||||
|
||||
if (continuedDebug) {
|
||||
debug = *continuedDebug;
|
||||
}
|
||||
|
||||
QString resultString;
|
||||
|
||||
if (isalnum(byte)) {
|
||||
resultString.sprintf("[ %d (%c): ", byte, byte);
|
||||
} else {
|
||||
resultString.sprintf("[ %d (0x%x): ", byte, byte);
|
||||
}
|
||||
|
||||
debug << resultString;
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
usePrintf ? (void)printf("%d", byte >> (7 - i) & 1) : qDebug("%d", byte >> (7 - i) & 1);
|
||||
resultString.sprintf("%d", byte >> (7 - i) & 1);
|
||||
}
|
||||
usePrintf ? (void)printf(" ] ") : qDebug(" ] ");
|
||||
|
||||
if (withNewLine) {
|
||||
usePrintf ? (void)printf("\n") : qDebug("\n");
|
||||
}
|
||||
debug << resultString;
|
||||
debug << " ]";
|
||||
}
|
||||
|
||||
int numberOfOnes(unsigned char byte) {
|
||||
|
@ -465,15 +470,16 @@ void printVoxelCode(unsigned char* voxelCode) {
|
|||
unsigned int voxelSizeInOctets = (voxelSizeInBits/3);
|
||||
unsigned int voxelBufferSize = voxelSizeInBytes+1+3; // 1 for size, 3 for color
|
||||
|
||||
qDebug("octets=%d\n",octets);
|
||||
qDebug("voxelSizeInBits=%d\n",voxelSizeInBits);
|
||||
qDebug("voxelSizeInBytes=%d\n",voxelSizeInBytes);
|
||||
qDebug("voxelSizeInOctets=%d\n",voxelSizeInOctets);
|
||||
qDebug("voxelBufferSize=%d\n",voxelBufferSize);
|
||||
qDebug("octets=%d",octets);
|
||||
qDebug("voxelSizeInBits=%d",voxelSizeInBits);
|
||||
qDebug("voxelSizeInBytes=%d",voxelSizeInBytes);
|
||||
qDebug("voxelSizeInOctets=%d",voxelSizeInOctets);
|
||||
qDebug("voxelBufferSize=%d",voxelBufferSize);
|
||||
|
||||
for(int i=0;i<voxelBufferSize;i++) {
|
||||
qDebug("i=%d ",i);
|
||||
outputBits(voxelCode[i]);
|
||||
for(int i=0; i < voxelBufferSize; i++) {
|
||||
QDebug voxelBufferDebug = qDebug();
|
||||
voxelBufferDebug << "i =" << i;
|
||||
outputBits(voxelCode[i], &voxelBufferDebug);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ bool randomBoolean();
|
|||
|
||||
bool shouldDo(float desiredInterval, float deltaTime);
|
||||
|
||||
void outputBufferBits(const unsigned char* buffer, int length, bool withNewLine = true);
|
||||
void outputBits(unsigned char byte, bool withNewLine = true, bool usePrintf = false);
|
||||
void outputBufferBits(const unsigned char* buffer, int length, QDebug* continuedDebug = NULL);
|
||||
void outputBits(unsigned char byte, QDebug* continuedDebug = NULL);
|
||||
void printVoxelCode(unsigned char* voxelCode);
|
||||
int numberOfOnes(unsigned char byte);
|
||||
bool oneAtBit(unsigned char byte, int bitIndex);
|
||||
|
|
|
@ -58,14 +58,14 @@ void VoxelServer::beforeRun() {
|
|||
const char* SEND_ENVIRONMENTS = "--sendEnvironments";
|
||||
bool dontSendEnvironments = !cmdOptionExists(_argc, _argv, SEND_ENVIRONMENTS);
|
||||
if (dontSendEnvironments) {
|
||||
qDebug("Sending environments suppressed...\n");
|
||||
qDebug("Sending environments suppressed...");
|
||||
_sendEnvironments = false;
|
||||
} else {
|
||||
_sendEnvironments = true;
|
||||
// should we send environments? Default is yes, but this command line suppresses sending
|
||||
const char* MINIMAL_ENVIRONMENT = "--minimalEnvironment";
|
||||
_sendMinimalEnvironment = cmdOptionExists(_argc, _argv, MINIMAL_ENVIRONMENT);
|
||||
qDebug("Using Minimal Environment=%s\n", debug::valueOf(_sendMinimalEnvironment));
|
||||
qDebug("Using Minimal Environment=%s", debug::valueOf(_sendMinimalEnvironment));
|
||||
}
|
||||
qDebug("Sending environments=%s\n", debug::valueOf(_sendEnvironments));
|
||||
qDebug("Sending environments=%s", debug::valueOf(_sendEnvironments));
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ void VoxelTree::createSphere(float radius, float xc, float yc, float zc, float v
|
|||
|
||||
if (debug) {
|
||||
int percentComplete = 100 * (thisRadius/radius);
|
||||
qDebug("percentComplete=%d\n",percentComplete);
|
||||
qDebug("percentComplete=%d",percentComplete);
|
||||
}
|
||||
|
||||
for (float theta=0.0; theta <= 2 * M_PI; theta += angleDelta) {
|
||||
|
@ -143,7 +143,7 @@ void VoxelTree::createSphere(float radius, float xc, float yc, float zc, float v
|
|||
// 2) In all modes, we will use our "outer" color to draw the voxels. Otherwise we will use the average color
|
||||
if (lastLayer) {
|
||||
if (false && debug) {
|
||||
qDebug("adding candy shell: theta=%f phi=%f thisRadius=%f radius=%f\n",
|
||||
qDebug("adding candy shell: theta=%f phi=%f thisRadius=%f radius=%f",
|
||||
theta, phi, thisRadius,radius);
|
||||
}
|
||||
switch (mode) {
|
||||
|
@ -167,7 +167,7 @@ void VoxelTree::createSphere(float radius, float xc, float yc, float zc, float v
|
|||
green = (unsigned char)std::min(255, std::max(0, (int)(g1 + ((g2 - g1) * gradient))));
|
||||
blue = (unsigned char)std::min(255, std::max(0, (int)(b1 + ((b2 - b1) * gradient))));
|
||||
if (debug) {
|
||||
qDebug("perlin=%f gradient=%f color=(%d,%d,%d)\n",perlin, gradient, red, green, blue);
|
||||
qDebug("perlin=%f gradient=%f color=(%d,%d,%d)",perlin, gradient, red, green, blue);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
@ -468,14 +468,14 @@ bool VoxelTree::readFromSchematicFile(const char *fileName) {
|
|||
std::stringstream ss;
|
||||
int err = retrieveData(std::string(fileName), ss);
|
||||
if (err && ss.get() != TAG_Compound) {
|
||||
qDebug("[ERROR] Invalid schematic file.\n");
|
||||
qDebug("[ERROR] Invalid schematic file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
ss.get();
|
||||
TagCompound schematics(ss);
|
||||
if (!schematics.getBlocksId() || !schematics.getBlocksData()) {
|
||||
qDebug("[ERROR] Invalid schematic data.\n");
|
||||
qDebug("[ERROR] Invalid schematic data.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ bool VoxelTree::readFromSchematicFile(const char *fileName) {
|
|||
|
||||
for (int x = 0; x < schematics.getWidth(); ++x) {
|
||||
if (_stopImport) {
|
||||
qDebug("[DEBUG] Canceled import at %d voxels.\n", count);
|
||||
qDebug("[DEBUG] Canceled import at %d voxels.", count);
|
||||
_stopImport = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -551,7 +551,7 @@ bool VoxelTree::readFromSchematicFile(const char *fileName) {
|
|||
}
|
||||
|
||||
emit importProgress(100);
|
||||
qDebug("Created %d voxels from minecraft import.\n", count);
|
||||
qDebug("Created %d voxels from minecraft import.", count);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ void VoxelTree::readCodeColorBufferToTreeRecursion(VoxelTreeElement* node, ReadC
|
|||
}
|
||||
} else {
|
||||
if (!node->isLeaf()) {
|
||||
qDebug("WARNING! operation would require deleting children, add Voxel ignored!\n ");
|
||||
qDebug("WARNING! operation would require deleting children, add Voxel ignored!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <NodeList.h>
|
||||
#include <PerfStat.h>
|
||||
|
||||
|
|
|
@ -204,10 +204,10 @@ void processFillSVOFile(const char* fillSVOFile) {
|
|||
VoxelTree filledSVO(true); // reaveraging
|
||||
|
||||
originalSVO.readFromSVOFile(fillSVOFile);
|
||||
qDebug("Nodes after loading %lu nodes\n", originalSVO.getOctreeElementsCount());
|
||||
qDebug("Nodes after loading %lu nodes", originalSVO.getOctreeElementsCount());
|
||||
originalSVO.reaverageOctreeElements();
|
||||
qDebug("Original Voxels reAveraged\n");
|
||||
qDebug("Nodes after reaveraging %lu nodes\n", originalSVO.getOctreeElementsCount());
|
||||
qDebug("Original Voxels reAveraged");
|
||||
qDebug("Nodes after reaveraging %lu nodes", originalSVO.getOctreeElementsCount());
|
||||
|
||||
copyAndFillArgs args;
|
||||
args.destinationTree = &filledSVO;
|
||||
|
@ -215,23 +215,23 @@ void processFillSVOFile(const char* fillSVOFile) {
|
|||
args.outCount = 0;
|
||||
args.originalCount = originalSVO.getOctreeElementsCount();
|
||||
|
||||
printf("Begin processing...\n");
|
||||
printf("Begin processing...");
|
||||
originalSVO.recurseTreeWithOperation(copyAndFillOperation, &args);
|
||||
printf("DONE processing...\n");
|
||||
printf("DONE processing...");
|
||||
|
||||
qDebug("Original input nodes used for filling %lu nodes\n", args.originalCount);
|
||||
qDebug("Input nodes traversed during filling %lu nodes\n", args.inCount);
|
||||
qDebug("Nodes created during filling %lu nodes\n", args.outCount);
|
||||
qDebug("Nodes after filling %lu nodes\n", filledSVO.getOctreeElementsCount());
|
||||
qDebug("Original input nodes used for filling %lu nodes", args.originalCount);
|
||||
qDebug("Input nodes traversed during filling %lu nodes", args.inCount);
|
||||
qDebug("Nodes created during filling %lu nodes", args.outCount);
|
||||
qDebug("Nodes after filling %lu nodes", filledSVO.getOctreeElementsCount());
|
||||
|
||||
filledSVO.reaverageOctreeElements();
|
||||
qDebug("Nodes after reaveraging %lu nodes\n", filledSVO.getOctreeElementsCount());
|
||||
qDebug("Nodes after reaveraging %lu nodes", filledSVO.getOctreeElementsCount());
|
||||
|
||||
sprintf(outputFileName, "filled%s", fillSVOFile);
|
||||
printf("outputFile: %s\n", outputFileName);
|
||||
printf("outputFile: %s", outputFileName);
|
||||
filledSVO.writeToSVOFile(outputFileName);
|
||||
|
||||
printf("exiting now\n");
|
||||
printf("exiting now");
|
||||
}
|
||||
|
||||
void unitTest(VoxelTree * tree);
|
||||
|
@ -265,18 +265,18 @@ int main(int argc, const char * argv[])
|
|||
float z = zStr.toFloat()/TREE_SCALE; // 0.56540045166016;
|
||||
float s = sStr.toFloat()/TREE_SCALE; // 0.015625;
|
||||
|
||||
qDebug() << "Get Octal Code for:\n";
|
||||
qDebug() << " x:" << xStr << " [" << x << "] \n";
|
||||
qDebug() << " y:" << yStr << " [" << y << "] \n";
|
||||
qDebug() << " z:" << zStr << " [" << z << "] \n";
|
||||
qDebug() << " s:" << sStr << " [" << s << "] \n";
|
||||
qDebug() << "Get Octal Code for:";
|
||||
qDebug() << " x:" << xStr << " [" << x << "]";
|
||||
qDebug() << " y:" << yStr << " [" << y << "]";
|
||||
qDebug() << " z:" << zStr << " [" << z << "]";
|
||||
qDebug() << " s:" << sStr << " [" << s << "]";
|
||||
|
||||
unsigned char* octalCode = pointToVoxel(x, y, z, s);
|
||||
QString octalCodeStr = octalCodeToHexString(octalCode);
|
||||
qDebug() << "octal code: " << octalCodeStr << "\n";
|
||||
qDebug() << "octal code: " << octalCodeStr;
|
||||
|
||||
} else {
|
||||
qDebug() << "Unexpected number of parameters for getOctCode\n";
|
||||
qDebug() << "Unexpected number of parameters for getOctCode";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -293,12 +293,12 @@ int main(int argc, const char * argv[])
|
|||
|
||||
delete[] octalCodeToDecode;
|
||||
|
||||
qDebug() << "octal code to decode: " << decodeParamsString << "\n";
|
||||
qDebug() << "Details for Octal Code:\n";
|
||||
qDebug() << " x:" << details.x << "[" << details.x * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " y:" << details.y << "[" << details.y * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " z:" << details.z << "[" << details.z * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << " s:" << details.s << "[" << details.s * TREE_SCALE << "]" << "\n";
|
||||
qDebug() << "octal code to decode: " << decodeParamsString;
|
||||
qDebug() << "Details for Octal Code:";
|
||||
qDebug() << " x:" << details.x << "[" << details.x * TREE_SCALE << "]";
|
||||
qDebug() << " y:" << details.y << "[" << details.y * TREE_SCALE << "]";
|
||||
qDebug() << " z:" << details.z << "[" << details.z * TREE_SCALE << "]";
|
||||
qDebug() << " s:" << details.s << "[" << details.s * TREE_SCALE << "]";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue