bone transformations influence verts according to weights

This commit is contained in:
devZoGok
2021-10-19 19:06:41 +03:00
parent 3753d08ca5
commit 73f49e91bc
13 changed files with 325 additions and 145 deletions
+9
View File
@@ -1,5 +1,6 @@
#include"skeleton.h"
#include"animation.h"
#include"box.h"
using namespace std;
@@ -11,6 +12,14 @@ namespace vb01{
void Skeleton::addBone(Bone *bone, Node *parent){
parent->attachChild(bone);
bones.push_back(bone);
Box *box=new Box(Vector3(.1,.1,.1));
Material *mat=new Material();
mat->setTexturingEnabled(false);
mat->setLightingEnabled(false);
mat->setDiffuseColor(Vector4(0,1,0,1));
box->setMaterial(mat);
//bone->attachMesh(box);
}
Bone* Skeleton::getBone(string name){