mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 10:59:04 +02:00
Checkpoint testing stuff.
This commit is contained in:
parent
8173dc2c9a
commit
5a0c1a9402
5 changed files with 23 additions and 2 deletions
|
@ -11,12 +11,14 @@
|
||||||
// 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
|
||||||
//
|
//
|
||||||
/* TBD:
|
/* TBD:
|
||||||
- What is responsibilities of Animation/AnimationPointer/AnimationCache/AnimationDetails? Is there common/copied code (e.g., ScriptableAvatar::update)?
|
- What is responsibilities of Animation/AnimationPointer/AnimationCache/AnimationDetails/AnimationObject/AnimationLoop?
|
||||||
|
Is there common/copied code (e.g., ScriptableAvatar::update)?
|
||||||
- How do attachments interact with the physics of the attached entity? E.g., do hand joints need to reflect held object physics?
|
- How do attachments interact with the physics of the attached entity? E.g., do hand joints need to reflect held object physics?
|
||||||
- Is there any current need (i.e., for initial campatability) to have multiple animations per role (e.g., idle) with the system choosing randomly?
|
- Is there any current need (i.e., for initial campatability) to have multiple animations per role (e.g., idle) with the system choosing randomly?
|
||||||
|
|
||||||
- Distribute some doc from here to the right files if it turns out to be correct:
|
- Distribute some doc from here to the right files if it turns out to be correct:
|
||||||
- AnimationDetails is a script-useable copy of animation state, analogous to EntityItemProperties, but without anything equivalent to editEntity.
|
- AnimationDetails is a script-useable copy of animation state, analogous to EntityItemProperties, but without anything equivalent to editEntity.
|
||||||
|
But what's the intended difference vs AnimationObjection? Maybe AnimationDetails is to Animation as AnimationObject is to AnimationPointer?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __hifi__Rig__
|
#ifndef __hifi__Rig__
|
||||||
|
|
|
@ -1087,6 +1087,7 @@ void AvatarData::setJointMappingsFromNetworkReply() {
|
||||||
}
|
}
|
||||||
|
|
||||||
networkReply->deleteLater();
|
networkReply->deleteLater();
|
||||||
|
emit jointsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::sendAvatarDataPacket() {
|
void AvatarData::sendAvatarDataPacket() {
|
||||||
|
|
|
@ -312,6 +312,9 @@ public:
|
||||||
|
|
||||||
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }
|
bool shouldDie() const { return _owningAvatarMixer.isNull() || getUsecsSinceLastUpdate() > AVATAR_SILENCE_THRESHOLD_USECS; }
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void jointsLoaded(); // So that test cases or anyone waiting on asynchronous loading can be informed.
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void sendAvatarDataPacket();
|
void sendAvatarDataPacket();
|
||||||
void sendIdentityPacket();
|
void sendIdentityPacket();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Declare dependencies
|
# Declare dependencies
|
||||||
macro (setup_testcase_dependencies)
|
macro (setup_testcase_dependencies)
|
||||||
# link in the shared libraries
|
# link in the shared libraries
|
||||||
link_hifi_libraries(shared animation gpu fbx model)
|
link_hifi_libraries(shared animation gpu fbx model avatars networking audio)
|
||||||
|
|
||||||
copy_dlls_beside_windows_executable()
|
copy_dlls_beside_windows_executable()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
|
@ -40,11 +40,26 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
//#include "FSTReader.h"
|
||||||
|
// There are two good ways we could organize this:
|
||||||
|
// 1. Create a MyAvatar the same way that Interface does, and poke at it.
|
||||||
|
// We can't do that because MyAvatar (and even Avatar) are in interface, not a library, and our build system won't allow that dependency.
|
||||||
|
// 2. Create just the minimum skeleton in the most direct way possible, using only very basic library APIs (such as fbx).
|
||||||
|
// I don't think we can do that because not everything we need is exposed directly from, e.g., the fst and fbx readers.
|
||||||
|
// So here we do neither. Using as much as we can from AvatarData (which is in the avatar and further requires network and audio), and
|
||||||
|
// duplicating whatever other code we need from (My)Avatar. Ugh. We may refactor that later, but right now, cleaning this up is not on our critical path.
|
||||||
|
#include "AvatarData.h"
|
||||||
#include "RigTests.h"
|
#include "RigTests.h"
|
||||||
|
|
||||||
QTEST_MAIN(RigTests)
|
QTEST_MAIN(RigTests)
|
||||||
|
|
||||||
void RigTests::initTestCase() {
|
void RigTests::initTestCase() {
|
||||||
|
AvatarData avatar;
|
||||||
|
QEventLoop loop; // Create an event loop that will quit when we get the finished signal
|
||||||
|
QObject::connect(&avatar, &AvatarData::jointsLoaded, &loop, &QEventLoop::quit);
|
||||||
|
avatar.setSkeletonModelURL(QUrl("https://hifi-public.s3.amazonaws.com/marketplace/contents/4a690585-3fa3-499e-9f8b-fd1226e561b1/e47e6898027aa40f1beb6adecc6a7db5.fst")); // Zach
|
||||||
|
//std::cout << "sleep start" << std::endl;
|
||||||
|
loop.exec(); // Nothing is going to happen on this whole run thread until we get this
|
||||||
_rig = new Rig();
|
_rig = new Rig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue