doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions | Variables
EditorEntity.cpp File Reference
#include "../../idlib/precompiled.h"
#include "qe3.h"
#include "../../renderer/tr_local.h"
#include "../../renderer/model_local.h"

Go to the source code of this file.

Classes

struct  EpairFixup
 

Macros

#define CURVE_TAG   "curve_"
 

Functions

void Brush_Resize (brush_t *b, idVec3 vMin, idVec3 vMax)
 
int GetNumKeys (entity_t *ent)
 
const char * GetKeyString (entity_t *ent, int iIndex)
 
const char * ValueForKey (entity_t *ent, const char *key)
 
void TrackMD3Angles (entity_t *e, const char *key, const char *value)
 
void SetKeyValue (entity_t *ent, const char *key, const char *value, bool trackAngles)
 
void SetKeyVec3 (entity_t *ent, const char *key, idVec3 v)
 
void SetKeyMat3 (entity_t *ent, const char *key, idMat3 m)
 
void DeleteKey (entity_t *ent, const char *key)
 
float FloatForKey (entity_t *ent, const char *key)
 
int IntForKey (entity_t *ent, const char *key)
 
bool GetVectorForKey (entity_t *ent, const char *key, idVec3 &vec)
 
bool GetVector4ForKey (entity_t *ent, const char *key, idVec4 &vec)
 
bool GetFloatForKey (entity_t *ent, const char *key, float *f)
 
bool GetMatrixForKey (entity_t *ent, const char *key, idMat3 &mat)
 
void Entity_FreeEpairs (entity_t *e)
 
void Entity_AddToList (entity_t *e, entity_t *list)
 
void Entity_RemoveFromList (entity_t *e)
 
void Entity_Free (entity_t *e)
 
int Entity_MemorySize (entity_t *e)
 
void FixFloats (idDict *dict)
 
void ParseEpair (idDict *dict)
 
bool EntityHasModel (entity_t *ent)
 
entity_tEntity_New ()
 
void Entity_UpdateCurveData (entity_t *ent)
 
idCurve< idVec3 > * Entity_MakeCurve (entity_t *ent)
 
void Entity_SetCurveData (entity_t *ent)
 
entity_tEntity_PostParse (entity_t *ent, brush_t *pList)
 
entity_tEntity_Parse (bool onlypairs, brush_t *pList)
 
void VectorMidpoint (idVec3 va, idVec3 vb, idVec3 &out)
 
void Entity_Write (entity_t *e, FILE *f, bool use_region)
 
bool IsBrushSelected (brush_t *bSel)
 
void Entity_WriteSelected (entity_t *e, FILE *f)
 
void Entity_WriteSelected (entity_t *e, CMemFile *pMemFile)
 
void Entity_SetName (entity_t *e, const char *name)
 
bool Entity_NameIsUnique (const char *name)
 
void Entity_Name (entity_t *e, bool force)
 
entity_tEntity_Create (eclass_t *c, bool forceFixed)
 
void Brush_MakeDirty (brush_t *b)
 
void Entity_LinkBrush (entity_t *e, brush_t *b)
 
void Entity_UnlinkBrush (brush_t *b)
 
entity_tEntity_Clone (entity_t *e)
 
int GetUniqueTargetId (int iHint)
 
entity_tFindEntity (const char *pszKey, const char *pszValue)
 
entity_tFindEntityInt (const char *pszKey, int iValue)
 
void Entity_UpdateSoundEmitter (entity_t *ent)
 

Variables

int g_entityId = 1
 
const EpairFixup FloatFixups []
 
const int FixupCount = sizeof(FloatFixups) / sizeof(EpairFixup)
 

Macro Definition Documentation

#define CURVE_TAG   "curve_"

Definition at line 37 of file EditorEntity.cpp.

Function Documentation

void Brush_MakeDirty ( brush_t *  b)

Definition at line 1226 of file EditorEntity.cpp.

void Brush_Resize ( brush_t *  b,
idVec3  vMin,
idVec3  vMax 
)

Definition at line 3432 of file EditorBrush.cpp.

void DeleteKey ( entity_t ent,
const char *  key 
)

Definition at line 175 of file EditorEntity.cpp.

void Entity_AddToList ( entity_t e,
entity_t list 
)

Definition at line 305 of file EditorEntity.cpp.

entity_t* Entity_Clone ( entity_t e)

Definition at line 1273 of file EditorEntity.cpp.

entity_t* Entity_Create ( eclass_t *  c,
bool  forceFixed 
)

Definition at line 1129 of file EditorEntity.cpp.

void Entity_Free ( entity_t e)

Definition at line 336 of file EditorEntity.cpp.

void Entity_FreeEpairs ( entity_t e)

Definition at line 296 of file EditorEntity.cpp.

void Entity_LinkBrush ( entity_t e,
brush_t *  b 
)

Definition at line 1236 of file EditorEntity.cpp.

idCurve<idVec3>* Entity_MakeCurve ( entity_t ent)

Definition at line 516 of file EditorEntity.cpp.

int Entity_MemorySize ( entity_t e)

Definition at line 358 of file EditorEntity.cpp.

void Entity_Name ( entity_t e,
bool  force 
)

