mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Fix and clean up skeletal animation (#15722)
* Fix attachments lagging behind their parents (#14818) * Fix animation blending (#14817) * Bring back cool guy as another .x smoke test * Add .x mesh loader unittest * Do bounding box & matrix calculation at proper point in time * Remove obsolete `SAnimatedMesh`
This commit is contained in:
parent
0bb87eb1ff
commit
fde6384a09
40 changed files with 856 additions and 1388 deletions
|
@ -6,7 +6,6 @@
|
|||
#include "SkinnedMesh.h"
|
||||
#include "SMesh.h"
|
||||
#include "CMeshBuffer.h"
|
||||
#include "SAnimatedMesh.h"
|
||||
#include "os.h"
|
||||
|
||||
#include <cassert>
|
||||
|
@ -178,34 +177,5 @@ SMesh *CMeshManipulator::createMeshCopy(scene::IMesh *mesh) const
|
|||
return clone;
|
||||
}
|
||||
|
||||
//! Returns amount of polygons in mesh.
|
||||
s32 CMeshManipulator::getPolyCount(scene::IMesh *mesh) const
|
||||
{
|
||||
if (!mesh)
|
||||
return 0;
|
||||
|
||||
s32 trianglecount = 0;
|
||||
|
||||
for (u32 g = 0; g < mesh->getMeshBufferCount(); ++g)
|
||||
trianglecount += mesh->getMeshBuffer(g)->getIndexCount() / 3;
|
||||
|
||||
return trianglecount;
|
||||
}
|
||||
|
||||
//! Returns amount of polygons in mesh.
|
||||
s32 CMeshManipulator::getPolyCount(scene::IAnimatedMesh *mesh) const
|
||||
{
|
||||
if (mesh && mesh->getMaxFrameNumber() != 0)
|
||||
return getPolyCount(mesh->getMesh(0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//! create a new AnimatedMesh and adds the mesh to it
|
||||
IAnimatedMesh *CMeshManipulator::createAnimatedMesh(scene::IMesh *mesh, scene::E_ANIMATED_MESH_TYPE type) const
|
||||
{
|
||||
return new SAnimatedMesh(mesh, type);
|
||||
}
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue