los.cc File Reference

#include "AppHdr.h"
#include "los.h"
#include <cmath>
#include <algorithm>
#include "areas.h"
#include "bitary.h"
#include "coord.h"
#include "coord-circle.h"
#include "coordit.h"
#include "debug.h"
#include "externs.h"
#include "geom2d.h"
#include "losglobal.h"
#include "losparam.h"
#include "player.h"
#include "ray.h"
#include "stuff.h"
#include "env.h"
#include "terrain.h"

Include dependency graph for los.cc:


Classes

class  quadrant_iterator
struct  los_ray
struct  cellray
struct  opacity_trans
struct  los_param_funcs

Defines

#define LOS_MAX_ANGLE   (2*LOS_MAX_RANGE-2)
#define LOS_INTERCEPT_MULT   (2)

Typedefs

typedef FixedArray< bit_array
*, LOS_MAX_RANGE+1,
LOS_MAX_RANGE+1 > 
blockrays_t

Enumerations

enum  compare_type { C_SUBRAY, C_SUPERRAY, C_NEITHER }

Functions

void clear_rays_on_exit ()
void set_los_radius (int r)
int get_los_radius_sq ()
bool double_is_zero (const double x)
bool complexity_lt (const std::pair< int, int > &lhs, const std::pair< int, int > &rhs)
bool find_ray (const coord_def &source, const coord_def &target, ray_def &ray, const opacity_func &opc, const circle_def &bds, bool cycle)
bool exists_ray (const coord_def &source, const coord_def &target, const opacity_func &opc, const circle_def &bds)
dungeon_feature_type ray_blocker (const coord_def &source, const coord_def &target)
void fallback_ray (const coord_def &source, const coord_def &target, ray_def &ray)
int num_feats_between (const coord_def &source, const coord_def &target, dungeon_feature_type min_feat, dungeon_feature_type max_feat, bool exclude_endpoints, bool just_check)
bool cell_see_cell (const coord_def &p1, const coord_def &p2)
void losight (los_grid &sh, const los_param &dat)
void losight (los_grid &sh, const coord_def &center, const opacity_func &opc, const circle_def &bounds)
void los_actor_moved (const actor *act, const coord_def &oldpos)
void los_monster_died (const monster *mon)
void los_terrain_changed (const coord_def &p)
void los_cloud_changed (const coord_def &p)
void los_changed ()

Variables

const circle_def bds_precalc = circle_def(LOS_MAX_RANGE, C_ROUND)
std::vector< los_rayfullrays
std::vector< coord_defray_coords
std::vector< coord_defcellray_ends
blockrays_t blockrays
FixedArray< std::vector
< cellray >, LOS_MAX_RANGE+1,
LOS_MAX_RANGE+1 > 
min_cellrays
bit_arraydead_rays = NULL
bit_arraysmoke_rays = NULL
int _los_radius_sq = LOS_RADIUS_SQ

Define Documentation

#define LOS_INTERCEPT_MULT   (2)

#define LOS_MAX_ANGLE   (2*LOS_MAX_RANGE-2)


Typedef Documentation

typedef FixedArray<bit_array*, LOS_MAX_RANGE+1, LOS_MAX_RANGE+1> blockrays_t


Enumeration Type Documentation

Enumerator:
C_SUBRAY 
C_SUPERRAY 
C_NEITHER 


Function Documentation

bool cell_see_cell ( const coord_def p1,
const coord_def p2 
)

Here is the call graph for this function:

void clear_rays_on_exit (  ) 

bool complexity_lt ( const std::pair< int, int > &  lhs,
const std::pair< int, int > &  rhs 
)

bool double_is_zero ( const double  x  ) 

bool exists_ray ( const coord_def source,
const coord_def target,
const opacity_func opc,
const circle_def bds 
)

Here is the call graph for this function:

void fallback_ray ( const coord_def source,
const coord_def target,
ray_def ray 
)

bool find_ray ( const coord_def source,
const coord_def target,
ray_def ray,
const opacity_func opc,
const circle_def bds,
bool  cycle 
)

Here is the call graph for this function:

int get_los_radius_sq (  ) 

void los_actor_moved ( const actor act,
const coord_def oldpos 
)

Here is the call graph for this function:

void los_changed (  ) 

Here is the call graph for this function:

void los_cloud_changed ( const coord_def p  ) 

Here is the call graph for this function:

void los_monster_died ( const monster mon  ) 

Here is the call graph for this function:

void los_terrain_changed ( const coord_def p  ) 

Here is the call graph for this function:

void losight ( los_grid sh,
const coord_def center,
const opacity_func opc,
const circle_def bounds 
)

Here is the call graph for this function:

void losight ( los_grid sh,
const los_param dat 
)

Here is the call graph for this function:

int num_feats_between ( const coord_def source,
const coord_def target,
dungeon_feature_type  min_feat,
dungeon_feature_type  max_feat,
bool  exclude_endpoints,
bool  just_check 
)

Here is the call graph for this function:

dungeon_feature_type ray_blocker ( const coord_def source,
const coord_def target 
)

Here is the call graph for this function:

void set_los_radius ( int  r  ) 

Here is the call graph for this function:


Variable Documentation

int _los_radius_sq = LOS_RADIUS_SQ

const circle_def bds_precalc = circle_def(LOS_MAX_RANGE, C_ROUND)

std::vector<coord_def> cellray_ends

std::vector<los_ray> fullrays

FixedArray<std::vector<cellray>, LOS_MAX_RANGE+1, LOS_MAX_RANGE+1> min_cellrays

std::vector<coord_def> ray_coords


Generated on Thu Jan 13 13:08:51 2011 by  doxygen 1.5.6