2 BobToolz plugin for GtkRadiant
3 Copyright (C) 2001 Gordon Biggans
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // DEntity.h: interface for the DEntity class.
22 //////////////////////////////////////////////////////////////////////
24 #if !defined( AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_ )
25 #define AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_
29 #endif // _MSC_VER > 1000
50 void RemoveFromRadiant();
51 scene::Node* QER_Entity;
54 // Constrcution/Destruction
55 DEntity( const char* classname = "worldspawn", int ID = -1 ); // sets classname
57 // ---------------------------------------------
59 // epair functions........
60 void LoadEPairList( Entity* epl );
61 void AddEPair( const char* key, const char* value );
63 DEPair* FindEPairByKey( const char* keyname );
64 // ---------------------------------------------
66 // random functions........
67 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 rebuild );
68 void SaveToFile( FILE* pFile );
69 void SetClassname( const char* classname );
72 void BuildInRadiant( bool allowDestruction );
73 void ResetChecks( std::list<Str>* exclusionList );
74 void RemoveNonCheckBrushes( std::list<Str>* exclusionList, bool useDetail );
76 DPlane* AddFaceToBrush( vec3_t va, vec3_t vb, vec3_t vc, _QERFaceData* faceData, int ID ); // slow, try not to use much
77 int GetBrushCount( void );
78 DBrush* FindBrushByPointer( scene::Node& brush );
79 // ---------------------------------------------
82 // bool list functions
83 void SelectBrushes( bool* selectList );
84 bool* BuildDuplicateList();
85 bool* BuildIntersectList();
86 // ---------------------------------------------
90 void ClearBrushes(); // clears brush list and frees memory for brushes
92 DBrush* GetBrushForID( int ID );
93 DBrush* NewBrush( int ID = -1 );
94 // ---------------------------------------------
100 // ---------------------------------------------
103 std::list<DEPair*> epairList;
104 std::list<DBrush*> brushList;
105 // new patches, wahey!!!
106 std::list<DPatch*> patchList;
108 // ---------------------------------------------
113 bool LoadFromEntity( scene::Node& ent, bool bLoadPatches = false );
114 void LoadSelectedBrushes();
115 void LoadSelectedPatches();
117 bool LoadFromPrt( char* filename );
118 // ---------------------------------------------
119 void SpawnString( const char* key, const char* defaultstring, const char** out );
120 void SpawnInt( const char* key, const char* defaultstring, int* out );
121 void SpawnFloat( const char* key, const char* defaultstring, float* out );
122 void SpawnVector( const char* key, const char* defaultstring, vec_t* out );
125 #endif // !defined(AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_)