AnimEngine
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
Bone Class Reference
Inheritance diagram for Bone:
Inheritance graph
[legend]
Collaboration diagram for Bone:
Collaboration graph
[legend]

Public Types

enum  DrawMode { lines, axes }
 

Public Member Functions

 Bone (const glm::mat4 &inverse_bind)
 
 Bone (const glm::mat4 &inverse_bind, const Pose &pose)
 
 Bone (const glm::vec3 &head, const glm::vec3 &tail, float roll)
 
glm::vec3 getHead () const
 
glm::vec3 getTail () const
 
float getLength () const
 
virtual void draw (const MVPset &MVP, Program *shader=nullptr) override
 
virtual bool isHidden () const override
 
virtual bool canOverrideShader () const override
 
virtual bool requiresOverrideShader () const override
 
virtual void configureDrawScale (Pose *pose) const
 
virtual const PosegetPose () const override
 
virtual void setPose (const Pose &pose) override
 
virtual void unlink () override
 
virtual void link (Entity *parent) override
 
virtual bool hasParentBone () const
 
virtual glm::mat4 getBoneLocalTransform () const
 
virtual glm::mat4 getBoneWorldTransform () const
 
virtual glm::mat4 getInverseBindTransform () const
 
virtual glm::mat4 getJointTransform () const
 
virtual glm::mat4 getJointTransform ()
 
- Public Member Functions inherited from Entity
 Entity (const std::string &name)
 
const ent_uuid_t & UUID () const
 
const std::string & getName () const
 
void setName (const std::string &name)
 
void addChild (Entity *entity)
 
virtual Entityreplace (Entity *replacement)
 Replace the node in the tree with 'replacement' and return original node ('this')
 
const std::map< ent_uuid_t, Entity * > & getChildren () const
 
size_t numChildren () const
 
bool hasParent () const
 
EntitygetParent ()
 
const EntitygetParent () const
 
- Public Member Functions inherited from PosedComponent
virtual bool isPosed () const override
 
- Public Member Functions inherited from PoseableComponent
virtual bool isPoseable () const override
 
- Public Member Functions inherited from DrawableInterfaceComponent
virtual bool isDrawable () const override
 
virtual bool isGloballyIlluminated () const
 

Public Attributes

int legacy_parent = -1
 
std::vector< int > legacy_children
 
int joint_index = -1
 
DrawMode draw_mode = DrawMode::lines
 
bool use_edit_color = false
 
- Public Attributes inherited from Entity
unsigned int traversal_scratch = 0
 

Static Public Attributes

static const glm::vec3 edit_color = glm::vec3(.7, .3, 0.2)
 
static const glm::vec3 pose_color = glm::vec3(.6, .6, .9)
 

Protected Member Functions

void _update_joint_transform_cache ()
 

Protected Attributes

Pose _pose
 
glm::mat4 _inverse_bind
 
float _length = 1.0
 
Bone_parent_bone = nullptr
 
bool _cached_joint_dirty = true
 
glm::mat4 _cached_joint_transform
 
- Protected Attributes inherited from Entity
std::string _name
 
Entity_parent = nullptr
 
std::map< ent_uuid_t, Entity * > _children
 

Friends

class Skeleton
 

The documentation for this class was generated from the following files: