mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:28:46 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into 20724
This commit is contained in:
commit
27495b99f2
7 changed files with 15 additions and 15 deletions
|
@ -1608,7 +1608,6 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
// Comfort Mode: If you press any of the left/right rotation drive keys or input, you'll
|
// Comfort Mode: If you press any of the left/right rotation drive keys or input, you'll
|
||||||
// get an instantaneous 15 degree turn. If you keep holding the key down you'll get another
|
// get an instantaneous 15 degree turn. If you keep holding the key down you'll get another
|
||||||
// snap turn every half second.
|
// snap turn every half second.
|
||||||
quint64 now = usecTimestampNow();
|
|
||||||
if (_driveKeys[STEP_YAW] != 0.0f) {
|
if (_driveKeys[STEP_YAW] != 0.0f) {
|
||||||
totalBodyYaw += _driveKeys[STEP_YAW];
|
totalBodyYaw += _driveKeys[STEP_YAW];
|
||||||
}
|
}
|
||||||
|
@ -1676,8 +1675,6 @@ glm::vec3 MyAvatar::applyKeyboardMotor(float deltaTime, const glm::vec3& localVe
|
||||||
float motorEfficiency = glm::clamp(deltaTime / timescale, 0.0f, 1.0f);
|
float motorEfficiency = glm::clamp(deltaTime / timescale, 0.0f, 1.0f);
|
||||||
|
|
||||||
glm::vec3 newLocalVelocity = localVelocity;
|
glm::vec3 newLocalVelocity = localVelocity;
|
||||||
float stepControllerInput = fabsf(_driveKeys[STEP_TRANSLATE_Z]) + fabsf(_driveKeys[STEP_TRANSLATE_Z]) + fabsf(_driveKeys[STEP_TRANSLATE_Z]);
|
|
||||||
quint64 now = usecTimestampNow();
|
|
||||||
|
|
||||||
// FIXME how do I implement step translation as well?
|
// FIXME how do I implement step translation as well?
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ void AnimInverseKinematics::solveWithCyclicCoordinateDescent(const std::vector<I
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int pivotsParentIndex = _skeleton->getParentIndex(pivotIndex);
|
int pivotsParentIndex = _skeleton->getParentIndex(pivotIndex);
|
||||||
if (pivotsParentIndex == -1 || pivotIndex == _hipsIndex) {
|
if (pivotsParentIndex == -1) {
|
||||||
// TODO?: handle case where tip's parent is root?
|
// TODO?: handle case where tip's parent is root?
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ void AnimInverseKinematics::solveWithCyclicCoordinateDescent(const std::vector<I
|
||||||
glm::quat tipParentRotation = absolutePoses[pivotIndex].rot;
|
glm::quat tipParentRotation = absolutePoses[pivotIndex].rot;
|
||||||
|
|
||||||
// descend toward root, pivoting each joint to get tip closer to target
|
// descend toward root, pivoting each joint to get tip closer to target
|
||||||
while (pivotsParentIndex != _hipsIndex && pivotsParentIndex != -1) {
|
while (pivotIndex != _hipsIndex && pivotsParentIndex != -1) {
|
||||||
// compute the two lines that should be aligned
|
// compute the two lines that should be aligned
|
||||||
glm::vec3 jointPosition = absolutePoses[pivotIndex].trans;
|
glm::vec3 jointPosition = absolutePoses[pivotIndex].trans;
|
||||||
glm::vec3 leverArm = tipPosition - jointPosition;
|
glm::vec3 leverArm = tipPosition - jointPosition;
|
||||||
|
@ -285,7 +285,7 @@ void AnimInverseKinematics::solveWithCyclicCoordinateDescent(const std::vector<I
|
||||||
// only update the absolutePoses that need it: those between lowestMovedIndex and _maxTargetIndex
|
// only update the absolutePoses that need it: those between lowestMovedIndex and _maxTargetIndex
|
||||||
for (int i = lowestMovedIndex; i <= _maxTargetIndex; ++i) {
|
for (int i = lowestMovedIndex; i <= _maxTargetIndex; ++i) {
|
||||||
int parentIndex = _skeleton->getParentIndex(i);
|
int parentIndex = _skeleton->getParentIndex(i);
|
||||||
if (parentIndex != -1 && parentIndex != _hipsIndex) {
|
if (parentIndex != -1) {
|
||||||
absolutePoses[i] = absolutePoses[parentIndex] * _relativePoses[i];
|
absolutePoses[i] = absolutePoses[parentIndex] * _relativePoses[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ void AnimInverseKinematics::solveWithCyclicCoordinateDescent(const std::vector<I
|
||||||
for (auto& target: targets) {
|
for (auto& target: targets) {
|
||||||
int tipIndex = target.getIndex();
|
int tipIndex = target.getIndex();
|
||||||
int parentIndex = _skeleton->getParentIndex(tipIndex);
|
int parentIndex = _skeleton->getParentIndex(tipIndex);
|
||||||
if (parentIndex != -1 && parentIndex != _hipsIndex) {
|
if (parentIndex != -1) {
|
||||||
const glm::quat& targetRotation = target.getRotation();
|
const glm::quat& targetRotation = target.getRotation();
|
||||||
// compute tip's new parent-relative rotation
|
// compute tip's new parent-relative rotation
|
||||||
// Q = Qp * q --> q' = Qp^ * Q
|
// Q = Qp * q --> q' = Qp^ * Q
|
||||||
|
|
|
@ -218,7 +218,6 @@ void RenderableParticleEffectEntityItem::updateRenderItem() {
|
||||||
_vertices.clear();
|
_vertices.clear();
|
||||||
|
|
||||||
// build vertices from particle positions and radiuses
|
// build vertices from particle positions and radiuses
|
||||||
glm::vec3 frustumPosition = frustum->getPosition();
|
|
||||||
glm::vec3 dir = frustum->getDirection();
|
glm::vec3 dir = frustum->getDirection();
|
||||||
for (auto&& particle : particleDetails) {
|
for (auto&& particle : particleDetails) {
|
||||||
glm::vec3 right = glm::normalize(glm::cross(glm::vec3(0.0f, 1.0f, 0.0f), dir));
|
glm::vec3 right = glm::normalize(glm::cross(glm::vec3(0.0f, 1.0f, 0.0f), dir));
|
||||||
|
|
|
@ -6,4 +6,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
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "Deck.h"
|
|
||||||
|
// FIXME -- DO NOT include headers in empty CPP files, it produces warnings. Once we define new symbols
|
||||||
|
// and some actual code here, we can uncomment this include.
|
||||||
|
//#include "Deck.h"
|
||||||
|
|
|
@ -80,6 +80,7 @@ FrameType Frame::registerFrameType(const QString& frameTypeName) {
|
||||||
std::call_once(once, [&] {
|
std::call_once(once, [&] {
|
||||||
auto headerType = frameTypes.registerValue("com.highfidelity.recording.Header");
|
auto headerType = frameTypes.registerValue("com.highfidelity.recording.Header");
|
||||||
Q_ASSERT(headerType == Frame::TYPE_HEADER);
|
Q_ASSERT(headerType == Frame::TYPE_HEADER);
|
||||||
|
Q_UNUSED(headerType); // FIXME - build system on unix still not upgraded to Qt 5.5.1 so Q_ASSERT still produces warnings
|
||||||
});
|
});
|
||||||
return frameTypes.registerValue(frameTypeName);
|
return frameTypes.registerValue(frameTypeName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,9 +135,6 @@ void Model::reset() {
|
||||||
const FBXGeometry& geometry = _geometry->getFBXGeometry();
|
const FBXGeometry& geometry = _geometry->getFBXGeometry();
|
||||||
_rig->reset(geometry.joints);
|
_rig->reset(geometry.joints);
|
||||||
}
|
}
|
||||||
_meshGroupsKnown = false;
|
|
||||||
_readyWhenAdded = false; // in case any of our users are using scenes
|
|
||||||
invalidCalculatedMeshBoxes(); // if we have to reload, we need to assume our mesh boxes are all invalid
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Model::updateGeometry() {
|
bool Model::updateGeometry() {
|
||||||
|
@ -1156,6 +1153,9 @@ void Model::segregateMeshGroups() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_ASSERT(_renderItems.isEmpty()); // We should not have any existing renderItems if we enter this section of code
|
||||||
|
Q_ASSERT(_renderItemsSet.isEmpty()); // We should not have any existing renderItemsSet if we enter this section of code
|
||||||
|
|
||||||
_renderItemsSet.clear();
|
_renderItemsSet.clear();
|
||||||
|
|
||||||
// Run through all of the meshes, and place them into their segregated, but unsorted buckets
|
// Run through all of the meshes, and place them into their segregated, but unsorted buckets
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
|
||||||
#define QVERIFY Q_ASSERT
|
|
||||||
|
|
||||||
using namespace recording;
|
using namespace recording;
|
||||||
FrameType TEST_FRAME_TYPE { Frame::TYPE_INVALID };
|
FrameType TEST_FRAME_TYPE { Frame::TYPE_INVALID };
|
||||||
|
|
||||||
|
@ -30,7 +28,8 @@ void testFrameTypeRegistration() {
|
||||||
auto backMap = recording::Frame::getFrameTypeNames();
|
auto backMap = recording::Frame::getFrameTypeNames();
|
||||||
QVERIFY(backMap.count(TEST_FRAME_TYPE) == 1);
|
QVERIFY(backMap.count(TEST_FRAME_TYPE) == 1);
|
||||||
QVERIFY(backMap[TEST_FRAME_TYPE] == TEST_NAME);
|
QVERIFY(backMap[TEST_FRAME_TYPE] == TEST_NAME);
|
||||||
QVERIFY(backMap[recording::Frame::TYPE_HEADER] == HEADER_NAME);
|
auto typeHeader = recording::Frame::TYPE_HEADER;
|
||||||
|
QVERIFY(backMap[typeHeader] == HEADER_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
void testFilePersist() {
|
void testFilePersist() {
|
||||||
|
@ -95,6 +94,7 @@ void testClipOrdering() {
|
||||||
for (auto writeFrame = writeClip->nextFrame(); writeFrame; writeFrame = writeClip->nextFrame()) {
|
for (auto writeFrame = writeClip->nextFrame(); writeFrame; writeFrame = writeClip->nextFrame()) {
|
||||||
QVERIFY(writeClip->position() >= lastFrameTimeOffset);
|
QVERIFY(writeClip->position() >= lastFrameTimeOffset);
|
||||||
}
|
}
|
||||||
|
Q_UNUSED(lastFrameTimeOffset); // FIXME - Unix build not yet upgraded to Qt 5.5.1 we can remove this once it is
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
|
|
Loading…
Reference in a new issue