X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=contrib%2Fbobtoolz%2FDShape.h;h=31c66e13034dbe2292fa2451bbdd4a37d929914c;hb=c995981050b4de4cc70a9d02495964d667c7e7a3;hp=9564943d0d01caa5e910a4be4213836c8d2c1bb5;hpb=80378101101ca1762bbf5638a9e3566893096d8a;p=xonotic%2Fnetradiant.git diff --git a/contrib/bobtoolz/DShape.h b/contrib/bobtoolz/DShape.h index 9564943d..31c66e13 100644 --- a/contrib/bobtoolz/DShape.h +++ b/contrib/bobtoolz/DShape.h @@ -1,60 +1,63 @@ -/* -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 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 -*/ - -// DShape.h: interface for the DShape class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_) -#define AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_ - -#include "DMap.h" // Added by ClassView -#include "StdAfx.h" // Added by ClassView - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -// defines for polygon stuff -#define MAX_POLYGON_FACES 128 - -extern bool bFacesAll[]; - -class DShape -{ -public: - bool BuildPit(vec3_t min, vec3_t max); - void BuildBorderedPrism(vec3_t min, vec3_t max, int nSides, int nBorder, bool bAlignTop); - void BuildInversePrism(vec3_t min, vec3_t max, int nSides, bool bAlignTop); - void BuildRegularPrism(vec3_t min, vec3_t max, int nSides, bool bAlignTop); - - int m_nNextBrush; - static DBrush* GetBoundingCube_Ext(vec3_t min, vec3_t max, const char* textureName, bool* bUseFaces = bFacesAll, bool detail = false); - - DShape(); - virtual ~DShape(); - - void Commit(); -private: - DBrush* GetBoundingCube(vec3_t min, vec3_t max, const char* textureName, DEntity* ent = NULL, bool* bUseFaces = bFacesAll); - - DMap m_Container; -}; - -#endif // !defined(AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_) +/* + 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 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 + */ + +// DShape.h: interface for the DShape class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined( AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_ ) +#define AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include +#include "mathlib.h" +#include "DMap.h" +class DBrush; +class DEntity; + +// defines for polygon stuff +const int MAX_POLYGON_FACES = 128; + +extern bool bFacesAll[]; + +class DShape +{ +public: +bool BuildPit( vec3_t min, vec3_t max ); +void BuildBorderedPrism( vec3_t min, vec3_t max, int nSides, int nBorder, bool bAlignTop ); +void BuildInversePrism( vec3_t min, vec3_t max, int nSides, bool bAlignTop ); +void BuildRegularPrism( vec3_t min, vec3_t max, int nSides, bool bAlignTop ); + +int m_nNextBrush; +static DBrush* GetBoundingCube_Ext( vec3_t min, vec3_t max, const char* textureName, bool* bUseFaces = bFacesAll, bool detail = false ); + +DShape(); +virtual ~DShape(); + +void Commit(); +private: +DBrush* GetBoundingCube( vec3_t min, vec3_t max, const char* textureName, DEntity* ent = NULL, bool* bUseFaces = bFacesAll ); + +DMap m_Container; +}; + +#endif // !defined(AFX_DSHAPE_H__0B30B302_9D21_4C2D_836A_61F3C8D4244D__INCLUDED_)