forked from huxingyi/dust3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimalrigger.h
29 lines (27 loc) · 1.07 KB
/
animalrigger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef DUST3D_ANIMAL_RIGGER_H
#define DUST3D_ANIMAL_RIGGER_H
#include <QVector3D>
#include <vector>
#include <set>
#include "rigger.h"
#include "meshsplitter.h"
class AnimalRigger: public Rigger
{
Q_OBJECT
public:
AnimalRigger(const std::vector<QVector3D> &verticesPositions,
const std::set<MeshSplitterTriangle> &inputTriangles);
protected:
bool validate() override;
bool isCutOffSplitter(BoneMark boneMark) override;
bool rig() override;
BoneMark translateBoneMark(BoneMark boneMark) override;
private:
bool collectJontsForChain(int markIndex, std::vector<int> &jointMarkIndices);
static QString namingSpine(int spineOrder);
static QString namingConnector(const QString &spineName, const QString &chainName);
static QString namingChain(const QString &baseName, SkeletonSide side, int orderInSide, int totalInSide, int jointOrder);
static QString namingChainPrefix(const QString &baseName, SkeletonSide side, int orderInSide, int totalInSide);
QVector3D findExtremPointFrom(const std::set<int> &verticies, const QVector3D &from);
};
#endif