Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions OgreMain/include/OgreTagPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ THE SOFTWARE.

#include "OgrePrerequisites.h"

#include "OgreBone.h"
#include "OgreNode.h"
#include "OgreMatrix4.h"

namespace Ogre {
Expand All @@ -57,11 +57,11 @@ namespace Ogre {
skeleton which has this tag point. Use the Entity::attachMovableObjectToBone method to attach
the objects, which creates a new TagPoint on demand.
*/
class _OgreExport TagPoint : public Bone
class _OgreExport TagPoint : public Node
{

public:
TagPoint(unsigned short handle, Skeleton* creator);
TagPoint();

Entity *getParentEntity(void) const;
MovableObject* getChildObject(void) const;
Expand Down Expand Up @@ -106,6 +106,10 @@ namespace Ogre {
Entity *mParentEntity;
MovableObject *mChildObject;
mutable Affine3 mFullLocalTransform;

using Node::createChild;
Node* createChildImpl(void) override { return NULL; }
Node* createChildImpl(const String& name) override { return NULL; }
};

/** @} */
Expand Down
3 changes: 1 addition & 2 deletions OgreMain/src/OgreSkeletonInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ namespace Ogre {
{
TagPoint* ret;
if (mFreeTagPoints.empty()) {
ret = OGRE_NEW TagPoint(uint16(-1), this);
ret = OGRE_NEW TagPoint();
mActiveTagPoints.push_back(ret);
} else {
ret = mFreeTagPoints.front();
Expand All @@ -206,7 +206,6 @@ namespace Ogre {
ret->setPosition(offsetPosition);
ret->setOrientation(offsetOrientation);
ret->setScale(Vector3::UNIT_SCALE);
ret->setBindingPose();
bone->addChild(ret);

return ret;
Expand Down
9 changes: 4 additions & 5 deletions OgreMain/src/OgreTagPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ THE SOFTWARE.
namespace Ogre {

//-----------------------------------------------------------------------------
TagPoint::TagPoint(unsigned short handle, Skeleton* creator)
: Bone(handle, creator)
, mInheritParentEntityOrientation(true)
TagPoint::TagPoint()
: mInheritParentEntityOrientation(true)
, mInheritParentEntityScale(true)
, mParentEntity(0)
, mChildObject(0)
Expand Down Expand Up @@ -96,7 +95,7 @@ namespace Ogre {
//-----------------------------------------------------------------------------
void TagPoint::needUpdate(bool forceParentUpdate)
{
Bone::needUpdate(forceParentUpdate);
Node::needUpdate(forceParentUpdate);

// We need to tell parent entities node
if (mParentEntity)
Expand All @@ -114,7 +113,7 @@ namespace Ogre {
void TagPoint::updateFromParentImpl(void) const
{
// Call superclass
Bone::updateFromParentImpl();
Node::updateFromParentImpl();

// Save transform for local skeleton
mFullLocalTransform.makeTransform(
Expand Down