]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/DWinding.h
Wean off #define
[xonotic/netradiant.git] / contrib / bobtoolz / DWinding.h
index 6d58e06e17119b3f6be81bb01a7cd8b6b10405eb..cb8ddda759197504eb5eeef5dd2970aae9b87172 100644 (file)
@@ -1,68 +1,70 @@
 /*
-BobToolz plugin for GtkRadiant
-Copyright (C) 2001 Gordon Biggans
+   BobToolz plugin for GtkRadiant
+   Copyright (C) 2001 Gordon Biggans
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 // DWinding.h: interface for the DWinding class.
 //
 //////////////////////////////////////////////////////////////////////
 
-#if !defined(AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_)
+#if !defined( AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_ )
 #define AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_
 
 #if _MSC_VER > 1000
 #pragma once
 #endif // _MSC_VER > 1000
 
+#include "mathlib.h"
+
 class DPlane;
 
-class DWinding  
+class DWinding
 {
 public:
-       DWinding();
-       virtual ~DWinding();
+DWinding();
+virtual ~DWinding();
 
-       void AllocWinding(int points);
+void AllocWinding( int points );
 
-       bool ChopWinding(DPlane* chopPlane);
-       bool ChopWindingInPlace(DPlane* chopPlane, vec_t ON_EPSILON);
-       void ClipWindingEpsilon(DPlane* chopPlane, vec_t epsilon, DWinding** front, DWinding** back);
+bool ChopWinding( DPlane* chopPlane );
+bool ChopWindingInPlace( DPlane* chopPlane, vec_t ON_EPSILON );
+void ClipWindingEpsilon( DPlane* chopPlane, vec_t epsilon, DWinding** front, DWinding** back );
 
-       void CheckWinding();
-       void WindingCentre(vec3_t centre);
-       void WindingBounds(vec3_t mins, vec3_t maxs);
-       void RemoveColinearPoints();
+void CheckWinding();
+void WindingCentre( vec3_t centre );
+void WindingBounds( vec3_t mins, vec3_t maxs );
+void RemoveColinearPoints();
 
-       DWinding* ReverseWinding();
-       DWinding* CopyWinding();
-       DPlane* WindingPlane();
+DWinding* ReverseWinding();
+DWinding* CopyWinding();
+DPlane* WindingPlane();
 
-       int WindingOnPlaneSide(vec3_t normal, vec_t dist);
+int WindingOnPlaneSide( vec3_t normal, vec_t dist );
 
-       vec_t WindingArea();
+vec_t WindingArea();
 
 //     members
-       int             numpoints;
-       vec3_t* p;
-  vec3_t  clr;
+int numpoints;
+vec3_t* p;
+vec3_t clr;
 };
 
-#define        MAX_POINTS_ON_WINDING   64
+const int MAX_POINTS_ON_WINDING = 64;
 
-#define        ON_EPSILON      0.01
+const double ON_EPSILON = 0.01;
 
 #endif // !defined(AFX_DWINDING_H__35B2C524_F0A7_11D4_ACF7_004095A18133__INCLUDED_)