mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
fixed compile issue
This commit is contained in:
parent
f8ec49eb96
commit
1cf9485143
2 changed files with 43 additions and 9 deletions
|
@ -14,8 +14,41 @@
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
namespace controller {
|
namespace controller {
|
||||||
|
|
||||||
void poseToJsonObject(const Pose pose) {
|
QJsonObject poseToJsonObject(const Pose pose) {
|
||||||
}
|
QJsonObject newPose;
|
||||||
|
|
||||||
|
QJsonArray translation;
|
||||||
|
translation.append(pose.translation.x);
|
||||||
|
translation.append(pose.translation.y);
|
||||||
|
translation.append(pose.translation.z);
|
||||||
|
|
||||||
|
QJsonArray rotation;
|
||||||
|
rotation.append(pose.rotation.x);
|
||||||
|
rotation.append(pose.rotation.y);
|
||||||
|
rotation.append(pose.rotation.z);
|
||||||
|
rotation.append(pose.rotation.w);
|
||||||
|
|
||||||
|
QJsonArray velocity;
|
||||||
|
velocity.append(pose.velocity.x);
|
||||||
|
velocity.append(pose.velocity.y);
|
||||||
|
velocity.append(pose.velocity.z);
|
||||||
|
|
||||||
|
QJsonArray angularVelocity;
|
||||||
|
angularVelocity.append(pose.angularVelocity.x);
|
||||||
|
angularVelocity.append(pose.angularVelocity.y);
|
||||||
|
angularVelocity.append(pose.angularVelocity.z);
|
||||||
|
|
||||||
|
newPose["translation"] = translation;
|
||||||
|
newPose["rotation"] = rotation;
|
||||||
|
newPose["velocity"] = velocity;
|
||||||
|
newPose["angularVelocity"] = angularVelocity;
|
||||||
|
newPose["valid"] = pose.valid;
|
||||||
|
|
||||||
|
return newPose;
|
||||||
|
}
|
||||||
|
|
||||||
|
void exportFile(QJsonObject object) {
|
||||||
|
}
|
||||||
|
|
||||||
InputRecorder::InputRecorder() {}
|
InputRecorder::InputRecorder() {}
|
||||||
|
|
||||||
|
@ -40,22 +73,24 @@ namespace controller {
|
||||||
|
|
||||||
QJsonArray actionArrayList;
|
QJsonArray actionArrayList;
|
||||||
QJsonArray poseArrayList;
|
QJsonArray poseArrayList;
|
||||||
for(const ActionStates actionState _actionStateList) {
|
for(const ActionStates actionState: _actionStateList) {
|
||||||
QJsonArray actionArray;
|
QJsonArray actionArray;
|
||||||
for (const float value, actionState) {
|
for (const float value: actionState) {
|
||||||
actionArray.append(value);
|
actionArray.append(value);
|
||||||
}
|
}
|
||||||
actionArrayList.append(actionArray);
|
actionArrayList.append(actionArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const PoseStates poseState, _poseStateList) {
|
for (const PoseStates poseState: _poseStateList) {
|
||||||
QJsonArray poseArray;
|
QJsonArray poseArray;
|
||||||
for (const Pose pose, poseState) {
|
for (const Pose pose: poseState) {
|
||||||
|
poseArray.append(poseToJsonObject(pose));
|
||||||
}
|
}
|
||||||
poseArrayList.append(poseArray);
|
poseArrayList.append(poseArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data["actionList"] = actionArrayList;
|
||||||
|
data["poseList"] = poseArrayList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputRecorder::loadRecording() {
|
void InputRecorder::loadRecording() {
|
||||||
|
|
|
@ -53,7 +53,6 @@ namespace controller {
|
||||||
|
|
||||||
int _framesRecorded { 0 };
|
int _framesRecorded { 0 };
|
||||||
int _playCount { 0 };
|
int _playCount { 0 };
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue