nmg_eval.c File Reference

#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "machine.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"

Include dependency graph for nmg_eval.c:

Go to the source code of this file.

Data Structures

struct  nmg_bool_state

Defines

#define BACTION_KILL   1
#define BACTION_RETAIN   2
#define BACTION_RETAIN_AND_FLIP   3
#define NMG_CLASS_BAD   8

Functions

void nmg_ck_lu_orientation (struct loopuse *lu, const struct bn_tol *tolp)
const char * nmg_class_name (int class)
void nmg_evaluate_boolean (struct shell *sA, struct shell *sB, int op, long int **classlist, const struct bn_tol *tol)
int nmg_eval_action (long int *ptr, register struct nmg_bool_state *bs)


Detailed Description

Evaluate boolean operations on NMG objects.

Authors - Michael John Muuss Lee A. Butler

Source - SECAD/VLD Computing Consortium, Bldg 394 The U. S. Army Ballistic Research Laboratory Aberdeen Proving Ground, Maryland 21005

Definition in file nmg_eval.c.


Define Documentation

#define BACTION_KILL   1
 

Definition at line 71 of file nmg_eval.c.

#define BACTION_RETAIN   2
 

Definition at line 72 of file nmg_eval.c.

#define BACTION_RETAIN_AND_FLIP   3
 

Definition at line 73 of file nmg_eval.c.

#define NMG_CLASS_BAD   8
 

Definition at line 83 of file nmg_eval.c.

Referenced by nmg_class_name(), and nmg_eval_action().


Function Documentation

void nmg_evaluate_boolean struct shell sA,
struct shell sB,
int  op,
long int **  classlist,
const struct bn_tol tol
 

N M G _ E V A L U A T E _ B O O L E A N

Evaluate a boolean operation on the two shells "A" and "B", of the form "answer = A op B". As input, each element (loop-in-face, wire loop, wire edge, vertex) in both A and B has been classified as being "in", "on", or "out" of the other shell. Using these classifications, operate on the input shells. At the end, shell A contains the resultant object, and shell B is destroyed.

Definition at line 208 of file nmg_eval.c.

References BN_CK_TOL, nmg_bool_state::bs_actions, nmg_bool_state::bs_classtab, nmg_bool_state::bs_dest, nmg_bool_state::bs_isA, nmg_bool_state::bs_src, nmg_bool_state::bs_tol, bu_bomb(), bu_log(), DEBUG_BOOLEVAL, DEBUG_PLOTEM, fp, NMG_BOOL_ADD, NMG_BOOL_ISECT, NMG_BOOL_SUB, NMG_CK_SHELL, nmg_invert_shell(), nmg_js(), nmg_pl_s(), nmg_rm_redundancies(), NULL, perror(), rt_bomb(), and void().

Here is the call graph for this function:

int nmg_eval_action long int *  ptr,
register struct nmg_bool_state bs
 

N M G _ E V A L _ A C T I O N

Given a pointer to some NMG data structure, search the 4 classification lists to determine it's classification. (XXX In the future, this should be done with one big array). Then, return the action code for an item of that classification.

Definition at line 293 of file nmg_eval.c.

References BN_CK_TOL, bu_identify_magic(), bu_log(), DEBUG_BOOLEVAL, index, NMG_CLASS_AinB, NMG_CLASS_AonBanti, NMG_CLASS_AonBshared, NMG_CLASS_AoutB, NMG_CLASS_BAD, NMG_CLASS_BinA, NMG_CLASS_BonAanti, NMG_CLASS_BonAshared, NMG_CLASS_BoutA, nmg_class_name(), nmg_index_of_struct(), and NMG_INDEX_VALUE.

Here is the call graph for this function:


Generated on Mon Sep 18 01:25:07 2006 for BRL-CAD by  doxygen 1.4.6