Details
FTT_CELLS
Evaluates to the maximum number of children of a FttCell (4 in 2D, 8 in 3D).
FTT_CELL_ID()
#define FTT_CELL_ID(c) ((c)->flags & FTT_FLAG_ID) |
Evaluates to the child index of c.
FTT_OPPOSITE_DIRECTION()
#define FTT_OPPOSITE_DIRECTION(d) (ftt_opposite_direction[d]) |
FTT_ORTHOGONAL_COMPONENT()
#define FTT_ORTHOGONAL_COMPONENT(c) (((c) + 1) % FTT_DIMENSION) |
ftt_cell_children ()
Fills children with the children of cell.
This function fails if cell is a leaf.
struct FttCellChildren
struct FttCellChildren {
FttCell * c[FTT_CELLS];
}; |
enum FttDirection
typedef enum
{
FTT_RIGHT = 0,
FTT_LEFT,
FTT_TOP,
FTT_BOTTOM,
#ifndef FTT_2D
FTT_FRONT,
FTT_BACK,
#endif /* FTT_3D */
FTT_NEIGHBORS
} FttDirection; |
enum FttComponent
typedef enum
{
FTT_X = 0,
FTT_Y,
#ifndef FTT_2D
FTT_Z,
#endif /* FTT_3D */
FTT_DIMENSION,
FTT_XYZ
} FttComponent; |
ftt_cell_children_direction ()
Fills children with the FTT_CELLS/2 children (2 in 2D, 4 in 3D) of
cell in direction d.
This function fails if cell is a leaf.
ftt_cell_child_corner ()
FttCell* ftt_cell_child_corner (const FttCell *cell,
FttDirectiond[FTT_DIMENSION]); |
This function fails if cell is a leaf.
ftt_cell_neighbors ()
Fills neighbors with the neighbors of cell.
ftt_cell_neighbors_not_cached ()
Fills neighbors with the neighbors of cell (does not use saved
values even if available).
struct FttCellNeighbors
struct FttCellNeighbors {
/* right, left, top, bottom, front, back */
FttCell * c[FTT_NEIGHBORS];
}; |
ftt_cell_neighbor_not_cached ()
ftt_cell_set_neighbor ()
Sets the cell tree defined by neighbor as the neighbor in
direction d of the cell tree defined by root.
Any new cell created during the process is initialized using the
user-defined function init.
Both root and neighbor must be the roots of their respective cell
trees.
ftt_cell_set_neighbor_match ()
Sets the cell tree defined by neighbor as the neighbor in
direction d of the cell tree defined by root.
The boundary between both trees is matched i.e. the type of the
face between any pair of cells belonging to each tree is always
FTT_FINE_FINE. Any new cell created during the process is
initialized using the user-defined function init.
Both root and neighbor must be the roots of their respective cell
trees.