map.h

Go to the documentation of this file.
00001 
00005 /*
00006 All original material Copyright (C) 2002-2010 UFO: Alien Invasion.
00007 
00008 Copyright (C) 1997-2001 Id Software, Inc.
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 
00019 See the GNU General Public License for more details.
00020 
00021 You should have received a copy of the GNU General Public License
00022 along with this program; if not, write to the Free Software
00023 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00024 
00025 */
00026 
00027 #ifndef UFO2MAP_MAP_H
00028 #define UFO2MAP_MAP_H
00029 
00030 #include "../../shared/mathlib.h"
00031 #include "../../shared/defines.h"
00032 
00033 typedef struct brush_texture_s {
00034     vec2_t  shift;
00035     vec_t   rotate;
00036     vec2_t  scale;
00037     char    name[MAX_TEXPATH];  
00038     int     surfaceFlags;
00039     int     value;
00040 } brush_texture_t;
00041 
00043 typedef struct winding_s {
00044     int     numpoints;
00045     vec3_t  p[4];       
00047 } winding_t;
00048 
00049 typedef struct face_s {
00050     struct face_s   *next;      
00055     struct face_s   *merged;    
00056     struct face_s   *split[2];  
00058     struct portal_s *portal;
00059     int             texinfo;
00060     int             planenum;
00061     int             contentFlags;   
00062     winding_t       *w;
00063     int             numpoints;
00064     int             vertexnums[MAXEDGES];
00065 } face_t;
00066 
00067 typedef struct side_s {
00068     int         planenum;
00069     int         texinfo;
00070     struct winding_s    *winding;
00071     struct side_s   *original;  
00072     int         contentFlags;   
00073     int         surfaceFlags;   
00074     qboolean    visible;        
00075     qboolean    tested;         
00076     qboolean    bevel;          
00077     qboolean    isCompositeMember; 
00079     struct mapbrush_s *brush;       
00080 } side_t;
00081 
00082 typedef struct mapbrush_s {
00083     int     entitynum;      
00084     int     brushnum;       
00086     int     contentFlags;
00087 
00088     vec3_t  mins, maxs;
00089 
00090     int     numsides;
00091     struct side_s   *original_sides;
00092 
00096     struct  mapbrush_s **nearBrushes;
00097     int numNear;
00098 
00099     qboolean skipWriteBack; 
00101     qboolean finished;
00102 } mapbrush_t;
00103 
00105 typedef struct plane_s {
00106     vec3_t  normal;         
00107     vec_t   dist;           
00112     int     type;
00113     vec3_t  planeVector[3]; 
00114     struct plane_s  *hash_chain;
00115 } plane_t;
00116 
00117 typedef struct portal_s {
00118     plane_t     plane;
00119     struct node_s       *onnode;        
00120     struct node_s       *nodes[2];      
00121     struct portal_s *next[2];
00122     winding_t   *winding;
00123 
00124     qboolean    sidefound;      
00125     struct side_s       *side;          
00126     face_t      *face[2];       
00127 } portal_t;
00128 
00129 
00130 #endif

Generated by  doxygen 1.6.2