Definition at line 1083 of file EditorEntity.cpp.

bool Entity_NameIsUnique ( const char *  name)

Definition at line 194 of file EditorMap.cpp.

entity_t* Entity_New ( )

Definition at line 459 of file EditorEntity.cpp.

entity_t* Entity_Parse ( bool  onlypairs,
brush_t *  pList 
)

Definition at line 797 of file EditorEntity.cpp.

entity_t* Entity_PostParse ( entity_t ent,
brush_t *  pList 
)

Definition at line 555 of file EditorEntity.cpp.

void Entity_RemoveFromList ( entity_t e)

Definition at line 321 of file EditorEntity.cpp.

void Entity_SetCurveData ( entity_t ent)

Definition at line 529 of file EditorEntity.cpp.

void Entity_SetName ( entity_t e,
const char *  name 
)

Definition at line 1068 of file EditorEntity.cpp.

void Entity_UnlinkBrush ( brush_t *  b)

Definition at line 1256 of file EditorEntity.cpp.

void Entity_UpdateCurveData ( entity_t ent)

Definition at line 483 of file EditorEntity.cpp.

void Entity_UpdateSoundEmitter ( entity_t ent)

Definition at line 1369 of file EditorEntity.cpp.

void Entity_Write ( entity_t e,
FILE *  f,
bool  use_region 
)

Definition at line 866 of file EditorEntity.cpp.

void Entity_WriteSelected ( entity_t e,
FILE *  f 
)

Definition at line 961 of file EditorEntity.cpp.

void Entity_WriteSelected ( entity_t e,
CMemFile *  pMemFile 
)

Definition at line 1015 of file EditorEntity.cpp.

bool EntityHasModel ( entity_t ent)

Definition at line 441 of file EditorEntity.cpp.

entity_t* FindEntity ( const char *  pszKey,
const char *  pszValue 
)

Definition at line 1327 of file EditorEntity.cpp.

entity_t* FindEntityInt ( const char *  pszKey,
int  iValue 
)

Definition at line 1345 of file EditorEntity.cpp.

void FixFloats ( idDict dict)

Definition at line 401 of file EditorEntity.cpp.

float FloatForKey ( entity_t ent,
const char *  key 
)

Definition at line 186 of file EditorEntity.cpp.

bool GetFloatForKey ( entity_t ent,
const char *  key,
float f 
)

Definition at line 248 of file EditorEntity.cpp.

const char* GetKeyString ( entity_t ent,
int  iIndex 
)

Definition at line 53 of file EditorEntity.cpp.

bool GetMatrixForKey ( entity_t ent,
const char *  key,
idMat3 mat 
)

Definition at line 264 of file EditorEntity.cpp.

int GetNumKeys ( entity_t ent)

Definition at line 41 of file EditorEntity.cpp.

int GetUniqueTargetId ( int  iHint)

Definition at line 1294 of file EditorEntity.cpp.

bool GetVector4ForKey ( entity_t ent,
const char *  key,
idVec4 vec 
)

Definition at line 230 of file EditorEntity.cpp.

bool GetVectorForKey ( entity_t ent,
const char *  key,
idVec3 vec 
)

Definition at line 212 of file EditorEntity.cpp.

int IntForKey ( entity_t ent,
const char *  key 
)

Definition at line 201 of file EditorEntity.cpp.

bool IsBrushSelected ( brush_t *  bSel)

Definition at line 946 of file EditorEntity.cpp.

void ParseEpair ( idDict dict)

Definition at line 427 of file EditorEntity.cpp.

void SetKeyMat3 ( entity_t ent,
const char *  key,
idMat3  m 
)

Definition at line 152 of file EditorEntity.cpp.

void SetKeyValue ( entity_t ent,
const char *  key,
const char *  value,
bool  trackAngles 
)

Definition at line 109 of file EditorEntity.cpp.

void SetKeyVec3 ( entity_t ent,
const char *  key,
idVec3  v 
)

Definition at line 133 of file EditorEntity.cpp.

void TrackMD3Angles ( entity_t e,
const char *  key,
const char *  value 
)

Definition at line 86 of file EditorEntity.cpp.

const char* ValueForKey ( entity_t ent,
const char *  key 
)

Definition at line 78 of file EditorEntity.cpp.

void VectorMidpoint ( idVec3  va,
idVec3  vb,
idVec3 out 
)

Definition at line 855 of file EditorEntity.cpp.

Variable Documentation

const int FixupCount = sizeof(FloatFixups) / sizeof(EpairFixup)

Definition at line 399 of file EditorEntity.cpp.

const EpairFixup FloatFixups[]
Initial value:
= {
{ "origin", 1 },
{ "rotation", 2 },
{ "_color", 1 },
{ "falloff", 0 },
{ "light", 0 },
{ "light_target", 1 },
{ "light_up", 1 },
{ "light_right", 1 },
{ "light_start", 1 },
{ "light_center", 1 },
{ "light_end", 1 },
{ "light_radius", 1 },
{ "light_origin", 1 }
}

Definition at line 383 of file EditorEntity.cpp.

int g_entityId = 1

Definition at line 35 of file EditorEntity.cpp.