summaryrefslogtreecommitdiff
path: root/Runtime/Filters/Mesh/MeshSkinning.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Filters/Mesh/MeshSkinning.h')
-rw-r--r--Runtime/Filters/Mesh/MeshSkinning.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/Runtime/Filters/Mesh/MeshSkinning.h b/Runtime/Filters/Mesh/MeshSkinning.h
new file mode 100644
index 0000000..b56efa9
--- /dev/null
+++ b/Runtime/Filters/Mesh/MeshSkinning.h
@@ -0,0 +1,64 @@
+#ifndef MESHSKINNING_H
+#define MESHSKINNING_H
+
+#include "Runtime/Math/Vector3.h"
+#include "Runtime/Math/Quaternion.h"
+#include "Mesh.h"
+#include "Runtime/Geometry/AABB.h"
+#include "Runtime/GfxDevice/GfxDeviceTypes.h"
+#include <vector>
+#include <list>
+
+class GPUSkinningInfo;
+
+typedef std::vector<BoneInfluence> CompactSkin;
+struct BlendShapeData;
+
+enum TransformInstruction { kNormalizeFastest = 0, kNormalizeFast = 1, kNoNormalize = 3 };
+class VertexData;
+
+struct SkinMeshInfo
+{
+ int bonesPerVertex;
+
+ void* compactSkin;
+ int boneCount;
+
+ const void* inVertices;
+ void* outVertices;
+ int inStride;
+ int outStride;
+
+ int normalOffset;
+ int tangentOffset;
+ bool skinNormals;
+ bool skinTangents;
+
+ int vertexCount;
+
+ // This is instance data and must be double buffered so the render thread can work in paralell.
+ UInt8* allocatedBuffer;
+ Matrix4x4f* cachedPose;
+ float* blendshapeWeights;
+
+ int blendshapeCount;
+ const BlendShapeData* blendshapes;
+
+ bool memExport; // Is set up for memexport (Xbox) or streamout (DX11)
+
+#if UNITY_PS3
+ const VertexData* vertexData;
+#endif
+
+ GPUSkinningInfo *mei;
+
+ SkinMeshInfo();
+
+ void Allocate();
+ void Release () const;
+};
+
+void DeformSkinnedMesh (SkinMeshInfo& info);
+void* DeformSkinnedMeshJob (void* rawData);
+
+#endif