cgma
|
#include <TDSurfaceOverlap.hpp>
Public Member Functions | |
TDSurfaceOverlap (RefFace *ref_face_ptr, unsigned short ang_facet_tol, double abs_facet_tol, double gap_max) | |
~TDSurfaceOverlap () | |
int | has_rtree () |
DLIList< SurfaceOverlapFacet * > * | get_facet_list () |
AbstractTree < SurfaceOverlapFacet * > * | get_facet_rtree () |
DLIList< Body * > * | get_body_list () |
Static Public Member Functions | |
static int | is_surface_overlap (const ToolData *td) |
Private Attributes | |
RefFace * | refFacePtr |
DLIList< SurfaceOverlapFacet * > | facetList |
AbstractTree < SurfaceOverlapFacet * > * | aTree |
DLIList< Body * > | bodyList |
int | bodiesRetrieved |
int | marked |
unsigned short | angFacetTol |
double | absFacetTol |
double | gapMax |
Definition at line 17 of file TDSurfaceOverlap.hpp.
TDSurfaceOverlap::TDSurfaceOverlap | ( | RefFace * | ref_face_ptr, |
unsigned short | ang_facet_tol, | ||
double | abs_facet_tol, | ||
double | gap_max | ||
) |
Definition at line 8 of file TDSurfaceOverlap.cpp.
{ refFacePtr = ref_face_ptr; aTree = NULL; marked = 0; bodiesRetrieved = 0; angFacetTol = ang_facet_tol; absFacetTol = abs_facet_tol; gapMax = gap_max; }
DLIList< Body * > * TDSurfaceOverlap::get_body_list | ( | ) |
Definition at line 96 of file TDSurfaceOverlap.cpp.
{ if( bodiesRetrieved ) return &bodyList; refFacePtr->bodies( bodyList ); bodiesRetrieved = 1; return &bodyList; }
Definition at line 29 of file TDSurfaceOverlap.cpp.
{ if( facetList.size() ) return &facetList; GMem *gmem_ptr = new GMem; CubitStatus stat = refFacePtr->get_graphics( *gmem_ptr, angFacetTol, absFacetTol ); if( !stat ) { delete gmem_ptr; return NULL; } GPoint* plist = gmem_ptr->point_list(); int* facet_list = gmem_ptr->facet_list(); int i; GPoint p[3]; for (i = 0; i < gmem_ptr->fListCount; ) { int sides = facet_list[i++]; if (sides != 3) { PRINT_WARNING("Skipping n-sided polygone in triangle list" " in TDSurfaceOverlap.\n"); i += sides; } else { p[0] = plist[facet_list[i++]]; p[1] = plist[facet_list[i++]]; p[2] = plist[facet_list[i++]]; SurfaceOverlapFacet *facet = new SurfaceOverlapFacet( p ); facetList.append( facet ); } } delete gmem_ptr; return &facetList; }
Definition at line 75 of file TDSurfaceOverlap.cpp.
{ if( !aTree && !get_facet_list() ) return NULL; if( !aTree ) { aTree = new RTree<SurfaceOverlapFacet*>( gapMax ); int i; for( i=facetList.size(); i--; ) { SurfaceOverlapFacet *facet_ptr = facetList.get_and_step(); aTree->add( facet_ptr ); } } return aTree; }
int TDSurfaceOverlap::has_rtree | ( | ) | [inline] |
Definition at line 25 of file TDSurfaceOverlap.hpp.
{if(aTree) return CUBIT_TRUE; else return CUBIT_FALSE;}
static int TDSurfaceOverlap::is_surface_overlap | ( | const ToolData * | td | ) | [inline, static] |
Definition at line 35 of file TDSurfaceOverlap.hpp.
{return (CAST_TO(td, const TDSurfaceOverlap) != NULL);}
double TDSurfaceOverlap::absFacetTol [private] |
Definition at line 47 of file TDSurfaceOverlap.hpp.
unsigned short TDSurfaceOverlap::angFacetTol [private] |
Definition at line 46 of file TDSurfaceOverlap.hpp.
AbstractTree<SurfaceOverlapFacet*>* TDSurfaceOverlap::aTree [private] |
Definition at line 42 of file TDSurfaceOverlap.hpp.
int TDSurfaceOverlap::bodiesRetrieved [private] |
Definition at line 44 of file TDSurfaceOverlap.hpp.
DLIList<Body*> TDSurfaceOverlap::bodyList [private] |
Definition at line 43 of file TDSurfaceOverlap.hpp.
DLIList<SurfaceOverlapFacet*> TDSurfaceOverlap::facetList [private] |
Definition at line 41 of file TDSurfaceOverlap.hpp.
double TDSurfaceOverlap::gapMax [private] |
Definition at line 48 of file TDSurfaceOverlap.hpp.
int TDSurfaceOverlap::marked [private] |
Definition at line 45 of file TDSurfaceOverlap.hpp.
RefFace* TDSurfaceOverlap::refFacePtr [private] |
Definition at line 40 of file TDSurfaceOverlap.hpp.