| 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_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_ ) |
| 25 |
#define AFX_DENTITY_H__35B2C523_F0A7_11D4_ACF7_004095A18133__INCLUDED_ |
| 26 |
|
| 27 |
#if _MSC_VER > 1000 |
| 28 |
#pragma once |
| 29 |
#endif |
| 30 |
|
| 31 |
#include <list> |
| 32 |
#include "str.h" |
| 33 |
#include "mathlib.h" |
| 34 |
|
| 35 |
class DEPair; |
| 36 |
class DBrush; |
| 37 |
class DPlane; |
| 38 |
class DPatch; |
| 39 |
class Entity; |
| 40 |
|
| 41 |
namespace scene |
| 42 |
{ |
| 43 |
class Node; |
| 44 |
} |
| 45 |
class _QERFaceData; |
| 46 |
|
| 47 |
class DEntity |
| 48 |
{ |
| 49 |
public: |
| 50 |
void RemoveFromRadiant(); |
| 51 |
scene::Node* QER_Entity; |
| 52 |
int m_nID; |
| 53 |
|
| 54 |
|
| 55 |
DEntity( const char* classname = "worldspawn", int ID = -1 ); |
| 56 |
virtual ~DEntity(); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
void LoadEPairList( Entity* epl ); |
| 61 |
void AddEPair( const char* key, const char* value ); |
| 62 |
void ClearEPairs(); |
| 63 |
DEPair* FindEPairByKey( const char* keyname ); |
| 64 |
|
| 65 |
|
| 66 |
|
| 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 ); |
| 70 |
int GetIDMax(); |
| 71 |
|
| 72 |
void BuildInRadiant( bool allowDestruction ); |
| 73 |
void ResetChecks( std::list<Str>* exclusionList ); |
| 74 |
void RemoveNonCheckBrushes( std::list<Str>* exclusionList, bool useDetail ); |
| 75 |
|
| 76 |
DPlane* AddFaceToBrush( vec3_t va, vec3_t vb, vec3_t vc, _QERFaceData* faceData, int ID ); |
| 77 |
int GetBrushCount( void ); |
| 78 |
DBrush* FindBrushByPointer( scene::Node& brush ); |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
void SelectBrushes( bool* selectList ); |
| 84 |
bool* BuildDuplicateList(); |
| 85 |
bool* BuildIntersectList(); |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
void ClearBrushes(); |
| 91 |
|
| 92 |
DBrush* GetBrushForID( int ID ); |
| 93 |
DBrush* NewBrush( int ID = -1 ); |
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
void ClearPatches(); |
| 98 |
|
| 99 |
DPatch* NewPatch(); |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
std::list<DEPair*> epairList; |
| 104 |
std::list<DBrush*> brushList; |
| 105 |
|
| 106 |
std::list<DPatch*> patchList; |
| 107 |
Str m_Classname; |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
int FixBrushes(); |
| 112 |
|
| 113 |
bool LoadFromEntity( scene::Node& ent, bool bLoadPatches = false ); |
| 114 |
void LoadSelectedBrushes(); |
| 115 |
void LoadSelectedPatches(); |
| 116 |
|
| 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 ); |
| 123 |
}; |
| 124 |
|
| 125 |
#endif |