#include "jv.h"

#define MAX_MODEL_LINES       16

#define NOT_A_VERTEX            0
#define LINE_INTERSEPTION       2
#define SEGMENT_INTERSEPTION    4
#ifndef _MODEL_H_
#define _MODEL_H_

typedef 
struct model_st
{ 
   int     n_lines ;
   jvLine  lines[MAX_MODEL_LINES] ;

   jvPoint2D interseptions[MAX_MODEL_LINES][MAX_MODEL_LINES] ;
   char      vertexType[MAX_MODEL_LINES][MAX_MODEL_LINES] ;

   float min_x ;
   float min_y ;
   float max_x ;
   float max_y ;

}
* Model ;


//int f_restricoes(int nlines_img, jvLine* lines_img, int nlines_mdl, jvLine* lines_mdl, unsigned char* current_interpretation) ;
//void  copyLine( jvLine * dest, jvLine *org ) ;

//===========================================================================//
// Libera memoria usada para guardar as informacoes do modelo                //
void destroy_model( Model *mdl ) ;

//===========================================================================//
// Aloca memoria para guardar as informacoes do modelo                       //
Model create_model( char *file_name ) ;

// Extrai do modelo as informacoes que serao usada para a restricao, a       //
// homografia e a geração dos pontos na imagem                               //
void print_model( Model mdl ) ;








#endif








