BRL-CAD
#include "common.h"
#include <math.h>
#include "bio.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"
Include dependency graph for nmg_visit.c:

Go to the source code of this file.

Functions

void nmg_visit_vertex (struct vertex *v, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_vertexuse (struct vertexuse *vu, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_edge (struct edge *e, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_edgeuse (struct edgeuse *eu, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_loop (struct loop *l, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_loopuse (struct loopuse *lu, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_face (struct face *f, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_faceuse (struct faceuse *fu, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_shell (struct shell *s, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_region (struct nmgregion *r, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit_model (struct model *model, const struct nmg_visit_handlers *htab, void *state)
 
void nmg_visit (const uint32_t *magicp, const struct nmg_visit_handlers *htab, void *state)
 

Detailed Description

A generalized, object-oriented subroutine family to visit all the data structures "below" a given structure.

The caller provides a pointer to the structure to start at, a table of "handlers" for each kind of structure, and a generic pointer for private state which will be sent along to the user's handlers. For non-leaf structures, there are two handlers, one called before any recursion starts, and the other called when recursion is finished. Either or both may be omitted.

Definition in file nmg_visit.c.

Function Documentation

void nmg_visit_vertex ( struct vertex *  v,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 49 of file nmg_visit.c.

Referenced by nmg_visit_vertexuse().

void nmg_visit_vertexuse ( struct vertexuse *  vu,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 64 of file nmg_visit.c.

References nmg_visit_vertex().

Referenced by nmg_visit(), nmg_visit_edgeuse(), nmg_visit_loopuse(), and nmg_visit_shell().

Here is the call graph for this function:

void nmg_visit_edge ( struct edge *  e,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 83 of file nmg_visit.c.

Referenced by nmg_visit_edgeuse().

void nmg_visit_edgeuse ( struct edgeuse *  eu,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 95 of file nmg_visit.c.

References nmg_visit_edge(), and nmg_visit_vertexuse().

Referenced by nmg_visit(), nmg_visit_loopuse(), and nmg_visit_shell().

Here is the call graph for this function:

void nmg_visit_loop ( struct loop *  l,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 115 of file nmg_visit.c.

Referenced by nmg_visit_loopuse().

void nmg_visit_loopuse ( struct loopuse *  lu,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 130 of file nmg_visit.c.

References BU_LIST_FIRST, BU_LIST_FIRST_MAGIC, BU_LIST_FOR, NMG_CK_LOOPUSE(), NMG_VERTEXUSE_MAGIC, nmg_visit_edgeuse(), nmg_visit_loop(), and nmg_visit_vertexuse().

Referenced by nmg_visit(), nmg_visit_faceuse(), and nmg_visit_shell().

Here is the call graph for this function:

void nmg_visit_face ( struct face *  f,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 156 of file nmg_visit.c.

Referenced by nmg_visit_faceuse().

void nmg_visit_faceuse ( struct faceuse *  fu,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 170 of file nmg_visit.c.

References BU_LIST_FOR, lu, nmg_visit_face(), and nmg_visit_loopuse().

Referenced by nmg_visit(), and nmg_visit_shell().

Here is the call graph for this function:

void nmg_visit_shell ( struct shell *  s,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 192 of file nmg_visit.c.

References BU_LIST_FOR, lu, NMG_CK_SHELL(), nmg_visit_edgeuse(), nmg_visit_faceuse(), nmg_visit_loopuse(), and nmg_visit_vertexuse().

Referenced by nmg_visit(), and nmg_visit_region().

Here is the call graph for this function:

void nmg_visit_region ( struct nmgregion *  r,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 223 of file nmg_visit.c.

References BU_LIST_FOR, nmg_visit_shell(), and s.

Referenced by nmg_visit(), and nmg_visit_model().

Here is the call graph for this function:

void nmg_visit_model ( struct model *  model,
const struct nmg_visit_handlers *  htab,
void *  state 
)

Definition at line 243 of file nmg_visit.c.

References BU_LIST_FOR, and nmg_visit_region().

Referenced by nmg_visit().

Here is the call graph for this function: