r_entity.h File Reference

#include "r_light.h"
Include dependency graph for r_entity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  animState_s
struct  transform_t
 entity transform matrix More...
struct  entity_s

Defines

#define MAX_ANIMLIST   8

Typedefs

typedef struct animState_s animState_t
typedef struct entity_s entity_t

Functions

int R_AddEntity (const entity_t *ent)
 Adds a copy of the specified entity to the list of all known render entities.
entity_tR_GetFreeEntity (void)
 Get the next free entry in the entity list (the last one).
entity_tR_GetEntity (int id)
 Returns a specific entity from the list.
const vec3_tR_EntityGetOrigin (const entity_t *ent)
void R_EntitySetOrigin (entity_t *ent, const vec3_t ovec)
void R_EntityCopyOrigin (entity_t *ent, const entity_t *other)
void R_EntityAddToOrigin (entity_t *ent, const vec3_t offs)
void R_EntitySubtractFromOrigin (entity_t *ent, const vec3_t offs)

Detailed Description

Definition in file r_entity.h.


Define Documentation

#define MAX_ANIMLIST   8

Definition at line 28 of file r_entity.h.

Referenced by R_AnimAppend(), R_AnimChange(), R_AnimGetName(), and R_AnimRun().


Typedef Documentation

typedef struct animState_s animState_t
typedef struct entity_s entity_t

Function Documentation

int R_AddEntity ( const entity_t ent  ) 

Adds a copy of the specified entity to the list of all known render entities.

See also:
R_GetFreeEntity
Returns:
The position of the entity in the render entity array or -1 in case the entity wasn't added.

Definition at line 630 of file r_entity.c.

References Com_Error(), ERR_DROP, MAX_ENTITIES, mod_bsp, rendererData_t::numEntities, entity_t::origin, refdef, VectorDist, and rendererData_t::viewOrigin.

Referenced by CL_AddActor(), CL_AddArrow(), CL_AddPathingBox(), CL_AddTargetingBox(), CL_AddUGV(), LE_AddToScene(), LM_AddToSceneOrder(), and SEQ_Render3D().

void R_EntityAddToOrigin ( entity_t ent,
const vec3_t  offs 
)

Definition at line 40 of file r_entity.c.

References entity_t::origin, and VectorAdd.

Referenced by LE_AddToScene().

void R_EntityCopyOrigin ( entity_t ent,
const entity_t other 
)

Definition at line 39 of file r_entity.c.

References entity_t::origin, and VectorCopy.

const vec3_t* R_EntityGetOrigin ( const entity_t ent  ) 

Definition at line 37 of file r_entity.c.

References entity_t::origin.

Referenced by LE_BrushModelAction(), R_CullBspModel(), and R_DrawBrushModel().

void R_EntitySetOrigin ( entity_t ent,
const vec3_t  ovec 
)

Definition at line 38 of file r_entity.c.

References entity_t::origin, and VectorCopy.

Referenced by CL_AddEdictFunc(), LE_AddToScene(), LM_AddToSceneOrder(), and SEQ_Render3D().

void R_EntitySubtractFromOrigin ( entity_t ent,
const vec3_t  offs 
)

Definition at line 41 of file r_entity.c.

References entity_t::origin, and VectorSubtract.

entity_t* R_GetEntity ( int  id  ) 

Returns a specific entity from the list.

Definition at line 618 of file r_entity.c.

References rendererData_t::numEntities, and refdef.

Referenced by LM_AddToSceneOrder(), and R_Trace().

entity_t* R_GetFreeEntity ( void   ) 

Get the next free entry in the entity list (the last one).

Note:
This can't overflow, because R_AddEntity checks the bounds
See also:
R_AddEntity

Definition at line 608 of file r_entity.c.

References Com_Error(), ERR_DROP, MAX_ENTITIES, rendererData_t::numEntities, and refdef.

Referenced by CL_AddActor(), CL_AddUGV(), and SEQ_Render3D().


Generated by  doxygen 1.6.2