Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ENTITY.H

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022     // entity.h
00023 
00024     void Eclass_InitForSourceDirectory (char *path);
00025     eclass_t *Eclass_ForName (char *name, qboolean has_brushes);
00026     
00027     // forward declare this one
00028     class IPluginEntity;
00029     
00030     typedef struct entity_s
00031     {
00032         struct entity_s *prev, *next;
00033         brush_t     brushes;                    // head/tail of list
00034         int         undoId, redoId, entityId;   // used for undo/redo
00035         vec3_t      origin;
00036         eclass_t    *eclass;
00037         epair_t     *epairs;
00038         eclass_t  *md3Class;
00039         IPluginEntity *pPlugEnt;
00040       vec3_t vRotation;   // valid for misc_models only
00041       vec3_t vScale;      // valid for misc_models only
00042     } entity_t;
00043     
00044     char    *ValueForKey (entity_t *ent, const char *key);
00045     void    SetKeyValue (entity_t *ent, const char *key, const char *value);
00046     void    SetKeyValue (epair_t *&e, const char *key, const char *value);
00047     void    DeleteKey (entity_t *ent, const char *key);
00048     void    DeleteKey (epair_t *&e, const char *key);
00049     float   FloatForKey (entity_t *ent, const char *key);
00050     int     IntForKey (entity_t *ent, const char *key);
00051     void    GetVectorForKey (entity_t *ent, const char *key, vec3_t vec);
00052     
00053     void        Entity_Free (entity_t *e);
00054     void        Entity_FreeEpairs(entity_t *e);
00055     int         Entity_MemorySize(entity_t *e);
00056     entity_t    *Entity_Parse (qboolean onlypairs, brush_t* pList = NULL);
00057     void        Entity_Write (entity_t *e, FILE *f, qboolean use_region);
00058     void        Entity_WriteSelected(entity_t *e, FILE *f);
00059     void        Entity_WriteSelected(entity_t *e, CMemFile*);
00060     entity_t    *Entity_Create (eclass_t *c);
00061     entity_t    *Entity_Clone (entity_t *e);
00062     void        Entity_AddToList(entity_t *e, entity_t *list);
00063     void        Entity_RemoveFromList(entity_t *e);
00064     
00065     void        Entity_LinkBrush (entity_t *e, brush_t *b);
00066     void        Entity_UnlinkBrush (brush_t *b);
00067     entity_t    *FindEntity(char *pszKey, char *pszValue);
00068     entity_t    *FindEntityInt(char *pszKey, int iValue);
00069     
00070     int GetUniqueTargetId(int iHint);
00071     qboolean Eclass_hasModel(eclass_t *e, vec3_t &vMin, vec3_t &vMax);
00072     eclass_t* GetCachedModel(entity_t *pEntity, const char *pName, vec3_t &vMin, vec3_t &vMax);
00073     
00074     //Timo : used for parsing epairs in brush primitive
00075     epair_t* ParseEpair(void);
00076     char *ValueForKey ( epair_t *&e, const char *key);

Generated on Thu Aug 25 12:38:29 2005 for Quake III Arena by  doxygen 1.3.9.1