mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add static glTF support (#14557)
Co-authored-by: Lars Mueller <appgurulars@gmx.de> Co-authored-by: jordan4ibanez <jordan4ibanez@users.noreply.github.com> Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
parent
8972c80d7d
commit
ac11a14509
47 changed files with 2863 additions and 28 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <optional>
|
||||
#include "CBoneSceneNode.h"
|
||||
#include "IAnimatedMeshSceneNode.h"
|
||||
#include "SSkinMeshBuffer.h"
|
||||
#include "os.h"
|
||||
|
||||
namespace
|
||||
|
@ -596,6 +597,15 @@ IMeshBuffer *CSkinnedMesh::getMeshBuffer(const video::SMaterial &material) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
u32 CSkinnedMesh::getTextureSlot(u32 meshbufNr) const
|
||||
{
|
||||
return TextureSlots.at(meshbufNr);
|
||||
}
|
||||
|
||||
void CSkinnedMesh::setTextureSlot(u32 meshbufNr, u32 textureSlot) {
|
||||
TextureSlots.at(meshbufNr) = textureSlot;
|
||||
}
|
||||
|
||||
//! returns an axis aligned bounding box
|
||||
const core::aabbox3d<f32> &CSkinnedMesh::getBoundingBox() const
|
||||
{
|
||||
|
@ -1057,10 +1067,17 @@ void CSkinnedMesh::updateBoundingBox(void)
|
|||
scene::SSkinMeshBuffer *CSkinnedMesh::addMeshBuffer()
|
||||
{
|
||||
scene::SSkinMeshBuffer *buffer = new scene::SSkinMeshBuffer();
|
||||
TextureSlots.push_back(LocalBuffers.size());
|
||||
LocalBuffers.push_back(buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
void CSkinnedMesh::addMeshBuffer(SSkinMeshBuffer *meshbuf)
|
||||
{
|
||||
TextureSlots.push_back(LocalBuffers.size());
|
||||
LocalBuffers.push_back(meshbuf);
|
||||
}
|
||||
|
||||
CSkinnedMesh::SJoint *CSkinnedMesh::addJoint(SJoint *parent)
|
||||
{
|
||||
SJoint *joint = new SJoint;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue