mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
progress
This commit is contained in:
parent
d10abba38c
commit
503d7cf081
13 changed files with 434 additions and 498 deletions
|
@ -16,17 +16,32 @@ namespace scene
|
|||
class IBoneSceneNode : public ISceneNode
|
||||
{
|
||||
public:
|
||||
IBoneSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id = -1) :
|
||||
ISceneNode(parent, mgr, id) {}
|
||||
IBoneSceneNode(ISceneNode *parent, ISceneManager *mgr,
|
||||
s32 id = -1, u32 boneIndex = 0,
|
||||
const std::optional<std::string> &boneName = std::nullopt)
|
||||
:
|
||||
ISceneNode(parent, mgr, id),
|
||||
BoneIndex(boneIndex)
|
||||
{
|
||||
setName(boneName);
|
||||
}
|
||||
|
||||
//! Get the index of the bone
|
||||
virtual u32 getBoneIndex() const = 0;
|
||||
//! Returns the index of the bone
|
||||
u32 getBoneIndex() const
|
||||
{
|
||||
return BoneIndex;
|
||||
}
|
||||
|
||||
//! Get the axis aligned bounding box of this node
|
||||
const core::aabbox3d<f32> &getBoundingBox() const override = 0;
|
||||
//! returns the axis aligned bounding box of this node
|
||||
const core::aabbox3d<f32> &getBoundingBox() const override
|
||||
{
|
||||
return Box;
|
||||
}
|
||||
|
||||
//! Returns the relative transformation of the scene node.
|
||||
// virtual core::matrix4 getRelativeTransformation() const = 0;
|
||||
const u32 BoneIndex;
|
||||
|
||||
// Bogus box; bone scene nodes are not rendered anyways.
|
||||
static constexpr core::aabbox3d<f32> Box = {{0, 0, 0}};
|
||||
|
||||
//! The render method.
|
||||
/** Does nothing as bones are not visible. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue