| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#if !defined( AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) |
| 25 |
#define AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_ |
| 26 |
|
| 27 |
#if _MSC_VER > 1000 |
| 28 |
#pragma once |
| 29 |
#endif |
| 30 |
|
| 31 |
#include "mathlib.h" |
| 32 |
|
| 33 |
class DPlane; |
| 34 |
|
| 35 |
class DWinding |
| 36 |
{ |
| 37 |
public: |
| 38 |
DWinding(); |
| 39 |
virtual ~DWinding(); |
| 40 |
|
| 41 |
void AllocWinding( int points ); |
| 42 |
|
| 43 |
bool ChopWinding( DPlane* chopPlane ); |
| 44 |
bool ChopWindingInPlace( DPlane* chopPlane, vec_t ON_EPSILON ); |
| 45 |
void ClipWindingEpsilon( DPlane* chopPlane, vec_t epsilon, DWinding** front, DWinding** back ); |
| 46 |
|
| 47 |
void CheckWinding(); |
| 48 |
void WindingCentre( vec3_t centre ); |
| 49 |
void WindingBounds( vec3_t mins, vec3_t maxs ); |
| 50 |
void RemoveColinearPoints(); |
| 51 |
|
| 52 |
DWinding* ReverseWinding(); |
| 53 |
DWinding* CopyWinding(); |
| 54 |
DPlane* WindingPlane(); |
| 55 |
|
| 56 |
int WindingOnPlaneSide( vec3_t normal, vec_t dist ); |
| 57 |
|
| 58 |
vec_t WindingArea(); |
| 59 |
|
| 60 |
|
| 61 |
int numpoints; |
| 62 |
vec3_t* p; |
| 63 |
vec3_t clr; |
| 64 |
}; |
| 65 |
|
| 66 |
const int MAX_POINTS_ON_WINDING = 64; |
| 67 |
|
| 68 |
const double ON_EPSILON = 0.01; |
| 69 |
|
| 70 |
#endif |