mirror of
https://github.com/overte-org/overte.git
synced 2025-07-10 22:58:43 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into actions
This commit is contained in:
commit
42f94307d5
11 changed files with 38 additions and 34 deletions
|
@ -12,7 +12,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
Script.include('lineRider.js')
|
Script.include('lineRider.js')
|
||||||
var MAX_POINTS_PER_LINE = 30;
|
var MAX_POINTS_PER_LINE = 80;
|
||||||
|
|
||||||
|
|
||||||
var colorPalette = [{
|
var colorPalette = [{
|
||||||
|
|
|
@ -336,7 +336,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_enableProcessOctreeThread(true),
|
_enableProcessOctreeThread(true),
|
||||||
_octreeProcessor(),
|
_octreeProcessor(),
|
||||||
_nodeBoundsDisplay(this),
|
_nodeBoundsDisplay(this),
|
||||||
_applicationOverlay(),
|
|
||||||
_runningScriptsWidget(NULL),
|
_runningScriptsWidget(NULL),
|
||||||
_runningScriptsWidgetWasVisible(false),
|
_runningScriptsWidgetWasVisible(false),
|
||||||
_trayIcon(new QSystemTrayIcon(_window)),
|
_trayIcon(new QSystemTrayIcon(_window)),
|
||||||
|
@ -347,7 +346,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
_notifiedPacketVersionMismatchThisDomain(false),
|
_notifiedPacketVersionMismatchThisDomain(false),
|
||||||
_domainConnectionRefusals(QList<QString>()),
|
_domainConnectionRefusals(QList<QString>()),
|
||||||
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
||||||
_lastFaceTrackerUpdate(0)
|
_lastFaceTrackerUpdate(0),
|
||||||
|
_applicationOverlay()
|
||||||
{
|
{
|
||||||
setInstance(this);
|
setInstance(this);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -14,7 +14,18 @@
|
||||||
|
|
||||||
#include "DeviceTracker.h"
|
#include "DeviceTracker.h"
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <glm/gtc/quaternion.hpp>
|
#include <glm/gtc/quaternion.hpp>
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
||||||
|
|
||||||
remapTextures();
|
remapTextures();
|
||||||
{
|
{
|
||||||
float alpha = getLocalRenderAlpha();
|
// float alpha = getLocalRenderAlpha();
|
||||||
|
|
||||||
if (!_model || _needsModelReload) {
|
if (!_model || _needsModelReload) {
|
||||||
// TODO: this getModel() appears to be about 3% of model render time. We should optimize
|
// TODO: this getModel() appears to be about 3% of model render time. We should optimize
|
||||||
|
|
|
@ -448,7 +448,6 @@ bool RenderablePolyVoxEntityItem::findDetailedRayIntersection(const glm::vec3& o
|
||||||
glm::vec3 normDirection = glm::normalize(direction);
|
glm::vec3 normDirection = glm::normalize(direction);
|
||||||
|
|
||||||
// the PolyVox ray intersection code requires a near and far point.
|
// the PolyVox ray intersection code requires a near and far point.
|
||||||
glm::vec3 scale = getDimensions() / _voxelVolumeSize; // meters / voxel-units
|
|
||||||
// set ray cast length to long enough to cover all of the voxel space
|
// set ray cast length to long enough to cover all of the voxel space
|
||||||
float distanceToEntity = glm::distance(origin, getPosition());
|
float distanceToEntity = glm::distance(origin, getPosition());
|
||||||
float largestDimension = glm::max(getDimensions().x, getDimensions().y, getDimensions().z) * 2.0f;
|
float largestDimension = glm::max(getDimensions().x, getDimensions().y, getDimensions().z) * 2.0f;
|
||||||
|
@ -635,9 +634,6 @@ void RenderablePolyVoxEntityItem::computeShapeInfo(ShapeInfo& info) {
|
||||||
float offL = -0.5f;
|
float offL = -0.5f;
|
||||||
float offH = 0.5f;
|
float offH = 0.5f;
|
||||||
|
|
||||||
// float offL = 0.0f;
|
|
||||||
// float offH = 1.0f;
|
|
||||||
|
|
||||||
glm::vec3 p000 = glm::vec3(wToM * glm::vec4(x + offL, y + offL, z + offL, 1.0f));
|
glm::vec3 p000 = glm::vec3(wToM * glm::vec4(x + offL, y + offL, z + offL, 1.0f));
|
||||||
glm::vec3 p001 = glm::vec3(wToM * glm::vec4(x + offL, y + offL, z + offH, 1.0f));
|
glm::vec3 p001 = glm::vec3(wToM * glm::vec4(x + offL, y + offL, z + offH, 1.0f));
|
||||||
glm::vec3 p010 = glm::vec3(wToM * glm::vec4(x + offL, y + offH, z + offL, 1.0f));
|
glm::vec3 p010 = glm::vec3(wToM * glm::vec4(x + offL, y + offH, z + offL, 1.0f));
|
||||||
|
|
|
@ -191,8 +191,8 @@ void RenderableWebEntityItem::render(RenderArgs* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderableWebEntityItem::setSourceUrl(const QString& value) {
|
void RenderableWebEntityItem::setSourceUrl(const QString& value) {
|
||||||
qDebug() << "Setting web entity source URL to " << value;
|
|
||||||
if (_sourceUrl != value) {
|
if (_sourceUrl != value) {
|
||||||
|
qDebug() << "Setting web entity source URL to " << value;
|
||||||
_sourceUrl = value;
|
_sourceUrl = value;
|
||||||
if (_webSurface) {
|
if (_webSurface) {
|
||||||
AbstractViewStateInterface::instance()->postLambdaEvent([this] {
|
AbstractViewStateInterface::instance()->postLambdaEvent([this] {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -605,9 +605,6 @@ const int NUM_BYTES_STUN_HEADER = 20;
|
||||||
|
|
||||||
void LimitedNodeList::sendSTUNRequest() {
|
void LimitedNodeList::sendSTUNRequest() {
|
||||||
|
|
||||||
static quint64 lastTimeStamp = usecTimestampNow();
|
|
||||||
lastTimeStamp = usecTimestampNow();
|
|
||||||
|
|
||||||
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
|
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
|
||||||
|
|
||||||
if (!_hasCompletedInitialSTUN) {
|
if (!_hasCompletedInitialSTUN) {
|
||||||
|
|
|
@ -78,8 +78,8 @@ Model::Model(QObject* parent) :
|
||||||
_showTrueJointTransforms(true),
|
_showTrueJointTransforms(true),
|
||||||
_lodDistance(0.0f),
|
_lodDistance(0.0f),
|
||||||
_pupilDilation(0.0f),
|
_pupilDilation(0.0f),
|
||||||
_isVisible(true),
|
|
||||||
_url("http://invalid.com"),
|
_url("http://invalid.com"),
|
||||||
|
_isVisible(true),
|
||||||
_blendNumber(0),
|
_blendNumber(0),
|
||||||
_appliedBlendNumber(0),
|
_appliedBlendNumber(0),
|
||||||
_calculatedMeshPartBoxesValid(false),
|
_calculatedMeshPartBoxesValid(false),
|
||||||
|
@ -913,8 +913,6 @@ bool Model::addToScene(std::shared_ptr<render::Scene> scene, render::PendingChan
|
||||||
|
|
||||||
bool somethingAdded = false;
|
bool somethingAdded = false;
|
||||||
|
|
||||||
qDebug() << "Model::addToScene : " << this->getURL().toString();
|
|
||||||
|
|
||||||
// allow the attachments to add to scene
|
// allow the attachments to add to scene
|
||||||
foreach (Model* attachment, _attachments) {
|
foreach (Model* attachment, _attachments) {
|
||||||
bool attachementSomethingAdded = attachment->addToScene(scene, pendingChanges);
|
bool attachementSomethingAdded = attachment->addToScene(scene, pendingChanges);
|
||||||
|
@ -954,7 +952,6 @@ void Model::removeFromScene(std::shared_ptr<render::Scene> scene, render::Pendin
|
||||||
}
|
}
|
||||||
_renderItems.clear();
|
_renderItems.clear();
|
||||||
_readyWhenAdded = false;
|
_readyWhenAdded = false;
|
||||||
qDebug() << "Model::removeFromScene : " << this->getURL().toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Model::render(RenderArgs* renderArgs, float alpha) {
|
bool Model::render(RenderArgs* renderArgs, float alpha) {
|
||||||
|
@ -2118,8 +2115,8 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
|
||||||
}
|
}
|
||||||
|
|
||||||
Locations* locations = nullptr;
|
Locations* locations = nullptr;
|
||||||
pickPrograms(batch, mode, translucent, alphaThreshold, hasLightmap, hasTangents, hasSpecular, isSkinned, wireframe,
|
pickPrograms(batch, mode, translucentMesh, alphaThreshold, hasLightmap, hasTangents, hasSpecular, isSkinned, wireframe,
|
||||||
args, locations);
|
args, locations);
|
||||||
|
|
||||||
updateVisibleJointStates();
|
updateVisibleJointStates();
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,6 @@ protected:
|
||||||
|
|
||||||
/// Allow sub classes to force invalidating the bboxes
|
/// Allow sub classes to force invalidating the bboxes
|
||||||
void invalidCalculatedMeshBoxes() {
|
void invalidCalculatedMeshBoxes() {
|
||||||
qDebug() << "invalidCalculatedMeshBoxes()";
|
|
||||||
_calculatedMeshBoxesValid = false;
|
_calculatedMeshBoxesValid = false;
|
||||||
_calculatedMeshPartBoxesValid = false;
|
_calculatedMeshPartBoxesValid = false;
|
||||||
_calculatedMeshTrianglesValid = false;
|
_calculatedMeshTrianglesValid = false;
|
||||||
|
|
|
@ -174,7 +174,7 @@ void render::renderItems(const SceneContextPointer& sceneContext, const RenderCo
|
||||||
auto& scene = sceneContext->_scene;
|
auto& scene = sceneContext->_scene;
|
||||||
RenderArgs* args = renderContext->args;
|
RenderArgs* args = renderContext->args;
|
||||||
// render
|
// render
|
||||||
if ((maxDrawnItems < 0) || (maxDrawnItems > inItems.size())) {
|
if ((maxDrawnItems < 0) || (maxDrawnItems > (int) inItems.size())) {
|
||||||
for (auto itemDetails : inItems) {
|
for (auto itemDetails : inItems) {
|
||||||
auto item = scene->getItem(itemDetails.id);
|
auto item = scene->getItem(itemDetails.id);
|
||||||
item.render(args);
|
item.render(args);
|
||||||
|
|
Loading…
Reference in a new issue