UFO: Alien Invasion
|
#include "r_local.h"
#include "r_matrix.h"
#include "r_entity.h"
#include "r_mesh.h"
#include "r_mesh_anim.h"
#include "r_draw.h"
Go to the source code of this file.
Macros | |
#define | MAX_ENTITIES 2048*2 |
Functions | |
void | R_EntitySetOrigin (entity_t *ent, const vec3_t origin) |
setter for entity origin More... | |
void | R_EntityAddToOrigin (entity_t *ent, const vec3_t offset) |
Translates the origin of the given entity by the given offset vector. More... | |
static void | R_DrawBox (const entity_t *e) |
Draws the field marker entity is specified in CL_AddTargeting. More... | |
static void | R_DrawFloor (const entity_t *e) |
Draws a marker on the ground to indicate pathing CL_AddPathingBox. More... | |
static void | R_DrawArrow (const entity_t *e) |
Draws an arrow between two points. More... | |
void | R_DrawEntityEffects (void) |
Draws shadow and highlight effects for the entities (actors) More... | |
void | R_DrawMeshEntities (entity_t *ents) |
Draws the list of entities. More... | |
void | R_DrawOpaqueMeshEntities (entity_t *ents) |
static entity_t * | R_MergeSortMerge (entity_t *a, entity_t *b) |
static entity_t * | R_MergeSortEntList (entity_t *c) |
Merge sort for the entity list. More... | |
void | R_DrawBlendMeshEntities (entity_t *ents) |
static void | R_DrawNullModel (const entity_t *e) |
Draw replacement model (e.g. when model wasn't found) More... | |
void | R_DrawSpecialEntities (const entity_t *ents) |
void | R_DrawNullEntities (const entity_t *ents) |
Draw entities which models couldn't be loaded. More... | |
void | R_TransformForEntity (const entity_t *e, const vec3_t in, vec3_t out) |
static float * | R_CalcTransform (entity_t *e) |
Calculates transformation matrix for the model and its tags. More... | |
static bool | R_CullEntity (entity_t *e) |
Perform a frustum cull check for a given entity. More... | |
void | R_GetEntityLists (void) |
Primary entry point for drawing all entities. More... | |
entity_t * | R_GetFreeEntity (void) |
Get the next free entry in the entity list (the last one) More... | |
entity_t * | R_GetEntity (int id) |
Returns a specific entity from the list. More... | |
int | R_AddEntity (const entity_t *ent) |
Adds a copy of the specified entity to the list of all known render entities. More... | |
Variables | |
static entity_t | r_entities [MAX_ENTITIES] |
entity_t * | r_opaque_mesh_entities |
entity_t * | r_blend_mesh_entities |
entity_t * | r_null_entities |
entity_t * | r_special_entities |
static image_t * | selectedActorIndicator |
static image_t * | actorIndicator |
#define MAX_ENTITIES 2048*2 |
Definition at line 33 of file r_entity.cpp.
Referenced by R_AddEntity(), and R_GetFreeEntity().
Adds a copy of the specified entity to the list of all known render entities.
-1
in case the entity wasn't added. Definition at line 706 of file r_entity.cpp.
References Com_Error(), ERR_DROP, MAX_ENTITIES, mod_bsp, rendererData_t::numEntities, and refdef.
Referenced by CL_AddActor(), CL_AddArrow(), CL_AddPathingBox(), CL_AddTargetingBox(), CL_AddUGV(), LE_AddEdictHighlight(), LE_AddToScene(), LE_BrushModelAction(), LM_AddToSceneOrder(), and SEQ_Render3D().
|
static |
Calculates transformation matrix for the model and its tags.
Definition at line 537 of file r_entity.cpp.
References model_s::alias, animState_s::backlerp, Com_Error(), transform_t::done, ERR_DROP, animState_s::frame, GLMatrixAssemble(), GLMatrixMultiply(), transform_t::matrix, mAliasModel_s::num_frames, animState_s::oldframe, entity_t::origin, transform_t::processing, R_GetTags(), R_InterpolateTransform(), refdef, VectorDist, and rendererData_t::viewOrigin.
Referenced by R_GetEntityLists().
|
static |
Perform a frustum cull check for a given entity.
[in,out] | e | The entity to perform the frustum cull check for |
false
if visible, true
is the origin of the entity is outside the current frustum view Definition at line 604 of file r_entity.cpp.
References cvar_s::integer, mod_bsp_submodel, R_CullBspModel(), R_CullMeshModel(), r_nocull, RDF_NOWORLDMODEL, refdef, and rendererData_t::rendererFlags.
Referenced by R_GetEntityLists().
Draws an arrow between two points.
Definition at line 175 of file r_entity.cpp.
References rendererData_t::batchCount, entity_t::origin, R_BindArray(), R_BindDefaultArray(), R_Color(), and refdef.
Referenced by R_DrawSpecialEntities().
Definition at line 411 of file r_entity.cpp.
References rstate_s::model_program, R_DrawMeshEntities(), R_EnableBlend(), R_EnableGlowMap(), R_EnableLighting(), R_MergeSortEntList(), r_state, RDF_NOWORLDMODEL, refdef, and rendererData_t::rendererFlags.
Referenced by R_RenderFrame().
Draws the field marker entity is specified in CL_AddTargeting.
Definition at line 67 of file r_entity.cpp.
References rendererData_t::batchCount, f, entity_t::origin, R_BindArray(), R_BindDefaultArray(), R_BindTexture, R_Color(), R_DrawBoundingBox(), R_DrawTexturedBox(), refdef, and VectorNotEmpty.
Referenced by R_DrawSpecialEntities().
Draws shadow and highlight effects for the entities (actors)
Definition at line 208 of file r_entity.cpp.
References rendererData_t::batchCount, i, cvar_s::integer, it_effect, rendererData_t::numEntities, R_BindArray(), R_BindDefaultArray(), R_BindTexture, R_Color(), R_EnableBlend(), R_EnableDrawAsGlow(), R_FindImage(), r_stencilshadows, refdef, RF_ACTOR, RF_ALLIED, RF_BLOOD, RF_BOX, RF_MEMBER, RF_NEUTRAL, RF_OPPONENT, RF_SELECTED, RF_SHADOW, SELECTION_DELTA, shadow, image_s::texnum, and Vector4Set.
Referenced by R_RenderFrame().
Draws a marker on the ground to indicate pathing CL_AddPathingBox.
Definition at line 131 of file r_entity.cpp.
References rendererData_t::batchCount, f, it_pic, entity_t::origin, PLAYER_WIDTH, R_BindArray(), R_BindDefaultArray(), R_BindTexture, R_Color(), R_FindImage(), refdef, and image_s::texnum.
Referenced by R_DrawSpecialEntities().
Draws the list of entities.
[in,out] | ents | The list of entities that are going to get rendered |
Definition at line 316 of file r_entity.cpp.
References mod_alias_md2, mod_alias_md3, mod_obj, and R_DrawAliasModel().
Referenced by R_DrawBlendMeshEntities(), and R_DrawOpaqueMeshEntities().
Draw entities which models couldn't be loaded.
Definition at line 503 of file r_entity.cpp.
References R_DrawNullModel().
Referenced by R_RenderFrame().
Draw replacement model (e.g. when model wasn't found)
Definition at line 434 of file r_entity.cpp.
References rendererData_t::batchCount, i, M_PI, R_BindArray(), R_BindDefaultArray(), R_EnableTexture(), refdef, texunit_diffuse, and VectorSet.
Referenced by R_DrawNullEntities().
Definition at line 339 of file r_entity.cpp.
References rstate_s::model_program, R_DrawMeshEntities(), R_EnableGlowMap(), R_EnableLighting(), r_state, RDF_NOWORLDMODEL, refdef, and rendererData_t::rendererFlags.
Referenced by R_RenderFrame().
Definition at line 473 of file r_entity.cpp.
References R_DrawArrow(), R_DrawBox(), R_DrawFloor(), R_EnableBlend(), R_EnableDrawAsGlow(), RF_ARROW, RF_BOX, and RF_PATH.
Referenced by R_RenderFrame().
Translates the origin of the given entity by the given offset vector.
[in,out] | ent | The entity to translate |
[in] | offset | The translation vector |
Definition at line 57 of file r_entity.cpp.
References entity_t::origin, and VectorAdd.
setter for entity origin
[out] | ent | The entity to set the origin for |
[in] | origin | The new origin for the given entity |
Definition at line 47 of file r_entity.cpp.
References entity_t::origin, and VectorCopy.
Referenced by CL_AddEdictFunc(), LE_AddToScene(), LM_AddToSceneOrder(), and SEQ_Render3D().
Returns a specific entity from the list.
Definition at line 694 of file r_entity.cpp.
References rendererData_t::numEntities, and refdef.
Referenced by LM_AddToSceneOrder(), and R_Trace().
Primary entry point for drawing all entities.
Definition at line 625 of file r_entity.cpp.
References Com_Error(), ERR_DROP, image_s::has_alpha, i, cvar_s::integer, mod_alias_md2, mod_alias_md3, mod_bsp_submodel, mod_obj, rendererData_t::numEntities, entity_t::origin, R_AddBspRRef(), R_AliasModelState(), r_blend_mesh_entities, R_CalcTransform(), R_CullEntity(), r_drawentities, r_null_entities, r_opaque_mesh_entities, r_special_entities, refdef, RF_ARROW, RF_BOX, RF_PATH, RF_TRANSLUCENT, and image_s::texnum.
Referenced by R_RenderFrame().
Get the next free entry in the entity list (the last one)
Definition at line 684 of file r_entity.cpp.
References Com_Error(), ERR_DROP, MAX_ENTITIES, rendererData_t::numEntities, and refdef.
Referenced by CL_AddActor(), CL_AddUGV(), and SEQ_Render3D().
Merge sort for the entity list.
Definition at line 386 of file r_entity.cpp.
References R_MergeSortMerge().
Referenced by R_DrawBlendMeshEntities().
Merge sort merge helper function.
Definition at line 357 of file r_entity.cpp.
Referenced by R_MergeSortEntList().
Transforms a point by the inverse of the world-model matrix for the specified entity.
Definition at line 522 of file r_entity.cpp.
References Matrix4x4_CreateFromQuakeEntity(), Matrix4x4_Invert_Simple(), Matrix4x4_Transform(), and entity_t::origin.
Referenced by R_RotateForMeshShadow().
|
static |
Definition at line 202 of file r_entity.cpp.
entity_t* r_blend_mesh_entities |
Definition at line 38 of file r_entity.cpp.
Referenced by R_GetEntityLists(), and R_RenderFrame().
|
static |
Definition at line 35 of file r_entity.cpp.
entity_t* r_null_entities |
Definition at line 39 of file r_entity.cpp.
Referenced by R_GetEntityLists(), and R_RenderFrame().
entity_t* r_opaque_mesh_entities |
Definition at line 37 of file r_entity.cpp.
Referenced by R_GetEntityLists(), and R_RenderFrame().
entity_t* r_special_entities |
Definition at line 40 of file r_entity.cpp.
Referenced by R_GetEntityLists(), and R_RenderFrame().
|
static |
Definition at line 201 of file r_entity.cpp.