Routines for handling the indexing of NMG structs.
More...
|
#define | NMG_INDEX_VALUE(_tab, _index) ((_tab)[_index]) |
|
#define | NMG_INDEX_TEST(_tab, _p) ((_tab)[(_p)->index]) |
|
#define | NMG_INDEX_SET(_tab, _p) {(_tab)[(_p)->index] = 1;} |
|
#define | NMG_INDEX_CLEAR(_tab, _p) {(_tab)[(_p)->index] = 0;} |
|
#define | NMG_INDEX_TEST_AND_SET(_tab, _p) ((_tab)[(_p)->index] == 0 ? ((_tab)[(_p)->index] = 1) : 0) |
|
#define | NMG_INDEX_IS_SET(_tab, _p) NMG_INDEX_TEST(_tab, _p) |
|
#define | NMG_INDEX_FIRST_TIME(_tab, _p) NMG_INDEX_TEST_AND_SET(_tab, _p) |
|
#define | NMG_INDEX_ASSIGN(_tab, _p, _val) {(_tab)[(_p)->index] = _val;} |
|
#define | NMG_INDEX_GET(_tab, _p) ((_tab)[(_p)->index]) |
|
#define | NMG_INDEX_GETP(_ty, _tab, _p) ((struct _ty *)((_tab)[(_p)->index])) |
|
#define | NMG_INDEX_OR(_tab, _p, _val) {(_tab)[(_p)->index] |= _val;} |
|
#define | NMG_INDEX_AND(_tab, _p, _val) {(_tab)[(_p)->index] &= _val;} |
|
#define | NMG_INDEX_RETURN_IF_SET_ELSE_SET(_tab, _index) |
|
#define | NMG_0MANIFOLD 1 |
|
#define | NMG_1MANIFOLD 2 |
|
#define | NMG_2MANIFOLD 4 |
|
#define | NMG_DANGLING 8 /* NMG_2MANIFOLD + 4th bit for special cond (UNUSED) */ |
|
#define | NMG_3MANIFOLD 16 |
|
#define | NMG_SET_MANIFOLD(_t, _p, _v) NMG_INDEX_OR(_t, _p, _v) |
|
#define | NMG_MANIFOLDS(_t, _p) NMG_INDEX_VALUE(_t, (_p)->index) |
|
#define | NMG_CP_MANIFOLD(_t, _p, _q) (_t)[(_p)->index] = (_t)[(_q)->index] |
|
Routines for handling the indexing of NMG structs.
◆ NMG_INDEX_VALUE
#define NMG_INDEX_VALUE |
( |
|
_tab, |
|
|
|
_index |
|
) |
| ((_tab)[_index]) |
◆ NMG_INDEX_TEST
#define NMG_INDEX_TEST |
( |
|
_tab, |
|
|
|
_p |
|
) |
| ((_tab)[(_p)->index]) |
◆ NMG_INDEX_SET
#define NMG_INDEX_SET |
( |
|
_tab, |
|
|
|
_p |
|
) |
| {(_tab)[(_p)->index] = 1;} |
◆ NMG_INDEX_CLEAR
#define NMG_INDEX_CLEAR |
( |
|
_tab, |
|
|
|
_p |
|
) |
| {(_tab)[(_p)->index] = 0;} |
◆ NMG_INDEX_TEST_AND_SET
#define NMG_INDEX_TEST_AND_SET |
( |
|
_tab, |
|
|
|
_p |
|
) |
| ((_tab)[(_p)->index] == 0 ? ((_tab)[(_p)->index] = 1) : 0) |
◆ NMG_INDEX_IS_SET
◆ NMG_INDEX_FIRST_TIME
◆ NMG_INDEX_ASSIGN
#define NMG_INDEX_ASSIGN |
( |
|
_tab, |
|
|
|
_p, |
|
|
|
_val |
|
) |
| {(_tab)[(_p)->index] = _val;} |
◆ NMG_INDEX_GET
#define NMG_INDEX_GET |
( |
|
_tab, |
|
|
|
_p |
|
) |
| ((_tab)[(_p)->index]) |
◆ NMG_INDEX_GETP
#define NMG_INDEX_GETP |
( |
|
_ty, |
|
|
|
_tab, |
|
|
|
_p |
|
) |
| ((struct _ty *)((_tab)[(_p)->index])) |
◆ NMG_INDEX_OR
#define NMG_INDEX_OR |
( |
|
_tab, |
|
|
|
_p, |
|
|
|
_val |
|
) |
| {(_tab)[(_p)->index] |= _val;} |
◆ NMG_INDEX_AND
#define NMG_INDEX_AND |
( |
|
_tab, |
|
|
|
_p, |
|
|
|
_val |
|
) |
| {(_tab)[(_p)->index] &= _val;} |
◆ NMG_INDEX_RETURN_IF_SET_ELSE_SET
#define NMG_INDEX_RETURN_IF_SET_ELSE_SET |
( |
|
_tab, |
|
|
|
_index |
|
) |
| |
Value: { \
if ((_tab)[_index]) return; \
else (_tab)[_index] = 1; \
}
Definition at line 99 of file index.h.
◆ NMG_0MANIFOLD
◆ NMG_1MANIFOLD
◆ NMG_2MANIFOLD
◆ NMG_DANGLING
◆ NMG_3MANIFOLD
◆ NMG_SET_MANIFOLD
#define NMG_SET_MANIFOLD |
( |
|
_t, |
|
|
|
_p, |
|
|
|
_v |
|
) |
| NMG_INDEX_OR(_t, _p, _v) |
◆ NMG_MANIFOLDS
◆ NMG_CP_MANIFOLD
#define NMG_CP_MANIFOLD |
( |
|
_t, |
|
|
|
_p, |
|
|
|
_q |
|
) |
| (_t)[(_p)->index] = (_t)[(_q)->index] |
◆ nmg_index_of_struct()
int nmg_index_of_struct |
( |
const uint32_t * |
p | ) |
|
◆ nmg_m_struct_count()
◆ nmg_pr_m_struct_counts()
void nmg_pr_m_struct_counts |
( |
const struct model * |
m, |
|
|
const char * |
str |
|
) |
| |
◆ nmg_vls_struct_counts()
◆ nmg_pr_struct_counts()