UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
polylib.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 1997-2001 Id Software, Inc.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
../../../shared/mathlib.h
"
28
30
typedef
struct
winding_s {
31
int
numpoints
;
32
vec3_t
p
[4];
34
}
winding_t
;
35
36
#define MAX_POINTS_ON_WINDING 64
37
38
winding_t
*
AllocWinding
(
int
points);
39
vec_t
WindingArea
(
const
winding_t
* w);
40
void
WindingCenter
(
const
winding_t
* w,
vec3_t
center);
41
void
ClipWindingEpsilon
(
const
winding_t
* in,
const
vec3_t
normal,
const
vec_t
dist,
42
const
vec_t
epsilon,
winding_t
** front,
winding_t
** back);
43
winding_t
*
ChopWinding
(
winding_t
* in,
vec3_t
normal,
vec_t
dist);
44
winding_t
*
CopyWinding
(
const
winding_t
* w);
45
winding_t
*
ReverseWinding
(
const
winding_t
* w);
46
winding_t
*
BaseWindingForPlane
(
const
vec3_t
normal,
const
vec_t
dist);
47
void
RemoveColinearPoints
(
winding_t
* w);
48
void
FreeWinding
(
winding_t
* w);
49
void
WindingBounds
(
const
winding_t
* w,
vec3_t
mins,
vec3_t
maxs);
50
51
/* frees the original if clipped */
52
void
ChopWindingInPlace
(
winding_t
** w,
const
vec3_t
normal,
const
vec_t
dist,
const
vec_t
epsilon);
53
bool
WindingIsTiny
(
winding_t
* w);
54
bool
WindingIsHuge
(
const
winding_t
* w);
55
bool
FixWinding
(
winding_t
* w);
mathlib.h
ChopWinding
winding_t * ChopWinding(winding_t *in, vec3_t normal, vec_t dist)
Definition
polylib.cpp:391
FreeWinding
void FreeWinding(winding_t *w)
Definition
polylib.cpp:46
WindingIsTiny
bool WindingIsTiny(winding_t *w)
Returns true if the winding would be crunched out of existance by the vertex snapping.
Definition
polylib.cpp:407
ReverseWinding
winding_t * ReverseWinding(const winding_t *w)
Definition
polylib.cpp:193
ChopWindingInPlace
void ChopWindingInPlace(winding_t **w, const vec3_t normal, const vec_t dist, const vec_t epsilon)
Definition
polylib.cpp:299
AllocWinding
winding_t * AllocWinding(int points)
Allocate a new winding (polygon).
Definition
polylib.cpp:38
RemoveColinearPoints
void RemoveColinearPoints(winding_t *w)
Definition
polylib.cpp:55
WindingIsHuge
bool WindingIsHuge(const winding_t *w)
Returns true if the winding still has one of the points from basewinding for plane.
Definition
polylib.cpp:427
BaseWindingForPlane
winding_t * BaseWindingForPlane(const vec3_t normal, const vec_t dist)
Definition
polylib.cpp:116
WindingCenter
void WindingCenter(const winding_t *w, vec3_t center)
Definition
polylib.cpp:106
WindingBounds
void WindingBounds(const winding_t *w, vec3_t mins, vec3_t maxs)
Definition
polylib.cpp:97
FixWinding
bool FixWinding(winding_t *w)
removes degenerate edges from a winding
Definition
polylib.cpp:478
WindingArea
vec_t WindingArea(const winding_t *w)
Definition
polylib.cpp:81
CopyWinding
winding_t * CopyWinding(const winding_t *w)
Copy a winding with all its points allocated.
Definition
polylib.cpp:185
ClipWindingEpsilon
void ClipWindingEpsilon(const winding_t *in, const vec3_t normal, const vec_t dist, const vec_t epsilon, winding_t **front, winding_t **back)
Definition
polylib.cpp:204
winding_t
for storing the vertices of the side of a brush or other polygon
Definition
polylib.h:30
winding_t::numpoints
int numpoints
Definition
polylib.h:31
winding_t::p
vec3_t p[4]
Definition
polylib.h:32
vec_t
float vec_t
Definition
ufotypes.h:37
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
tools
ufo2map
common
polylib.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0