21 lines
534 B
C++
21 lines
534 B
C++
#pragma once
|
|
#include <vector>
|
|
#include <J3ML/LinearAlgebra.h>
|
|
class Bone {
|
|
protected:
|
|
std::string name;
|
|
Matrix4x4 matrix;
|
|
float weight;
|
|
Bone* parent;
|
|
std::vector<Bone*> children;
|
|
public:
|
|
bool isRootBone();
|
|
bool hasChildren();
|
|
const Matrix4x4& getMatrix();
|
|
void setMatrix(const Matrix4x4& m);
|
|
void appendChild(const Bone& bone);
|
|
Bone* getParent();
|
|
Bone* getChildByName(const std::string& bName);
|
|
Bone* getChildByNameRecursive(const std::string& bName);
|
|
Bone* getFirstChild();
|
|
}; |