]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/DBrush.h
Revert partially (auto) "reformat code! now the code is only ugly on the *inside*"
[xonotic/netradiant.git] / contrib / bobtoolz / DBrush.h
index d88bee252cd958a3761d7abcff40ef33705d2720..7b3e8d6035ca47b69e0f1eb1b5b36452e4cf2989 100644 (file)
 #include "str.h"
 
 class DPlane;
-
 class DWinding;
-
 class DPoint;
-
 class _QERFaceData;
 
-namespace scene {
-    class Node;
-
-    class Instance;
+namespace scene
+{
+class Node;
+class Instance;
 }
 
-const int POINT_IN_BRUSH = 0;
-const int POINT_ON_BRUSH = 1;
+const int POINT_IN_BRUSH  = 0;
+const int POINT_ON_BRUSH  = 1;
 const int POINT_OUT_BRUSH = 2;
 
-class DBrush {
+class DBrush
+{
 public:
-    DPlane *AddFace(const vec3_t va, const vec3_t vb, const vec3_t vc, const char *textureName, bool bDetail);
-
-    void SaveToFile(FILE *pFile);
-
-    void Rotate(vec3_t vOrigin, vec3_t vRotation);
-
-    void RotateAboutCentre(vec3_t vRotation);
-
-    DPlane *HasPlaneInverted(DPlane *chkPlane);
-
-    DPlane *HasPlane(DPlane *chkPlane);
-
-    DPlane *AddFace(const vec3_t va, const vec3_t vb, const vec3_t vc, const _QERFaceData *texData);
-
-    bool
-    ResetTextures(const char *textureName, float fScale[2], float fShift[2], int rotation, const char *newTextureName,
-                  int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation);
-
-    bool IsDetail();
-
-    bool HasTexture(const char *textureName);
-
-    bool IntersectsWith(DBrush *chkBrush);
-
-    bool IntersectsWith(DPlane *p1, DPlane *p2, vec3_t v);
-
-    bool IsCutByPlane(DPlane *cuttingPlane);
-
-    bool GetBounds(vec3_t min, vec3_t max);
-
-    bool HasPoint(vec3_t pnt);
-
-    bool BBoxCollision(DBrush *chkBrush);
-
-    bool BBoxTouch(DBrush *chkBrush);
-
-    int BuildPoints();
-
-    void BuildBounds();
-
-    void BuildFromWinding(DWinding *w);
-
-    scene::Node *BuildInRadiant(bool allowDestruction, int *changeCnt, scene::Node *entity = NULL);
-
-    void ResetChecks(std::list<Str> *exclusionList);
-
-    void ClearFaces();
+DPlane* AddFace( const vec3_t va, const vec3_t vb, const vec3_t vc, const char* textureName, bool bDetail );
+void SaveToFile( FILE* pFile );
 
-    void ClearPoints();
+void Rotate( vec3_t vOrigin, vec3_t vRotation );
+void RotateAboutCentre( vec3_t vRotation );
 
-    int RemoveRedundantPlanes(void);
+DPlane* HasPlaneInverted( DPlane* chkPlane );
+DPlane* HasPlane( DPlane* chkPlane );
+DPlane* AddFace( const vec3_t va, const vec3_t vb, const vec3_t vc, const _QERFaceData* texData );
 
-    void RemovePlane(DPlane *plane);
+bool ResetTextures( const char* textureName, float fScale[2], float fShift[2], int rotation, const char* newTextureName, int bResetTextureName, int bResetScale[2], int bResetShift[2], int bResetRotation );
+bool IsDetail();
+bool HasTexture( const char* textureName );
+bool IntersectsWith( DBrush *chkBrush );
+bool IntersectsWith( DPlane* p1, DPlane* p2, vec3_t v );
+bool IsCutByPlane( DPlane* cuttingPlane );
+bool GetBounds( vec3_t min, vec3_t max );
+bool HasPoint( vec3_t pnt );
+bool BBoxCollision( DBrush* chkBrush );
+bool BBoxTouch( DBrush* chkBrush );
 
-    int PointPosition(vec3_t pnt);
+int BuildPoints();
+void BuildBounds();
+void BuildFromWinding( DWinding* w );
+scene::Node* BuildInRadiant( bool allowDestruction, int* changeCnt, scene::Node* entity = NULL );
 
+void ResetChecks( std::list<Str>* exclusionList );
 
-    void CutByPlane(DPlane *cutPlane, DBrush **newBrush1, DBrush **newBrush2);
+void ClearFaces();
+void ClearPoints();
 
-    void LoadFromBrush(scene::Instance &brush, bool textured);
+int RemoveRedundantPlanes( void );
+void RemovePlane( DPlane* plane );
+int PointPosition( vec3_t pnt );
 
-    void AddPoint(vec3_t pnt);
 
-    DPlane *FindPlaneWithClosestNormal(vec_t *normal);
+void CutByPlane( DPlane* cutPlane, DBrush** newBrush1, DBrush** newBrush2 );
 
-    int FindPointsForPlane(DPlane *plane, DPoint **pnts, int maxpnts);
+void LoadFromBrush( scene::Instance& brush, bool textured );
+void AddPoint( vec3_t pnt );
 
-    DBrush(int ID = -1);
+DPlane* FindPlaneWithClosestNormal( vec_t* normal );
+int FindPointsForPlane( DPlane* plane, DPoint** pnts, int maxpnts );
 
-    virtual ~DBrush();
+DBrush( int ID = -1 );
+virtual ~DBrush();
 
-    bool operator==(DBrush *other);
+bool operator==( DBrush* other );
 
 //     members
-    scene::Node *QER_entity;
-    scene::Node *QER_brush;
-    std::list<DPlane *> faceList;
-    std::list<DPoint *> pointList;
-    int m_nBrushID;
-    vec3_t bbox_min, bbox_max;
-    bool bBoundsBuilt;
+scene::Node* QER_entity;
+scene::Node* QER_brush;
+std::list<DPlane*> faceList;
+std::list<DPoint*> pointList;
+int m_nBrushID;
+vec3_t bbox_min, bbox_max;
+bool bBoundsBuilt;
 };
 
 //typedef CList<DBrush*, DBrush*> DBrushList;