2023-08-06 08:48:11 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-07-06 17:36:58 -04:00
|
|
|
#pragma once
|
|
|
|
|
2023-07-07 16:01:07 -04:00
|
|
|
#include "quaternionedit.h"
|
|
|
|
#include "vec3edit.h"
|
2023-07-06 17:36:58 -04:00
|
|
|
#include <QSpinBox>
|
2023-07-07 16:01:07 -04:00
|
|
|
#include <QTreeWidgetItem>
|
2023-07-06 17:36:58 -04:00
|
|
|
#include <QWidget>
|
2023-07-07 16:01:07 -04:00
|
|
|
#include <glm/detail/type_quat.hpp>
|
2023-07-06 17:36:58 -04:00
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include <physis.hpp>
|
|
|
|
|
|
|
|
class GearView;
|
|
|
|
|
|
|
|
class BoneEditor : public QWidget {
|
2023-07-07 16:16:21 -04:00
|
|
|
Q_OBJECT
|
2023-07-06 17:36:58 -04:00
|
|
|
|
|
|
|
public:
|
2023-07-07 16:16:21 -04:00
|
|
|
explicit BoneEditor(GearView* gearView, QWidget* parent = nullptr);
|
2023-07-06 17:36:58 -04:00
|
|
|
|
|
|
|
private:
|
2023-07-07 16:16:21 -04:00
|
|
|
void treeItemClicked(QTreeWidgetItem* item, int column);
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
GearView* gearView;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
glm::vec3 currentPosition;
|
|
|
|
glm::quat currentRotation;
|
|
|
|
glm::vec3 currentScale;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
glm::vec3 currentRacePosition;
|
|
|
|
glm::quat currentRaceRotation;
|
|
|
|
glm::vec3 currentRaceScale;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
physis_Bone* currentEditedBone;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
Vector3Edit* posEdit;
|
|
|
|
QuaternionEdit* rotationEdit;
|
|
|
|
Vector3Edit* scaleEdit;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-07-07 16:16:21 -04:00
|
|
|
Vector3Edit* raceDeformPosEdit;
|
|
|
|
QuaternionEdit* raceDeformRotationEdit;
|
|
|
|
Vector3Edit* raceDeformScaleEdit;
|
2023-07-06 17:36:58 -04:00
|
|
|
};
|