Add skinned mesh define

master
Jeremy Hu 2017-01-30 00:12:50 +09:30
parent e4fc03e848
commit 542a1d70e7
3 changed files with 27 additions and 2 deletions

View File

@ -18,7 +18,8 @@ SOURCES += main.cpp \
convexhull.c \ convexhull.c \
hashtable.c \ hashtable.c \
osutil.cpp \ osutil.cpp \
subdivide.c subdivide.c \
skinnedmesh.c
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
render.h \ render.h \
@ -31,4 +32,5 @@ HEADERS += mainwindow.h \
hashtable.h \ hashtable.h \
3dstruct.h \ 3dstruct.h \
osutil.h \ osutil.h \
subdivide.h subdivide.h \
skinnedmesh.h

2
src/skinnedmesh.c Normal file
View File

@ -0,0 +1,2 @@
#include "skinnedmesh.h"

21
src/skinnedmesh.h Normal file
View File

@ -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