separated mesh data from Mesh class

This commit is contained in:
devZoGok
2022-03-15 07:25:20 +02:00
parent 8551823dd8
commit 993dddb130
10 changed files with 144 additions and 121 deletions
+29
View File
@@ -0,0 +1,29 @@
#include "meshData.h"
using namespace std;
namespace vb01{
void MeshData::ShapeKey::animate(float value, KeyframeChannel keyframeChannel){
switch(keyframeChannel.type){
case KeyframeChannel::SHAPE_KEY_MIN:
this->minValue = value;
break;
case KeyframeChannel::SHAPE_KEY_VALUE:
this->value = value;
break;
case KeyframeChannel::SHAPE_KEY_MAX:
this->maxValue = value;
break;
}
}
MeshData::MeshData(Vertex *vertices, u32 *indices, int numTris, string *vertexGroups, int numVertexGroups, ShapeKey *shapeKeys, int numShapeKeys){
this->vertices = vertices;
this->indices = indices;
this->numTris = numTris;
this->vertexGroups = vertexGroups;
this->numVertexGroups = numVertexGroups;
this->shapeKeys = shapeKeys;
this->numShapeKeys = numShapeKeys;
}
}