00001 //=========================================================================== 00002 //= planta_f.h Noviembre de 1999 = 00003 //=-------------------------------------------------------------------------= 00004 //= Especificacion de un modelo geometrico fractal 3D para especificar = 00005 //= estructuras vegetales. = 00006 //=-------------------------------------------------------------------------= 00007 //= ADVERTENCIA: ESTE SOFTWARE NO ESTA CONCEBIDO NI DISENNADO PARA EL USO = 00008 //= EN EQUIPO DE CONTROL EN LINEA EN ENTORNOS PELIGROSOS QUE REQUIERAN UN = 00009 //= DESEMPENNO LIBRE DE FALLAS, COMO LA OPERACION DE PLANTAS NUCLEARES, = 00010 //= SISTEMAS DE NAVEGACION O COMUNICACION EN AVIONES, TRAFICO AEREO, = 00011 //= EQUIPO MEDICO DEL CUAL DEPENDAN VIDAS HUMANAS O SISTEMAS DE ARMAMENTO, = 00012 //= EN LOS CUALES UNA FALLA EN EL SOFTWARE PUEDA IMPLICAR DIRECTAMENTE LA = 00013 //= MUERTE, DANNOS PERSONALES O DANNOS FISICOS Y/O AMBIENTALES GRAVES = 00014 //= ("ACTIVIDADES DE ALGO RIESGO"). = 00015 //=-------------------------------------------------------------------------= 00016 //= Este codigo esta basado en el ejemplo "fractals" de Philip Winston = 00017 //= pwinston@hmc.edu, http://www.cs.hmc.edu/people/pwinston. Modificado por = 00018 //= Autor original: Oscar J. Chavarro G. A.K.A. JEDILINK. Copyright (c), = 00019 //= 1997 - 2003, oscarchavarro@hotmail.com = 00020 //= AQUYNZA es software libre, y se rige bajo los terminos de la licencia = 00021 //= LGPL de GNU (http://www.gnu.org). Para mayor informacion respecto a la = 00022 //= licencia de uso, consulte el archivo ./doc/LICENCIA en la distribucion. = 00023 //=========================================================================== 00024 00025 #ifndef __PLANTA_FRACTAL__ 00026 #define __PLANTA_FRACTAL__ 00027 00028 #include "jed_defs.h" 00029 #include "toolkits/entorno/material.h" 00030 00031 #ifndef __GEOMETRIA__ 00032 #error "No incluya a esfera.h, incluya a geometria.h!" 00033 #endif 00034 00035 #ifdef VEL_ROSITA 00036 #include "toolkits/geom/geometria.h" 00037 #endif 00038 00039 class PLANTA_FRACTAL : public GEOMETRIA_3D 00040 { 00041 private: 00042 //- Esquema de representacion procedimental ----------------------------- 00043 int semilla_azar; 00044 int niveles_de_recursion; 00045 int hojas_por_rama; 00046 00047 //- Atributos de visualizacion ------------------------------------------ 00048 double escala; 00049 int id_lista_planta; 00050 int id_lista_tallo; 00051 int id_lista_tallo_terminal; 00052 int id_lista_tallo_y_hojas; 00053 int id_lista_hoja; 00054 MATERIAL material_hojas; 00055 MATERIAL material_tallos; 00056 00057 //----------------------------------------------------------------------- 00058 BOOLEAN preprocesada_gl; 00059 #ifdef GL_ENABLED 00060 void pintar_fractal_gl(int nivel); 00061 void compilar_listas_gl(void); 00062 #endif 00063 00064 public: 00065 //- Metodos standard de GEOMETRIA AQUYNZA ------------------------------- 00066 PLANTA_FRACTAL(int n, double e); 00067 virtual ~PLANTA_FRACTAL(); 00068 00069 #ifdef GL_ENABLED 00070 void 00071 pintar_gl(CALIDAD_VISUAL *Calidad, MATERIAL *Material, CAMARA *Camara); 00072 #endif // GL_ENABLED 00073 GEOMETRIA *crear_copia(void); 00074 void anexar_textura(IMAGEN *img); 00075 int clasificar_punto(VECTOR p); 00076 void pintar_povray(FILE *fd); 00077 void pintar_aqz(FILE *fd); 00078 00079 //- Metodos especificos de esta clase ---------------------------------- 00080 void config(int semilla, int recursion, int hojas); 00081 }; 00082 00083 #endif // PLANTA_FRACTAL 00084 00085 //=========================================================================== 00086 //= EOF = 00087 //=========================================================================== 00088