|
@@ -3,6 +3,7 @@
|
|
|
// Code licensed under the BSD License.
|
|
// Code licensed under the BSD License.
|
|
|
// http://www.anki3d.org/LICENSE
|
|
// http://www.anki3d.org/LICENSE
|
|
|
|
|
|
|
|
|
|
+#if 0
|
|
|
#include "anki/scene/SkinNode.h"
|
|
#include "anki/scene/SkinNode.h"
|
|
|
#include "anki/resource/Skin.h"
|
|
#include "anki/resource/Skin.h"
|
|
|
#include "anki/resource/Skeleton.h"
|
|
#include "anki/resource/Skeleton.h"
|
|
@@ -13,8 +14,6 @@ namespace anki {
|
|
|
|
|
|
|
|
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
|
|
#define BUFFER_OFFSET(i) ((char *)NULL + (i))
|
|
|
|
|
|
|
|
-#if 0
|
|
|
|
|
-
|
|
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
|
// SkinMesh =
|
|
// SkinMesh =
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
@@ -71,7 +70,6 @@ SkinModelPatch::SkinModelPatch(const ModelPatchBase* mpatch_,
|
|
|
xfbVaos(alloc)
|
|
xfbVaos(alloc)
|
|
|
{
|
|
{
|
|
|
// XXX set spatial private
|
|
// XXX set spatial private
|
|
|
-#if 0
|
|
|
|
|
// Create the model patch
|
|
// Create the model patch
|
|
|
skinMeshes.resize(mpatch->getMeshesCount());
|
|
skinMeshes.resize(mpatch->getMeshesCount());
|
|
|
for(U i = 0; i < mpatch->getMeshesCount(); i++)
|
|
for(U i = 0; i < mpatch->getMeshesCount(); i++)
|
|
@@ -124,7 +122,6 @@ SkinModelPatch::SkinModelPatch(const ModelPatchBase* mpatch_,
|
|
|
ANKI_ASSERT(vbo != nullptr);
|
|
ANKI_ASSERT(vbo != nullptr);
|
|
|
xfbVao.attachElementArrayBufferVbo(vbo);
|
|
xfbVao.attachElementArrayBufferVbo(vbo);
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
@@ -236,7 +233,6 @@ void SkinNode::frameUpdate(float prevUpdateTime, float crntTime, int f)
|
|
|
void SkinNode::interpolate(const SkelAnim& animation, float frame,
|
|
void SkinNode::interpolate(const SkelAnim& animation, float frame,
|
|
|
SceneVector<Vec3>& boneTranslations, SceneVector<Mat3>& boneRotations)
|
|
SceneVector<Vec3>& boneTranslations, SceneVector<Mat3>& boneRotations)
|
|
|
{
|
|
{
|
|
|
-#if 0
|
|
|
|
|
ANKI_ASSERT(frame < animation.getFramesNum());
|
|
ANKI_ASSERT(frame < animation.getFramesNum());
|
|
|
|
|
|
|
|
// calculate the t (used in slerp and lerp) using the keyframs and the
|
|
// calculate the t (used in slerp and lerp) using the keyframs and the
|
|
@@ -296,14 +292,12 @@ void SkinNode::interpolate(const SkelAnim& animation, float frame,
|
|
|
localTransl = Vec3(0.0, 0.0, 0.0);
|
|
localTransl = Vec3(0.0, 0.0, 0.0);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
|
void SkinNode::updateBoneTransforms(const Skeleton& skeleton,
|
|
void SkinNode::updateBoneTransforms(const Skeleton& skeleton,
|
|
|
SceneVector<Vec3>& boneTranslations, SceneVector<Mat3>& boneRotations)
|
|
SceneVector<Vec3>& boneTranslations, SceneVector<Mat3>& boneRotations)
|
|
|
{
|
|
{
|
|
|
-#if 0
|
|
|
|
|
std::array<uint, 128> queue;
|
|
std::array<uint, 128> queue;
|
|
|
uint head = 0, tail = 0;
|
|
uint head = 0, tail = 0;
|
|
|
|
|
|
|
@@ -356,7 +350,6 @@ void SkinNode::updateBoneTransforms(const Skeleton& skeleton,
|
|
|
queue[tail++] = boned.getChild(i).getId();
|
|
queue[tail++] = boned.getChild(i).getId();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
//==============================================================================
|
|
@@ -365,7 +358,6 @@ void SkinNode::deformHeadsTails(const Skeleton& skeleton,
|
|
|
const SceneVector<Mat3>& boneRotations,
|
|
const SceneVector<Mat3>& boneRotations,
|
|
|
SceneVector<Vec3>& heads, SceneVector<Vec3>& tails)
|
|
SceneVector<Vec3>& heads, SceneVector<Vec3>& tails)
|
|
|
{
|
|
{
|
|
|
-#if 0
|
|
|
|
|
for(uint i = 0; i < skeleton.getBones().size(); i++)
|
|
for(uint i = 0; i < skeleton.getBones().size(); i++)
|
|
|
{
|
|
{
|
|
|
const Mat3& rot = boneRotations[i];
|
|
const Mat3& rot = boneRotations[i];
|
|
@@ -374,9 +366,8 @@ void SkinNode::deformHeadsTails(const Skeleton& skeleton,
|
|
|
heads[i] = skeleton.getBones()[i].getHead().getTransformed(transl, rot);
|
|
heads[i] = skeleton.getBones()[i].getHead().getTransformed(transl, rot);
|
|
|
tails[i] = skeleton.getBones()[i].getTail().getTransformed(transl, rot);
|
|
tails[i] = skeleton.getBones()[i].getTail().getTransformed(transl, rot);
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#endif
|
|
|
|
|
-
|
|
|
|
|
} // end namespace
|
|
} // end namespace
|
|
|
|
|
+
|
|
|
|
|
+#endif
|