00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __VISOR__
00023 #define __VISOR__
00024
00025 #include "jed_defs.h"
00026 #include "toolkits/entorno/camara.h"
00027 #include "toolkits/media/jed_img.h"
00028
00029 enum ENUM_METODOS_DE_VISUALIZACION {
00030 MDV_DESCONOCIDO = 0,
00031 MDV_ZBUFFER = 1,
00032 MDV_RAYTRACING_CRIOLLO,
00033 MDV_RADIOSIDAD_JERARQUICA,
00034 MDV_RAYTRACER_POVRAY,
00035 MDV_RAYTRACER_RENDERMAN
00036 };
00037
00038 #define PINTAR_FONDO_VISOR() \
00039 glDisable(GL_TEXTURE_2D); \
00040 glMatrixMode(GL_PROJECTION); glLoadIdentity(); \
00041 glMatrixMode(GL_TEXTURE); glLoadIdentity(); \
00042 glMatrixMode(GL_MODELVIEW); glLoadIdentity(); \
00043 glDisable(GL_LIGHTING); glDisable(GL_DEPTH_TEST); \
00044 glShadeModel(GL_FLAT); \
00045 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); \
00046 glFrontFace(GL_CCW); \
00047 glBegin(GL_QUADS); \
00048 glVertex2f(1, 1); glVertex2f(-1, 1); \
00049 glVertex2f(-1, -1); glVertex2f(1, -1); \
00050 glEnd(); \
00051 glEnable(GL_DEPTH_TEST);
00052
00053 class VISOR_SENSOR;
00054
00055 class VISOR
00056 {
00057 protected:
00058 CAMARA camara;
00059 int _metodo_de_visualizacion;
00060 LISTA <VISOR_SENSOR *> lista_visores_subordinados;
00061
00062
00063 BOOLEAN leer_visor_subordinado(TOKENIZADOR *Sabiondo, char *cad);
00064 void pintar_visores_subordinados_gl(CAMARA *C);
00065 public:
00066 VISOR();
00067 virtual ~VISOR();
00068
00069 #ifdef GL_ENABLED
00070 virtual void pintar_gl(void);
00071 #endif
00072 virtual BOOLEAN pintar_raytracing_criollo(IMAGEN_RGB *Imagen);
00073 virtual BOOLEAN
00074 pintar_povray(IMAGEN_RGB *Imagen, char *archivo, BOOLEAN modo_interactivo);
00075 virtual int procesar_teclado(EVENTO_GUI *e);
00076 virtual int procesar_mouse(EVENTO_GUI *e);
00077 virtual void procesar_resize(int x, int y, int x_tam, int y_tam);
00078 virtual int procesar_comando(int idc);
00079 virtual char *reportar_menu(void);
00080 virtual char *reportar_botonera(void);
00081 int metodo_de_visualizacion(void);
00082 LISTA <VISOR_SENSOR *> *sensores(void);
00083
00084
00085 virtual BOOLEAN leer(TOKENIZADOR *Sabiondo);
00086 virtual void grabar(FILE *fd);
00087 };
00088
00089 #ifndef VEL_ROSITA
00090 #include "framework/visual/v_sensor.h"
00091 #endif
00092
00093 #endif // __VISOR__
00094
00095
00096
00097
00098