00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "jed_defs.h"
00023
00024 #ifndef __V_SENSOR__
00025 #define __V_SENSOR__
00026
00027 #include "core/control/sensor.h"
00028 #include "toolkits/entorno/camara.h"
00029
00030 #ifndef __VISOR__
00031 #error "No incluya a v_sensor.h, incluya a visor.h!"
00032 #endif
00033
00034 #ifdef VEL_ROSITA
00035 #include "framework/visual/visor.h"
00036 #endif
00037
00038 class VISOR_SENSOR : public VISOR {
00039 protected:
00040
00041 char *_nombre_variable;
00042
00043
00044 int tam_grilla;
00045 int x_grilla;
00046 int y_grilla;
00047 int dx_grilla;
00048 int dy_grilla;
00049 int cuadre_grilla;
00050 double _transparencia;
00051
00052 BOOLEAN leer_sensor(TOKENIZADOR *Sabiondo, char *cad);
00053
00054 public:
00055 VISOR_SENSOR();
00056
00057 #ifdef GL_ENABLED
00058 virtual void pintar_gl(void) = 0;
00059 #endif
00060 void posicione(int tam, int i, int j, int cuadre);
00061 virtual int tipo(void) = 0;
00062 virtual BOOLEAN asociar_sensor(SENSOR *S) = 0;
00063 char *nombre_variable(void);
00064
00065
00066 virtual BOOLEAN leer(TOKENIZADOR *Sabiondo) = 0;
00067 };
00068
00069 class VISOR_SENSOR_FLOAT : public VISOR_SENSOR {
00070 private:
00071 SENSOR_FLOAT *Sensor;
00072
00073
00074 float *data;
00075 int tam_data;
00076 int pos;
00077
00078
00079 int _tipo;
00080 float min_val;
00081 float max_val;
00082
00083 void configurar_vector_de_estado(int tam);
00084
00085 public:
00086 VISOR_SENSOR_FLOAT();
00087 VISOR_SENSOR_FLOAT(int nuevo_tipo, float min, float max);
00088 virtual ~VISOR_SENSOR_FLOAT();
00089
00090 #ifdef GL_ENABLED
00091 void pintar_gl(void);
00092 #endif
00093 int tipo(void);
00094 BOOLEAN asociar_sensor(SENSOR *S);
00095
00096
00097 BOOLEAN leer(TOKENIZADOR *Sabiondo);
00098 };
00099
00100 class VISOR_SENSOR_VECTOR : public VISOR_SENSOR {
00101 private:
00102 SENSOR_VECTOR *Sensor;
00103 VECTOR *data;
00104 int tam_data;
00105 int _tipo;
00106 int pos;
00107 int min_pos;
00108
00109 VECTOR min_val;
00110 VECTOR max_val;
00111
00112 #ifdef GL_ENABLED
00113 void init_fonts(void);
00114 void pintar_vector_gl(CAMARA *Camara);
00115 void pintar_vistavion1_gl(CAMARA *Camara);
00116 void pintar_vistavion2_gl(CAMARA *Camara);
00117 #endif
00118 public:
00119 VISOR_SENSOR_VECTOR();
00120 VISOR_SENSOR_VECTOR(int nuevo_tipo);
00121 virtual ~VISOR_SENSOR_VECTOR();
00122
00123 #ifdef GL_ENABLED
00124 void pintar_gl(void);
00125 #endif
00126 int tipo(void);
00127 BOOLEAN asociar_sensor(SENSOR *S);
00128
00129
00130 BOOLEAN leer(TOKENIZADOR *Sabiondo);
00131 };
00132
00133 extern void
00134 jvs_cuadro_gl(float x, float y, float x_tam, float y_tam, float percent,
00135 double _transparencia);
00136 extern void
00137 jvs_pintar_paleta(float x, float y, float x_tam, float y_tam,
00138 double _transparencia);
00139
00140 #endif
00141
00142
00143
00144