00001 /* 00002 PROJETO USPDesigner 00003 MODULO: BAS (Criacao de Formas Especificas) 00004 Copyright (C) 1989 a 2008, Marcos Tsuzuki, All rights reserved 00005 Universidade de Sao Paulo, EPUSP-PMR 00006 00007 NOME DO ARQUIVO: basrov__.h 00008 Coded by Marcos Tsuzuki 00009 00010 Redistribution and use in source and binary forms, with or without 00011 modification, are permitted provided that the following conditions 00012 are met: 00013 00014 1. Redistributions of source code must retain the above copyright 00015 notice, this list of conditions and the following disclaimer. 00016 00017 2. Redistributions in binary form must reproduce the above copyright 00018 notice, this list of conditions and the following disclaimer in the 00019 documentation and/or other materials provided with the distribution. 00020 00021 3. The names of its contributors may not be used to endorse or promote 00022 products derived from this software without specific prior written 00023 permission. 00024 00025 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00026 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00027 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00028 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00029 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00030 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00031 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00032 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00033 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00034 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 00037 00038 Any feedback is very welcome. 00039 email: mtsuzuki at usp.br (remove space) 00040 */ 00041 00042 #ifndef __BasRov___h 00043 #define __BasRov___h 00044 00045 #ifndef EXTERN 00046 #ifdef _DVS_ 00047 #define EXTERN 00048 #else 00049 #define EXTERN extern 00050 #endif 00051 #endif 00052 00053 #define SOLIDO_TIPO_BARRA 0x01 00054 #define SOLIDO_TIPO_SOLID 0x02 00055 #define SOLIDO_TIPO_PLACA 0x03 00056 00057 #define BARRA_GEOM_CIRCULO 0x01 00058 #define BARRA_GEOM_QUADRADO 0x02 00059 #define BARRA_GEOM_TRIANGULO 0x03 00060 #define BARRA_GEOM_RETANGULO 0x04 00061 #define BARRA_GEOM_ELIPSE 0x05 00062 #define BARRA_GEOM_PERFIL_L 0x06 00063 #define BARRA_GEOM_PERFIL_T 0x07 00064 #define BARRA_GEOM_PERFIL_I 0x08 00065 00066 #define SOLIDO_GEOM_ESFERA 0x20 00067 #define SOLIDO_GEOM_CUBO 0x21 00068 #define SOLIDO_GEOM_PRISMA 0x22 00069 #define SOLIDO_GEOM_PIRAMIDE 0x23 00070 #define SOLIDO_GEOM_CONE 0x24 00071 00072 #define FRONTEIRA_A 0x01 00073 #define FRONTEIRA_CV 0x02 00074 00075 typedef struct ListaOrdenada LOPType; 00076 00077 struct ListaOrdenada 00078 { 00079 SPTYPE optr; /* ponteiro para o solido */ 00080 vector cg; /* centro de gravidade */ 00081 real area; /* area projetada */ 00082 real H_D; /* maior dim / dim princ. */ 00083 real D; /* dimensao principal */ 00084 real param; /* valor a ser ordenado */ 00085 }; 00086 00087 EXTERN vector DirecaoEscoamento; /* Direcao de Escoamento */ 00088 EXTERN LOPType *ListaEscoamento; /* lista de elementos */ 00089 EXTERN int NumListaEscoamento; /* numero de elementos */ 00090 00091 void MSD_execNameMakeCirculo(void); 00092 void MSD_execNameMakeCubo(void); 00093 void MSD_execNameMakePlaca(void); 00094 void MSD_execNameMakePiramide(void); 00095 void MSD_execNameMakeEsfera(void); 00096 void MSD_execNameMakePerfilI(void); 00097 void MSD_execNameMakePerfilL(void); 00098 void MSD_execNameMakePerfilT(void); 00099 void MSD_execNameMakePrisma(void); 00100 void MSD_execNameMakeQuadrado(void); 00101 void MSD_execNameMakeRetangulo(void); 00102 void MSD_execNameMakeTriangulo(void); 00103 void MSD_execNameDimensaoPrincipal(void); 00104 real MSD_determinaDimensaoPrincipal(SPTYPE s, vector dir, real dim); 00105 real MSD_determinaDistanciaParametrica(vector cc, vector dir, vector pp); 00106 real MSD_determinaMaiorDimensao(SPTYPE s); 00107 void MSD_execNameRotaciona(void); 00108 void MSD_execNameDesloca(void); 00109 void MSD_execOrdena(void); 00110 void MSD_execProjetadaTotal(void); 00111 00112 #endif