2018-11-06 16:26:19 +00:00
|
|
|
#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:
|
2018-11-17 23:02:12 +00:00
|
|
|
bool collectJontsForChain(int markIndex, std::vector<int> &jointMarkIndices);
|
2018-11-10 16:05:49 +00:00
|
|
|
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);
|
2018-11-07 08:02:55 +00:00
|
|
|
QVector3D findExtremPointFrom(const std::set<int> &verticies, const QVector3D &from);
|
2018-11-06 16:26:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|