#ifndef AU_H_DEFINED
#define AU_H_DEFINED

#include "../const.h"
#include "Blocks.h"

struct au {

       int name;
       int face_part;
       union {
            double** motion_points;     // for mouth and eyebrows AUs
            int eyes_status;            // for eyes AUs
       };


       au(int n, int fp) {
               name = n;
               face_part = fp;
               if (fp == EYES)
                  eyes_status = NO_EYE;
               else if (fp == LOWER || fp == UPPER){
                   motion_points = (double**) calloc(ALL_BL_NUM, sizeof(double*));
                   for (int i = 0; i < ALL_BL_NUM; i++) {
                       motion_points[i] = (double*) calloc(9, sizeof(double));
                    }
                }
       }


};




bool InitAus(au*& aus);
bool RecognizeAU(Block* blocks, int eyes_status, int* face_bb, int*& rec_aus, const Init_para& parameters);
void FreeAu(au& action_unit);


#endif // AU_H_DEFINED
