mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
Reduce qDebug calls
This commit is contained in:
parent
3fb5e47dcc
commit
303026d86b
1 changed files with 5 additions and 1 deletions
|
@ -86,6 +86,7 @@ bool LineEntityItem::setProperties(const EntityItemProperties& properties) {
|
||||||
|
|
||||||
void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
||||||
QVector<glm::vec3> sanitizedPoints;
|
QVector<glm::vec3> sanitizedPoints;
|
||||||
|
int invalidPoints = 0;
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
glm::vec3 point = points.at(i);
|
glm::vec3 point = points.at(i);
|
||||||
// Make sure all of our points are valid numbers.
|
// Make sure all of our points are valid numbers.
|
||||||
|
@ -93,9 +94,12 @@ void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
|
||||||
if (point.x > 0 && point.y > 0 && point.z > 0){
|
if (point.x > 0 && point.y > 0 && point.z > 0){
|
||||||
sanitizedPoints << point;
|
sanitizedPoints << point;
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "INVALID POINT";
|
++invalidPoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (invalidPoints > 0) {
|
||||||
|
qDebug() << "Line with" << invalidPoints << "INVALID POINTS";
|
||||||
|
}
|
||||||
_points = sanitizedPoints;
|
_points = sanitizedPoints;
|
||||||
_pointsChanged = true;
|
_pointsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue