polylib.h

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 1997-2001 Id Software, Inc.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 */
00024 
00025 #ifndef _POLYLIB
00026 #define _POLYLIB
00027 
00028 #include "../map.h"
00029 
00030 #define MAX_POINTS_ON_WINDING   64
00031 
00032 winding_t *AllocWinding(int points);
00033 vec_t WindingArea(const winding_t *w);
00034 void WindingCenter(const winding_t *w, vec3_t center);
00035 void ClipWindingEpsilon(const winding_t *in, const vec3_t normal, const vec_t dist,
00036     const vec_t epsilon, winding_t **front, winding_t **back);
00037 winding_t *ChopWinding(winding_t *in, vec3_t normal, vec_t dist);
00038 winding_t *CopyWinding(const winding_t *w);
00039 winding_t *ReverseWinding(const winding_t *w);
00040 winding_t *BaseWindingForPlane(const vec3_t normal, const vec_t dist);
00041 void RemoveColinearPoints(winding_t *w);
00042 void FreeWinding(winding_t *w);
00043 void WindingBounds(const winding_t *w, vec3_t mins, vec3_t maxs);
00044 
00045 /* frees the original if clipped */
00046 void ChopWindingInPlace(winding_t **w, const vec3_t normal, const vec_t dist, const vec_t epsilon);
00047 
00048 
00049 #endif /* POLYLIB */

Generated by  doxygen 1.6.2