mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:17:02 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi
This commit is contained in:
commit
c9d22ea07e
16 changed files with 54 additions and 37 deletions
|
@ -37,8 +37,8 @@ int hifiSockAddrMeta = qRegisterMetaType<HifiSockAddr>("HifiSockAddr");
|
||||||
|
|
||||||
AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
AssignmentClient::AssignmentClient(int &argc, char **argv) :
|
||||||
QCoreApplication(argc, argv),
|
QCoreApplication(argc, argv),
|
||||||
_assignmentServerHostname(DEFAULT_ASSIGNMENT_SERVER_HOSTNAME),
|
_shutdownEventListener(this),
|
||||||
_shutdownEventListener(this)
|
_assignmentServerHostname(DEFAULT_ASSIGNMENT_SERVER_HOSTNAME)
|
||||||
{
|
{
|
||||||
LogUtils::init();
|
LogUtils::init();
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,6 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(PositionalAudioStream*
|
||||||
const float FULL_POWER = 1.0f;
|
const float FULL_POWER = 1.0f;
|
||||||
const float SQUARE_ROOT_OF_TWO_OVER_TWO = 0.71f;
|
const float SQUARE_ROOT_OF_TWO_OVER_TWO = 0.71f;
|
||||||
const float HALF_POWER = SQUARE_ROOT_OF_TWO_OVER_TWO;
|
const float HALF_POWER = SQUARE_ROOT_OF_TWO_OVER_TWO;
|
||||||
const float QUARTER_POWER = HALF_POWER * HALF_POWER;
|
|
||||||
|
|
||||||
const float ONE_OVER_TWO_PI = 1.0f / TWO_PI;
|
const float ONE_OVER_TWO_PI = 1.0f / TWO_PI;
|
||||||
const float FILTER_CUTOFF_FREQUENCY_HZ = 1000.0f;
|
const float FILTER_CUTOFF_FREQUENCY_HZ = 1000.0f;
|
||||||
|
@ -344,8 +343,8 @@ int AudioMixer::addStreamToMixForListeningNodeWithStream(PositionalAudioStream*
|
||||||
((-1.0 * ONE_OVER_TWO_PI * (bearingRelativeAngleToSource + PI_OVER_TWO)) + HALF_POWER) :
|
((-1.0 * ONE_OVER_TWO_PI * (bearingRelativeAngleToSource + PI_OVER_TWO)) + HALF_POWER) :
|
||||||
((-1.0 * ONE_OVER_TWO_PI * (bearingRelativeAngleToSource - PI)) + HALF_POWER);
|
((-1.0 * ONE_OVER_TWO_PI * (bearingRelativeAngleToSource - PI)) + HALF_POWER);
|
||||||
|
|
||||||
float distanceBetween = glm::length(relativePosition);
|
|
||||||
#if 0
|
#if 0
|
||||||
|
float distanceBetween = glm::length(relativePosition);
|
||||||
qDebug() << "avatar="
|
qDebug() << "avatar="
|
||||||
<< listeningNodeStream
|
<< listeningNodeStream
|
||||||
<< "gainL="
|
<< "gainL="
|
||||||
|
|
|
@ -223,6 +223,20 @@ void Avatar::measureMotionDerivatives(float deltaTime) {
|
||||||
_lastOrientation = getOrientation();
|
_lastOrientation = getOrientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Avatar::setPosition(const glm::vec3 position, bool overideReferential) {
|
||||||
|
AvatarData::setPosition(position, overideReferential);
|
||||||
|
_lastPosition = position;
|
||||||
|
_velocity = glm::vec3(0.0f);
|
||||||
|
_lastVelocity = glm::vec3(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Avatar::slamPosition(const glm::vec3& newPosition) {
|
||||||
|
_position = newPosition;
|
||||||
|
_lastPosition = newPosition;
|
||||||
|
_velocity = glm::vec3(0.0f);
|
||||||
|
_lastVelocity = glm::vec3(0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
void Avatar::setMouseRay(const glm::vec3 &origin, const glm::vec3 &direction) {
|
void Avatar::setMouseRay(const glm::vec3 &origin, const glm::vec3 &direction) {
|
||||||
_mouseRayOrigin = origin;
|
_mouseRayOrigin = origin;
|
||||||
_mouseRayDirection = direction;
|
_mouseRayDirection = direction;
|
||||||
|
|
|
@ -161,6 +161,9 @@ public:
|
||||||
/// \param vector position to be scaled. Will store the result
|
/// \param vector position to be scaled. Will store the result
|
||||||
void scaleVectorRelativeToPosition(glm::vec3 &positionToScale) const;
|
void scaleVectorRelativeToPosition(glm::vec3 &positionToScale) const;
|
||||||
|
|
||||||
|
void setPosition(const glm::vec3 position, bool overideReferential = false);
|
||||||
|
void slamPosition(const glm::vec3& newPosition);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void updateCollisionGroups();
|
void updateCollisionGroups();
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ JointReferential::JointReferential(Referential* referential, EntityTree* tree, A
|
||||||
|
|
||||||
const EntityItem* item = _tree->findEntityByID(_entityID);
|
const EntityItem* item = _tree->findEntityByID(_entityID);
|
||||||
const Model* model = getModel(item);
|
const Model* model = getModel(item);
|
||||||
if (!isValid() || model == NULL || _jointIndex >= model->getJointStateCount()) {
|
if (!isValid() || model == NULL || _jointIndex >= (uint32_t)(model->getJointStateCount())) {
|
||||||
_refScale = item->getRadius();
|
_refScale = item->getRadius();
|
||||||
model->getJointRotationInWorldFrame(_jointIndex, _refRotation);
|
model->getJointRotationInWorldFrame(_jointIndex, _refRotation);
|
||||||
model->getJointPositionInWorldFrame(_jointIndex, _refPosition);
|
model->getJointPositionInWorldFrame(_jointIndex, _refPosition);
|
||||||
|
@ -123,7 +123,7 @@ JointReferential::JointReferential(uint32_t jointIndex, const QUuid& entityID, E
|
||||||
_type = JOINT;
|
_type = JOINT;
|
||||||
const EntityItem* item = _tree->findEntityByID(_entityID);
|
const EntityItem* item = _tree->findEntityByID(_entityID);
|
||||||
const Model* model = getModel(item);
|
const Model* model = getModel(item);
|
||||||
if (!isValid() || model == NULL || _jointIndex >= model->getJointStateCount()) {
|
if (!isValid() || model == NULL || _jointIndex >= (uint32_t)(model->getJointStateCount())) {
|
||||||
qDebug() << "JointReferential::constructor(): Not Valid";
|
qDebug() << "JointReferential::constructor(): Not Valid";
|
||||||
_isValid = false;
|
_isValid = false;
|
||||||
return;
|
return;
|
||||||
|
@ -142,7 +142,7 @@ JointReferential::JointReferential(uint32_t jointIndex, const QUuid& entityID, E
|
||||||
void JointReferential::update() {
|
void JointReferential::update() {
|
||||||
const EntityItem* item = _tree->findEntityByID(_entityID);
|
const EntityItem* item = _tree->findEntityByID(_entityID);
|
||||||
const Model* model = getModel(item);
|
const Model* model = getModel(item);
|
||||||
if (!isValid() || model == NULL || _jointIndex >= model->getJointStateCount()) {
|
if (!isValid() || model == NULL || _jointIndex >= (uint32_t)(model->getJointStateCount())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1767,7 +1767,7 @@ void MyAvatar::maybeUpdateBillboard() {
|
||||||
|
|
||||||
void MyAvatar::goHome() {
|
void MyAvatar::goHome() {
|
||||||
qDebug("Going Home!");
|
qDebug("Going Home!");
|
||||||
setPosition(START_LOCATION);
|
slamPosition(START_LOCATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyAvatar::increaseSize() {
|
void MyAvatar::increaseSize() {
|
||||||
|
@ -1827,7 +1827,7 @@ void MyAvatar::goToLocationFromAddress(const QJsonObject& locationObject) {
|
||||||
const float DISTANCE_TO_USER = 2.0f;
|
const float DISTANCE_TO_USER = 2.0f;
|
||||||
glm::vec3 newPosition = glm::vec3(coordinateItems[0].toFloat(), coordinateItems[1].toFloat(),
|
glm::vec3 newPosition = glm::vec3(coordinateItems[0].toFloat(), coordinateItems[1].toFloat(),
|
||||||
coordinateItems[2].toFloat()) - newOrientation * IDENTITY_FRONT * DISTANCE_TO_USER;
|
coordinateItems[2].toFloat()) - newOrientation * IDENTITY_FRONT * DISTANCE_TO_USER;
|
||||||
setPosition(newPosition);
|
slamPosition(newPosition);
|
||||||
emit transformChanged();
|
emit transformChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ DeviceTracker* DeviceTracker::getDevice(const Name& name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceTracker* DeviceTracker::getDevice(DeviceTracker::ID deviceID) {
|
DeviceTracker* DeviceTracker::getDevice(DeviceTracker::ID deviceID) {
|
||||||
if ((deviceID >= 0) && (deviceID < Singleton::get()->_devicesVector.size())) {
|
if ((deviceID >= 0) && (deviceID < (int)(Singleton::get()->_devicesVector.size()))) {
|
||||||
return Singleton::get()->_devicesVector[ deviceID ];
|
return Singleton::get()->_devicesVector[ deviceID ];
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -145,7 +145,7 @@ public:
|
||||||
const QUuid& getSessionUUID() { return _sessionUUID; }
|
const QUuid& getSessionUUID() { return _sessionUUID; }
|
||||||
|
|
||||||
const glm::vec3& getPosition();
|
const glm::vec3& getPosition();
|
||||||
void setPosition(const glm::vec3 position, bool overideReferential = false);
|
virtual void setPosition(const glm::vec3 position, bool overideReferential = false);
|
||||||
|
|
||||||
glm::vec3 getHandPosition() const;
|
glm::vec3 getHandPosition() const;
|
||||||
void setHandPosition(const glm::vec3& handPosition);
|
void setHandPosition(const glm::vec3& handPosition);
|
||||||
|
|
|
@ -492,7 +492,7 @@ int EntityTree::processEditPacketData(PacketType packetType, const unsigned char
|
||||||
|
|
||||||
void EntityTree::notifyNewlyCreatedEntity(const EntityItem& newEntity, const SharedNodePointer& senderNode) {
|
void EntityTree::notifyNewlyCreatedEntity(const EntityItem& newEntity, const SharedNodePointer& senderNode) {
|
||||||
_newlyCreatedHooksLock.lockForRead();
|
_newlyCreatedHooksLock.lockForRead();
|
||||||
for (size_t i = 0; i < _newlyCreatedHooks.size(); i++) {
|
for (int i = 0; i < _newlyCreatedHooks.size(); i++) {
|
||||||
_newlyCreatedHooks[i]->entityCreated(newEntity, senderNode);
|
_newlyCreatedHooks[i]->entityCreated(newEntity, senderNode);
|
||||||
}
|
}
|
||||||
_newlyCreatedHooksLock.unlock();
|
_newlyCreatedHooksLock.unlock();
|
||||||
|
@ -506,7 +506,7 @@ void EntityTree::addNewlyCreatedHook(NewlyCreatedEntityHook* hook) {
|
||||||
|
|
||||||
void EntityTree::removeNewlyCreatedHook(NewlyCreatedEntityHook* hook) {
|
void EntityTree::removeNewlyCreatedHook(NewlyCreatedEntityHook* hook) {
|
||||||
_newlyCreatedHooksLock.lockForWrite();
|
_newlyCreatedHooksLock.lockForWrite();
|
||||||
for (size_t i = 0; i < _newlyCreatedHooks.size(); i++) {
|
for (int i = 0; i < _newlyCreatedHooks.size(); i++) {
|
||||||
if (_newlyCreatedHooks[i] == hook) {
|
if (_newlyCreatedHooks[i] == hook) {
|
||||||
_newlyCreatedHooks.erase(_newlyCreatedHooks.begin() + i);
|
_newlyCreatedHooks.erase(_newlyCreatedHooks.begin() + i);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -723,7 +723,6 @@ int EntityTreeElement::readElementDataFromBuffer(const unsigned char* data, int
|
||||||
int bytesForThisEntity = 0;
|
int bytesForThisEntity = 0;
|
||||||
EntityItemID entityItemID;
|
EntityItemID entityItemID;
|
||||||
EntityItem* entityItem = NULL;
|
EntityItem* entityItem = NULL;
|
||||||
bool newEntity = false;
|
|
||||||
|
|
||||||
// Old model files don't have UUIDs in them. So we don't want to try to read those IDs from the stream.
|
// Old model files don't have UUIDs in them. So we don't want to try to read those IDs from the stream.
|
||||||
// Since this can only happen on loading an old file, we can safely treat these as new entity cases,
|
// Since this can only happen on loading an old file, we can safely treat these as new entity cases,
|
||||||
|
@ -768,7 +767,6 @@ int EntityTreeElement::readElementDataFromBuffer(const unsigned char* data, int
|
||||||
addEntityItem(entityItem); // add this new entity to this elements entities
|
addEntityItem(entityItem); // add this new entity to this elements entities
|
||||||
entityItemID = entityItem->getEntityItemID();
|
entityItemID = entityItem->getEntityItemID();
|
||||||
_myTree->setContainingElement(entityItemID, this);
|
_myTree->setContainingElement(entityItemID, this);
|
||||||
newEntity = true;
|
|
||||||
EntityItem::SimulationState newState = entityItem->getSimulationState();
|
EntityItem::SimulationState newState = entityItem->getSimulationState();
|
||||||
_myTree->changeEntityState(entityItem, EntityItem::Static, newState);
|
_myTree->changeEntityState(entityItem, EntityItem::Static, newState);
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,7 +242,7 @@ int Octree::readElementData(OctreeElement* destinationElement, const unsigned ch
|
||||||
// give this destination element the child mask from the packet
|
// give this destination element the child mask from the packet
|
||||||
const unsigned char ALL_CHILDREN_ASSUMED_TO_EXIST = 0xFF;
|
const unsigned char ALL_CHILDREN_ASSUMED_TO_EXIST = 0xFF;
|
||||||
|
|
||||||
if (bytesLeftToRead < sizeof(unsigned char)) {
|
if ((size_t)bytesLeftToRead < sizeof(unsigned char)) {
|
||||||
qDebug() << "UNEXPECTED: readElementData() only had " << bytesLeftToRead << " bytes. Not enough for meaningful data.";
|
qDebug() << "UNEXPECTED: readElementData() only had " << bytesLeftToRead << " bytes. Not enough for meaningful data.";
|
||||||
return bytesAvailable; // assume we read the entire buffer...
|
return bytesAvailable; // assume we read the entire buffer...
|
||||||
}
|
}
|
||||||
|
@ -1865,7 +1865,6 @@ int Octree::encodeTreeBitstreamRecursion(OctreeElement* element,
|
||||||
|
|
||||||
bool Octree::readFromSVOFile(const char* fileName) {
|
bool Octree::readFromSVOFile(const char* fileName) {
|
||||||
bool fileOk = false;
|
bool fileOk = false;
|
||||||
bool hasBufferBreaks = false;
|
|
||||||
|
|
||||||
PacketVersion gotVersion = 0;
|
PacketVersion gotVersion = 0;
|
||||||
std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate);
|
std::ifstream file(fileName, std::ios::in|std::ios::binary|std::ios::ate);
|
||||||
|
|
|
@ -275,7 +275,7 @@ void OctreeEditPacketSender::queueOctreeEditMessage(PacketType type, unsigned ch
|
||||||
|
|
||||||
// If we're switching type, then we send the last one and start over
|
// If we're switching type, then we send the last one and start over
|
||||||
if ((type != packetBuffer._currentType && packetBuffer._currentSize > 0) ||
|
if ((type != packetBuffer._currentType && packetBuffer._currentSize > 0) ||
|
||||||
(packetBuffer._currentSize + length >= _maxPacketSize)) {
|
(packetBuffer._currentSize + length >= (size_t)_maxPacketSize)) {
|
||||||
releaseQueuedPacket(packetBuffer);
|
releaseQueuedPacket(packetBuffer);
|
||||||
initializePacket(packetBuffer, type);
|
initializePacket(packetBuffer, type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,11 @@ void TypedArrayPrototype::set(QScriptValue array, qint32 offset) {
|
||||||
engine()->evaluate("throw \"ArgumentError: negative offset\"");
|
engine()->evaluate("throw \"ArgumentError: negative offset\"");
|
||||||
}
|
}
|
||||||
quint32 length = array.property("length").toInt32();
|
quint32 length = array.property("length").toInt32();
|
||||||
if (offset + length > thisObject().data().property(typedArray->_lengthName).toInt32()) {
|
if (offset + (qint32)length > thisObject().data().property(typedArray->_lengthName).toInt32()) {
|
||||||
engine()->evaluate("throw \"ArgumentError: array does not fit\"");
|
engine()->evaluate("throw \"ArgumentError: array does not fit\"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < length; ++i) {
|
for (quint32 i = 0; i < length; ++i) {
|
||||||
thisObject().setProperty(QString::number(offset + i), array.property(QString::number(i)));
|
thisObject().setProperty(QString::number(offset + i), array.property(QString::number(i)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -50,7 +50,7 @@ QScriptValue TypedArray::newInstance(QScriptValue array) {
|
||||||
if (array.property(ARRAY_LENGTH_HANDLE).isValid()) {
|
if (array.property(ARRAY_LENGTH_HANDLE).isValid()) {
|
||||||
quint32 length = array.property(ARRAY_LENGTH_HANDLE).toInt32();
|
quint32 length = array.property(ARRAY_LENGTH_HANDLE).toInt32();
|
||||||
QScriptValue newArray = newInstance(length);
|
QScriptValue newArray = newInstance(length);
|
||||||
for (int i = 0; i < length; ++i) {
|
for (quint32 i = 0; i < length; ++i) {
|
||||||
QScriptValue value = array.property(QString::number(i));
|
QScriptValue value = array.property(QString::number(i));
|
||||||
setProperty(newArray, engine()->toStringHandle(QString::number(i)),
|
setProperty(newArray, engine()->toStringHandle(QString::number(i)),
|
||||||
i * _bytesPerElement, (value.isNumber()) ? value : QScriptValue(0));
|
i * _bytesPerElement, (value.isNumber()) ? value : QScriptValue(0));
|
||||||
|
@ -119,7 +119,7 @@ QScriptValue TypedArray::construct(QScriptContext* context, QScriptEngine* engin
|
||||||
return QScriptValue();
|
return QScriptValue();
|
||||||
}
|
}
|
||||||
if (lengthArg.toInt32() < 0 ||
|
if (lengthArg.toInt32() < 0 ||
|
||||||
byteOffsetArg.toInt32() + lengthArg.toInt32() * cls->_bytesPerElement > arrayBuffer->size()) {
|
byteOffsetArg.toInt32() + lengthArg.toInt32() * (qint32)(cls->_bytesPerElement) > arrayBuffer->size()) {
|
||||||
engine->evaluate("throw \"RangeError: byteLength out of range\"");
|
engine->evaluate("throw \"RangeError: byteLength out of range\"");
|
||||||
return QScriptValue();
|
return QScriptValue();
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ QScriptClass::QueryFlags TypedArray::queryProperty(const QScriptValue& object,
|
||||||
quint32 byteOffset = object.data().property(_byteOffsetName).toInt32();
|
quint32 byteOffset = object.data().property(_byteOffsetName).toInt32();
|
||||||
quint32 length = object.data().property(_lengthName).toInt32();
|
quint32 length = object.data().property(_lengthName).toInt32();
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
int pos = name.toArrayIndex(&ok);
|
quint32 pos = name.toArrayIndex(&ok);
|
||||||
|
|
||||||
// Check that name is a valid index and arrayBuffer exists
|
// Check that name is a valid index and arrayBuffer exists
|
||||||
if (ok && pos >= 0 && pos < length) {
|
if (ok && pos >= 0 && pos < length) {
|
||||||
|
|
|
@ -71,6 +71,8 @@ QScriptValue XMLHttpRequestClass::getStatus() const {
|
||||||
return QScriptValue(408);
|
return QScriptValue(408);
|
||||||
case QNetworkReply::ContentOperationNotPermittedError:
|
case QNetworkReply::ContentOperationNotPermittedError:
|
||||||
return QScriptValue(501);
|
return QScriptValue(501);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QScriptValue(0);
|
return QScriptValue(0);
|
||||||
|
@ -92,6 +94,8 @@ QString XMLHttpRequestClass::getStatusText() const {
|
||||||
return "Timeout";
|
return "Timeout";
|
||||||
case QNetworkReply::ContentOperationNotPermittedError:
|
case QNetworkReply::ContentOperationNotPermittedError:
|
||||||
return "Not Implemented";
|
return "Not Implemented";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -115,7 +115,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -140,7 +140,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytesB[] = { 136, 30 };
|
char expectedBytesB[] = { (char)136, (char)30 };
|
||||||
QByteArray expectedResultB(expectedBytesB, sizeof(expectedBytesB)/sizeof(expectedBytesB[0]));
|
QByteArray expectedResultB(expectedBytesB, sizeof(expectedBytesB)/sizeof(expectedBytesB[0]));
|
||||||
|
|
||||||
if (encoded == expectedResultB) {
|
if (encoded == expectedResultB) {
|
||||||
|
@ -172,7 +172,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
qDebug() << "encoded=";
|
qDebug() << "encoded=";
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -197,7 +197,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytesB[] = { 136, 30 };
|
char expectedBytesB[] = { (char)136, (char)30 };
|
||||||
QByteArray expectedResultB(expectedBytesB, sizeof(expectedBytesB)/sizeof(expectedBytesB[0]));
|
QByteArray expectedResultB(expectedBytesB, sizeof(expectedBytesB)/sizeof(expectedBytesB[0]));
|
||||||
|
|
||||||
if (encoded == expectedResultB) {
|
if (encoded == expectedResultB) {
|
||||||
|
@ -231,7 +231,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -264,7 +264,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -296,7 +296,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -329,7 +329,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -362,7 +362,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -395,7 +395,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -432,7 +432,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
outputBufferBits((const unsigned char*)encoded.constData(), encoded.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
char expectedBytes[] = { 196, 15, 2 };
|
char expectedBytes[] = { (char)196, (char)15, (char)2 };
|
||||||
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
QByteArray expectedResult(expectedBytes, sizeof(expectedBytes)/sizeof(expectedBytes[0]));
|
||||||
|
|
||||||
if (encoded == expectedResult) {
|
if (encoded == expectedResult) {
|
||||||
|
@ -642,7 +642,7 @@ void OctreeTests::propertyFlagsTests(bool verbose) {
|
||||||
qDebug() << "props.getHasProperty(PARTICLE_PROP_VISIBLE)" << (props.getHasProperty(PARTICLE_PROP_VISIBLE))
|
qDebug() << "props.getHasProperty(PARTICLE_PROP_VISIBLE)" << (props.getHasProperty(PARTICLE_PROP_VISIBLE))
|
||||||
<< "{ expect true }";
|
<< "{ expect true }";
|
||||||
}
|
}
|
||||||
char expectedBytesD[] = { 136, 16 };
|
char expectedBytesD[] = { (char)136, (char)16 };
|
||||||
QByteArray expectedResultD(expectedBytesD, sizeof(expectedBytesD)/sizeof(expectedBytesD[0]));
|
QByteArray expectedResultD(expectedBytesD, sizeof(expectedBytesD)/sizeof(expectedBytesD[0]));
|
||||||
|
|
||||||
testsTaken++;
|
testsTaken++;
|
||||||
|
|
Loading…
Reference in a new issue