//=============================================================================
#ifndef GRAPHENE_EYES_CORRECTION_HELPER_H
#define GRAPHENE_EYES_CORRECTION_HELPER_H
//=============================================================================

//== INCLUDES =================================================================

#include <graphene/character/data_structure/Character.h>


//== NAMESPACE ================================================================


namespace graphene {
namespace eyes_correction_helper {

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

struct Eye_info
{
    std::string fn_sel_eyeregion_left;
    std::string fn_sel_eyeregion_right;

    std::string s_eyemesh_left;
    std::string s_eyemesh_right;
    std::string s_eyetrans_left;
    std::string s_eyetrans_right;
    std::string s_eyegland_left;
    std::string s_eyegland_right;
    std::string s_eyejoint_left;
    std::string s_eyejoint_right;
    std::string s_bodymesh;
};

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

// Use this when eyes are modeled as one mesh
struct Combined_eyes_info
{
    std::string fn_sel_body_mesh_eyeregion_left;
    std::string fn_sel_body_mesh_eyeregion_right;

    std::string fn_sel_eye_mesh_vertices_left;
    std::string fn_sel_eye_mesh_vertices_right;

    std::string s_bodymesh;
    std::string s_eyemesh;
    std::string s_eyetransmesh;
    std::string s_eyejoint_left;
    std::string s_eyejoint_right;
};

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

/// correct eyes
/// this is basically a reimplementation of update_eyes_ver2 in Eyes_helper.h
bool correct_eyes(character::Character& inout_character,
                  const Eye_info& eye_info);

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

/// correct eyes
/// Use this when eyes are modeled as one mesh
bool correct_eyes(character::Character& inout_character,
                  const Combined_eyes_info& eye_info);

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

/// correct eyelids
bool correct_eyelids(character::Character& inout_character,
                     const Eye_info& eye_info,
                     const std::string& fn_sel_eyecontour_left,
                     const std::string& fn_sel_eyecontour_right);

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

bool register_both_eyes(Mat4f& M_registration_eyes_left,
                        Mat4f& M_registration_eyes_right,
                        const std::vector<Point>& src_left,
                        const std::vector<Point>& dst_left,
                        const std::vector<Point>& src_right,
                        const std::vector<Point>& dst_right);

//=============================================================================
} // namespace eyes_correction_helper
} // namespace graphene
//=============================================================================
#endif
//=============================================================================

