blob: 357b855663c43b5b4163a69bfbb74196f6f67ae5 [file] [log] [blame]
#ifndef _RIVE_BONE_HPP_
#define _RIVE_BONE_HPP_
#include "rive/generated/bones/bone_base.hpp"
#include <stdio.h>
#include <vector>
namespace rive {
class Constraint;
class Bone : public BoneBase {
private:
std::vector<Bone*> m_ChildBones;
std::vector<Constraint*> m_PeerConstraints;
public:
StatusCode onAddedClean(CoreContext* context) override;
float x() const override;
float y() const override;
inline const std::vector<Bone*> childBones() { return m_ChildBones; }
void addChildBone(Bone* bone);
void tipWorldTranslation(Vec2D& result);
void addPeerConstraint(Constraint* peer);
const std::vector<Constraint*>& peerConstraints() const { return m_PeerConstraints; }
private:
void lengthChanged() override;
};
} // namespace rive
#endif