Matrix occupancy quadtree
[Internals]


Data Structures

struct  _stg_matrix
struct  itl_t
struct  stg_cell
struct  stg_line_t

Typedefs

typedef struct stg_cell stg_cell_t
typedef int(* stg_itl_test_func_t )(stg_model_t *finder, stg_model_t *found)
typedef struct _stg_matrix stg_matrix_t

Enumerations

enum  itl_mode_t { PointToPoint = 0, PointToBearingRange }

Functions

itl_titl_create (double x, double y, double a, double b, stg_matrix_t *matrix, itl_mode_t pmode)
void itl_destroy (itl_t *itl)
stg_model_titl_first_matching (itl_t *itl, stg_itl_test_func_t func, stg_model_t *finder)
void itl_raytrace (itl_t *itl)
double itl_wall_distance (itl_t *itl, stg_itl_test_func_t func, stg_model_t *finder, stg_model_t *otherrobot)
stg_cell_tstg_cell_locate (stg_cell_t *cell, double x, double y)
void stg_cell_render (stg_cell_t *cell)
void stg_cell_render_tree (stg_cell_t *cell)
void stg_cell_unrender (stg_cell_t *cell)
void stg_cell_unrender_tree (stg_cell_t *cell)
void stg_matrix_cell_append (stg_matrix_t *matrix, double x, double y, void *object)
void * stg_matrix_cell_get (stg_matrix_t *matrix, int r, double x, double y)
void stg_matrix_cell_remove (stg_matrix_t *matrix, double x, double y, void *object)
void stg_matrix_clear (stg_matrix_t *matrix)
stg_matrix_tstg_matrix_create (double ppm, double width, double height)
void stg_matrix_destroy (stg_matrix_t *matrix)
void stg_matrix_line (stg_matrix_t *matrix, double x1, double y1, double x2, double y2, void *object)
void stg_matrix_lines (stg_matrix_t *matrix, stg_line_t *lines, int num_lines, void *object)
void stg_matrix_polygons (stg_matrix_t *matrix, double x, double y, double a, stg_polygon_t *polys, int num_polys, void *object)
void stg_matrix_polylines (stg_matrix_t *matrix, double x, double y, double a, stg_polyline_t *polylines, int num_polylines, void *object)
void stg_matrix_rectangle (stg_matrix_t *matrix, double px, double py, double pth, double dx, double dy, void *object)
void stg_matrix_remove_obect (stg_matrix_t *matrix, void *object)
void stg_matrix_remove_object (stg_matrix_t *matrix, void *object)

Detailed Description

Occupancy quadtree underlying Stage's sensing and collision models.

Typedef Documentation

typedef struct stg_cell stg_cell_t

A node in the occupancy quadtree

typedef int(* stg_itl_test_func_t)(stg_model_t *finder, stg_model_t *found)

typedef struct _stg_matrix stg_matrix_t

Occupancy quadtree structure


Enumeration Type Documentation

enum itl_mode_t

Enumerator:
PointToPoint 
PointToBearingRange 


Function Documentation

void itl_raytrace ( itl_t itl  ) 

stg_cell_t* stg_cell_locate ( stg_cell_t cell,
double  x,
double  y 
)

in the cell-tree which contains cell, return the smallest cell that contains the point x,y. cell need not be the root of the tree

References stg_cell::children, GTE, LT, stg_cell::parent, stg_cell::x, stg_cell::xmax, stg_cell::xmin, stg_cell::y, stg_cell::ymax, and stg_cell::ymin.

Referenced by itl_first_matching(), itl_wall_distance(), and stg_matrix_lines().

void stg_cell_render_tree ( stg_cell_t cell  ) 

void stg_cell_unrender ( stg_cell_t cell  ) 

void stg_cell_unrender_tree ( stg_cell_t cell  ) 

void stg_matrix_cell_append ( stg_matrix_t matrix,
double  x,
double  y,
void *  object 
)

append the pointer [object] to the list of pointers in the [matrix] cell at location [x,y]

void* stg_matrix_cell_get ( stg_matrix_t matrix,
int  r,
double  x,
double  y 
)

Get the pointer from the cell at x,y (in meters).

void stg_matrix_cell_remove ( stg_matrix_t matrix,
double  x,
double  y,
void *  object 
)

if [object] appears in the cell's list, remove it

void stg_matrix_clear ( stg_matrix_t matrix  ) 

removes all pointers from every cell in the matrix

stg_matrix_t* stg_matrix_create ( double  ppm,
double  width,
double  height 
)

void stg_matrix_destroy ( stg_matrix_t matrix  ) 

Frees all memory allocated by the matrix; first the cells, then the cell array.

References _stg_matrix::ptable.

Referenced by stg_world_destroy().

void stg_matrix_line ( stg_matrix_t matrix,
double  x1,
double  y1,
double  x2,
double  y2,
void *  object 
)

Render [object] as a line in the matrix.

void stg_matrix_polygons ( stg_matrix_t matrix,
double  x,
double  y,
double  a,
stg_polygon_t polys,
int  num_polys,
void *  object 
)

render an array of polygons into the matrix

References stg_polygon_t::points, stg_matrix_lines(), stg_point_t::x, stg_line_t::x1, stg_line_t::x2, stg_point_t::y, stg_line_t::y1, and stg_line_t::y2.

Referenced by stg_model_map().

void stg_matrix_polylines ( stg_matrix_t matrix,
double  x,
double  y,
double  a,
stg_polyline_t polylines,
int  num_polylines,
void *  object 
)

void stg_matrix_rectangle ( stg_matrix_t matrix,
double  px,
double  py,
double  pth,
double  dx,
double  dy,
void *  object 
)

Append to the [object] pointer to the cells on the edge of a rectangle, described in meters about a center point.

References stg_matrix_lines(), stg_line_t::x1, stg_line_t::x2, stg_line_t::y1, and stg_line_t::y2.

Referenced by stg_model_map().

void stg_matrix_remove_obect ( stg_matrix_t matrix,
void *  object 
)

remove [object] from all cells it occupies in the matrix

void stg_matrix_remove_object ( stg_matrix_t matrix,
void *  object 
)

remove all reference to an object from the matrix

References _stg_matrix::ptable, and stg_cell_remove_object().

Referenced by stg_model_map().


Generated on Wed Jun 3 23:12:29 2009 for Stage by  doxygen 1.5.9