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
|
|
|
|
|
|
|
|
#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>
|
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
#include "quaternionedit.h"
|
|
|
|
#include "vec3edit.h"
|
|
|
|
|
2023-07-06 17:36:58 -04:00
|
|
|
class GearView;
|
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
class BoneEditor : public QWidget
|
|
|
|
{
|
2023-07-07 16:16:21 -04:00
|
|
|
Q_OBJECT
|
2023-07-06 17:36:58 -04:00
|
|
|
|
|
|
|
public:
|
2023-10-12 23:44:48 -04:00
|
|
|
explicit BoneEditor(GearView *gearView, QWidget *parent = nullptr);
|
2023-07-06 17:36:58 -04:00
|
|
|
|
|
|
|
private:
|
2023-10-12 23:44:48 -04:00
|
|
|
void treeItemClicked(QTreeWidgetItem *item, int column);
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-10-12 23:44:48 -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-10-12 23:44:48 -04:00
|
|
|
physis_Bone *currentEditedBone = nullptr;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
Vector3Edit *posEdit = nullptr;
|
|
|
|
QuaternionEdit *rotationEdit = nullptr;
|
|
|
|
Vector3Edit *scaleEdit = nullptr;
|
2023-07-07 16:01:07 -04:00
|
|
|
|
2023-10-12 23:44:48 -04:00
|
|
|
Vector3Edit *raceDeformPosEdit = nullptr;
|
|
|
|
QuaternionEdit *raceDeformRotationEdit = nullptr;
|
|
|
|
Vector3Edit *raceDeformScaleEdit = nullptr;
|
2023-07-06 17:36:58 -04:00
|
|
|
};
|