no longer returning early on NaN

This commit is contained in:
ericrius1 2015-08-07 16:15:51 -07:00
parent d735c85806
commit 205a2d53b6
5 changed files with 6 additions and 9 deletions

View file

@ -119,8 +119,6 @@ void RenderablePolyLineEntityItem::updateGeometry() {
}
_pointsChanged = false;
_pointsChanged = false;
}

View file

@ -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.

View file

@ -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;

View file

@ -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);

View file

@ -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;