2 #ifndef KJY_ANIM_ENGINE_ENTITIES_BASE_HPP_     3 #define KJY_ANIM_ENGINE_ENTITIES_BASE_HPP_     7 #include <components/inheritable/poseable.hpp>     8 #include <components/attachable/KeyframeAnimation.hpp>     9 #include <components/attachable/AttachableComponent.hpp>    10 #include <util/UUID.hpp>    12 #pragma warning(disable: 4250) // Disable warnings about dominance in MSVC    14 typedef uuid_t ent_uuid_t;
    16 std::string uuid_to_string(ent_uuid_t uuid);
    20     Entity() : uuid(generate_uuid()) {}
    21     Entity(
const std::string& name) : uuid(generate_uuid()), _name(name) {}
    23     inline const ent_uuid_t& UUID()
 const {
return(uuid);}
    25     inline const std::string& getName()
 const {
return(_name);}
    26     inline void setName(
const std::string& name) {_name = name;}
    28     void addChild(
Entity* entity);
    29     virtual void unlink();
    30     virtual void link(
Entity* parent);
    35     inline const std::map<ent_uuid_t, Entity*>& getChildren()
 const {
return(_children);}
    36     inline size_t numChildren()
 const {
return(_children.size());}
    37     inline bool hasParent()
 const {
return(_parent != 
nullptr);}
    38     inline Entity* getParent() {
return(_parent);}
    39     inline const Entity* getParent()
 const {
return(_parent);}
    41     unsigned int traversal_scratch = 0;
    46     std::map<ent_uuid_t, Entity*> _children;
    68     virtual const Pose& getPose()
 const override {
return(pose);}
    77     virtual const Pose& getPose()
 const override {
return(this->pose);}
    78     virtual Pose& getMutablePose() {
return(this->pose);}
    79     virtual void setPose(
const Pose& aPose)
 override {this->pose = aPose;}
    85     virtual const Pose& getCachedFinalPose()
 const {
return(_mCachedFinalPose);}
    86     virtual void setCachedFinalPose(
const Pose& aPose) {_mCachedFinalPose = aPose;}
    89     Pose _mCachedFinalPose;
 Definition: rootcomponent.hpp:5
Definition: EntitiesBase.hpp:54
Definition: EntitiesBase.hpp:82
Definition: poseable.hpp:10
Definition: EntitiesBase.hpp:59
Definition: EntitiesBase.hpp:74
Definition: EntitiesBase.hpp:18
virtual Entity * replace(Entity *replacement)
Replace the node in the tree with 'replacement' and return original node ('this') ...
Definition: EntitiesBase.cpp:29
Definition: EntitiesBase.hpp:64
Definition: poseable.hpp:16