polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

animation.h (595B)


      1 
      2 #ifndef POLYADVENT_ANIMATION_H
      3 #define POLYADVENT_ANIMATION_H
      4 
      5 #include "common.h"
      6 #include "node.h"
      7 
      8 #define MAX_JOINT_CHILDREN 4
      9 #define MAX_JOINTS 16
     10 #define JOINT_LABEL_SIZE 8
     11 
     12 struct joint
     13 {
     14     int id;
     15     int children_ids[MAX_JOINT_CHILDREN];
     16     int n_children_ids;
     17     node_id node_id;
     18 };
     19 
     20 struct pose
     21 {
     22     struct joint joints[MAX_JOINTS];
     23     float *weights;
     24     int nweights;
     25     int njoints;
     26 };
     27 
     28 
     29 void load_poses(const char *filename, struct pose *poses, int *nposes);
     30 
     31 void init_joint(struct joint *joint);
     32 void init_pose(struct pose *pose);
     33 
     34 
     35 #endif /* POLYADVENT_ANIMATION_H */