//-----------------------------------------------------------------------------

#pragma once

#include <string>
#include <vector>

//-----------------------------------------------------------------------------

//
// Semantic description of a landmark
//
enum class Landmark_description
{
#if __APPLE__
    UNKNOWN,

    RIGHT_EYE_OUTER,
    RIGHT_EYE_UPPER,
    RIGHT_EYE_LOWER,
    RIGHT_EYE_INNER,
    LEFT_EYE_OUTER,
    LEFT_EYE_UPPER,
    LEFT_EYE_LOWER,
    LEFT_EYE_INNER,
    NOSE_TIP,
    MOUTH_CORNER_RIGHT,
    MOUTH_CORNER_LEFT,

    NECK,
    RIGHT_HIP,
    ROOT,
    LEFT_HIP,
    RIGHT_KNEE,
    LEFT_KNEE,

    LEFT_EAR,
    LEFT_SHOULDER,
    LEFT_ELBOW,
    LEFT_HAND,
    LEFT_ANKLE,

    RIGHT_EAR,
    RIGHT_SHOULDER,
    RIGHT_ELBOW,
    RIGHT_HAND,
    RIGHT_ANKLE,

#else
    UNKNOWN,

    RIGHT_EAR_UPPER,
    RIGHT_EAR_LOWER,

    RIGHT_EYE_OUTER,
    RIGHT_EYE_UPPER,
    RIGHT_EYE_INNER,
    RIGHT_EYE_LOWER,

    NOSE_TIP,

    LEFT_EYE_OUTER,
    LEFT_EYE_UPPER,
    LEFT_EYE_INNER,
    LEFT_EYE_LOWER,

    LEFT_EAR_UPPER,
    LEFT_EAR_LOWER,

    MOUTH_LEFT,
    MOUTH_UPPER,
    MOUTH_RIGHT,
    MOUTH_LOWER,

    RIGHT_HAND_PINKY_KNUCKLE,
    RIGHT_HAND_INDEX_KNUCKLE,

    LEFT_HAND_PINKY_KNUCKLE,
    LEFT_HAND_INDEX_KNUCKLE,

    LEFT_HEEL,
    RIGHT_HEEL,
#endif
};

//-----------------------------------------------------------------------------

//
// Load landmark descriptions from file
//
bool load_landmark_descriptions(const std::string& filename, std::vector<Landmark_description>& landmark_descriptions);

//-----------------------------------------------------------------------------

//
// Landmark with same semantic description
// that is present in two different landmark sets (e.g body and head)
//
struct Landmark_match
{
    size_t index_set_a;
    size_t index_set_b;
};

//-----------------------------------------------------------------------------

//
// Get landmarks which are present in both sets a and b
//
bool get_matching_landmarks(const std::vector<Landmark_description>& landmark_set_a,
                            const std::vector<Landmark_description>& landmark_set_b,
                            std::vector<Landmark_match>& matching_landmarks);

//-----------------------------------------------------------------------------
