Matrix occupancy quadtree
[Internals]


Detailed Description

Occupancy quadtree underlying Stage's sensing and collision models.


Data Structures

struct  _stg_matrix
struct  itl_t
struct  stg_cell
struct  stg_line_t

Typedefs

typedef stg_cell stg_cell_t
typedef int(* stg_itl_test_func_t )(stg_model_t *finder, stg_model_t *found)
typedef _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)

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

itl_t* itl_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_t* itl_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_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

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
 

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
 

Create a new matrix structure

void stg_matrix_destroy stg_matrix_t matrix  ) 
 

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

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_lines stg_matrix_t matrix,
stg_line_t lines,
int  num_lines,
void *  object
 

Call stg_matrix_line for each of [num_lines] lines

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

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

render an array of polylines into the matrix

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.

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


Generated on Thu Dec 13 13:55:22 2007 for Stage by  doxygen 1.4.6