Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

polylib.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 
00023 typedef struct
00024 {
00025     int     numpoints;
00026     vec3_t  p[4];       // variable sized
00027 } winding_t;
00028 
00029 #define MAX_POINTS_ON_WINDING   64
00030 
00031 // you can define on_epsilon in the makefile as tighter
00032 #ifndef ON_EPSILON
00033 #define ON_EPSILON  0.1
00034 #endif
00035 
00036 winding_t   *AllocWinding (int points);
00037 vec_t   WindingArea (winding_t *w);
00038 void    WindingCenter (winding_t *w, vec3_t center);
00039 void    ClipWindingEpsilon (winding_t *in, vec3_t normal, vec_t dist, 
00040                 vec_t epsilon, winding_t **front, winding_t **back);
00041 winding_t   *ChopWinding (winding_t *in, vec3_t normal, vec_t dist);
00042 winding_t   *CopyWinding (winding_t *w);
00043 winding_t   *ReverseWinding (winding_t *w);
00044 winding_t   *BaseWindingForPlane (vec3_t normal, vec_t dist);
00045 void    CheckWinding (winding_t *w);
00046 void    WindingPlane (winding_t *w, vec3_t normal, vec_t *dist);
00047 void    RemoveColinearPoints (winding_t *w);
00048 int     WindingOnPlaneSide (winding_t *w, vec3_t normal, vec_t dist);
00049 void    FreeWinding (winding_t *w);
00050 void    WindingBounds (winding_t *w, vec3_t mins, vec3_t maxs);
00051 
00052 void    AddWindingToConvexHull( winding_t *w, winding_t **hull, vec3_t normal );
00053 
00054 void    ChopWindingInPlace (winding_t **w, vec3_t normal, vec_t dist, vec_t epsilon);
00055 // frees the original if clipped
00056 
00057 void pw(winding_t *w);

Generated on Thu Aug 25 12:38:08 2005 for Quake III Arena by  doxygen 1.3.9.1