diff --git a/build/dust3d.pro b/build/dust3d.pro index 53e8137f..843a5723 100644 --- a/build/dust3d.pro +++ b/build/dust3d.pro @@ -18,7 +18,8 @@ SOURCES += main.cpp \ convexhull.c \ hashtable.c \ osutil.cpp \ - subdivide.c + subdivide.c \ + skinnedmesh.c HEADERS += mainwindow.h \ render.h \ @@ -31,4 +32,5 @@ HEADERS += mainwindow.h \ hashtable.h \ 3dstruct.h \ osutil.h \ - subdivide.h \ No newline at end of file + subdivide.h \ + skinnedmesh.h \ No newline at end of file diff --git a/src/skinnedmesh.c b/src/skinnedmesh.c new file mode 100644 index 00000000..a961d97c --- /dev/null +++ b/src/skinnedmesh.c @@ -0,0 +1,2 @@ +#include "skinnedmesh.h" + diff --git a/src/skinnedmesh.h b/src/skinnedmesh.h new file mode 100644 index 00000000..da73baf0 --- /dev/null +++ b/src/skinnedmesh.h @@ -0,0 +1,21 @@ +#ifndef SKINNED_MESH_H +#define SKINNED_MESH_H +#include "3dstruct.h" +#include "matrix.h" + +#define SKINNED_MESH_MAX_BONE 4 + +typedef struct skinnedMeshVertex { + vec3 position; + vec3 normal; + int boneIndices[SKINNED_MESH_MAX_BONE]; + float boneWeights[SKINNED_MESH_MAX_BONE]; +} skinnedMeshVertex; + +typedef struct skinnedMeshBone { + vec3 translation; + vec3 rotation; + matrix toRoot; +} skinnedMeshBone; + +#endif