mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:13:28 +02:00
no longer returning early on NaN
This commit is contained in:
parent
d735c85806
commit
205a2d53b6
5 changed files with 6 additions and 9 deletions
libraries
entities-renderer/src
entities/src
octree/src
shared/src
|
@ -119,8 +119,6 @@ void RenderablePolyLineEntityItem::updateGeometry() {
|
|||
}
|
||||
_pointsChanged = false;
|
||||
|
||||
_pointsChanged = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// RenderablePolyLineEntityItem.h
|
||||
// libraries/entities-renderer/src/
|
||||
//
|
||||
// Created by Eric Levin on 5/11/15.
|
||||
// Created by Eric Levin on 6/22/15.
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
|
|
|
@ -44,8 +44,11 @@ class PolyLineEntityItem : public EntityItem {
|
|||
const rgbColor& getColor() const { return _color; }
|
||||
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
||||
|
||||
void setColor(const rgbColor& value) { memcpy(_color, value, sizeof(_color)); }
|
||||
void setColor(const rgbColor& value) {
|
||||
memcpy(_color, value, sizeof(_color));
|
||||
}
|
||||
void setColor(const xColor& value) {
|
||||
|
||||
_color[RED_INDEX] = value.red;
|
||||
_color[GREEN_INDEX] = value.green;
|
||||
_color[BLUE_INDEX] = value.blue;
|
||||
|
|
|
@ -623,7 +623,7 @@ int OctreePacketData::unpackDataFromBytes(const unsigned char *dataBytes, QVecto
|
|||
return sizeof(uint16_t) + length * sizeof(glm::vec3);
|
||||
}
|
||||
|
||||
int OctreePacketData::unpackDataFromBytes(const unsigned char *dataBytes, QVector<float>& result) {
|
||||
int OctreePacketData::unpackDataFromBytes(const unsigned char* dataBytes, QVector<float>& result) {
|
||||
uint16_t length;
|
||||
memcpy(&length, dataBytes, sizeof(uint16_t));
|
||||
dataBytes += sizeof(length);
|
||||
|
|
|
@ -109,10 +109,6 @@ QScriptValue qVectorFloatToScriptValue(QScriptEngine* engine, const QVector<floa
|
|||
QScriptValue array = engine->newArray();
|
||||
for (int i = 0; i < vector.size(); i++) {
|
||||
float num = vector.at(i);
|
||||
if(num != num) {
|
||||
//if num is NaN don't convert it
|
||||
return array;
|
||||
}
|
||||
array.setProperty(i, QScriptValue(num));
|
||||
}
|
||||
return array;
|
||||
|
|
Loading…
Reference in a new issue