cgma
|
#include <CompositeLoop.hpp>
Definition at line 21 of file CompositeLoop.hpp.
Definition at line 17 of file CompositeLoop.cpp.
: mySurface(0), myCoedge(0), loopNext(0), numCoedges(0) { }
CompositeLoop::~CompositeLoop | ( | ) | [virtual] |
Definition at line 31 of file CompositeLoop.cpp.
{ if( mySurface ) { mySurface->remove( this ); mySurface = 0; } CubitStatus s = remove_all_coedges(); assert( s ); if (CUBIT_SUCCESS != s) { PRINT_ERROR("Failed to remove all coedges.\n"); } }
void CompositeLoop::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [virtual] |
CompositeCoEdge * CompositeLoop::first_coedge | ( | ) | const [inline] |
Definition at line 83 of file CompositeLoop.hpp.
{ return myCoedge; }
void CompositeLoop::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [virtual] |
Implements TopologyBridge.
Definition at line 219 of file CompositeLoop.cpp.
{ CompositeCoEdge* coedge = myCoedge; if( coedge ) do { children.append( coedge ); coedge = next_coedge( coedge ); } while( coedge != myCoedge ); }
GeometryQueryEngine * CompositeLoop::get_geometry_query_engine | ( | ) | const [virtual] |
Implements TopologyBridge.
Definition at line 240 of file CompositeLoop.cpp.
{ return VirtualQueryEngine::instance(); }
void CompositeLoop::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [virtual] |
Implements TopologyBridge.
Definition at line 206 of file CompositeLoop.cpp.
CubitStatus CompositeLoop::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | ) | [virtual] |
Implements TopologyBridge.
Definition at line 258 of file CompositeLoop.cpp.
{ return CUBIT_FAILURE; }
CubitStatus CompositeLoop::get_simple_attribute | ( | const CubitString & | name, |
DLIList< CubitSimpleAttrib > & | attrib_list | ||
) | [virtual] |
Implements TopologyBridge.
Definition at line 260 of file CompositeLoop.cpp.
{ return CUBIT_FAILURE; }
CompositeSurface * CompositeLoop::get_surface | ( | ) | const [inline] |
Definition at line 77 of file CompositeLoop.hpp.
{ return mySurface; }
CubitStatus CompositeLoop::insert_after | ( | CompositeCoEdge * | coedge, |
CompositeCoEdge * | after | ||
) |
Definition at line 55 of file CompositeLoop.cpp.
{ if( insert->myLoop != 0 ) return CUBIT_FAILURE; if( numCoedges == 0 ) { if( after ) return CUBIT_FAILURE; insert->nextCoedge = insert; insert->prevCoedge = insert; myCoedge = insert; } else { if( !after || after->myLoop != this ) return CUBIT_FAILURE; insert->prevCoedge = after; insert->nextCoedge = after->nextCoedge; insert->nextCoedge->prevCoedge = insert; insert->prevCoedge->nextCoedge = insert; } insert->myLoop = this; numCoedges++; return CUBIT_SUCCESS; }
CubitStatus CompositeLoop::insert_before | ( | CompositeCoEdge * | coedge, |
CompositeCoEdge * | before | ||
) |
Definition at line 85 of file CompositeLoop.cpp.
{ if( insert->myLoop != 0 ) return CUBIT_FAILURE; if( numCoedges == 0 ) { if( before ) return CUBIT_FAILURE; insert->nextCoedge = insert; insert->prevCoedge = insert; myCoedge = insert; } else { if( !before || before->myLoop != this ) return CUBIT_FAILURE; insert->nextCoedge = before; insert->prevCoedge = before->prevCoedge; insert->nextCoedge->prevCoedge = insert; insert->prevCoedge->nextCoedge = insert; } insert->myLoop = this; numCoedges++; return CUBIT_SUCCESS; }
CubitBoolean CompositeLoop::is_external | ( | ) | [virtual] |
Definition at line 186 of file CompositeLoop.cpp.
{ PRINT_ERROR( "This command is not supported with this engine.\n"); return CUBIT_FAILURE; }
int CompositeLoop::layer | ( | ) | const [inline, virtual] |
Reimplemented from TopologyBridge.
Definition at line 45 of file CompositeLoop.hpp.
{ return COMPOSITE_LAYER; }
LoopType CompositeLoop::loop_type | ( | ) | [virtual] |
CompositeCoEdge * CompositeLoop::next_coedge | ( | CompositeCoEdge * | after_this | ) | const [inline] |
Definition at line 89 of file CompositeLoop.hpp.
{ return prev->myLoop == this ? prev->nextCoedge : 0; }
CompositeLoop * CompositeLoop::next_loop | ( | ) | const [inline] |
Definition at line 80 of file CompositeLoop.hpp.
{ return loopNext; }
int CompositeLoop::num_coedges | ( | ) | const [inline] |
Definition at line 86 of file CompositeLoop.hpp.
{ return numCoedges; }
CompositeCoEdge * CompositeLoop::prev_coedge | ( | CompositeCoEdge * | before_this | ) | const [inline] |
Definition at line 92 of file CompositeLoop.hpp.
{ return next->myLoop == this ? next->prevCoedge : 0; }
void CompositeLoop::print_debug_info | ( | const char * | line_prefix = 0 | ) |
Definition at line 289 of file CompositeLoop.cpp.
{ if( line_prefix == 0 ) line_prefix = ""; char* new_prefix = new char[strlen(line_prefix)+3]; strcpy( new_prefix, line_prefix ); strcat( new_prefix, " " ); PRINT_INFO("%sCompositeLoop @ %p : \n", line_prefix, (void*)this ); CompositeCoEdge* coedge = first_coedge(); if( !coedge ) PRINT_INFO("%s No CoEdges!!\n", line_prefix); else do { coedge->print_debug_info( new_prefix ); coedge = next_coedge( coedge ); } while( coedge != first_coedge() ); delete [] new_prefix; }
CubitStatus CompositeLoop::remove | ( | CompositeCoEdge * | coedge | ) |
Definition at line 125 of file CompositeLoop.cpp.
{ if( coedge->myLoop != this ) return CUBIT_FAILURE; if( numCoedges == 1 ) { assert( coedge->nextCoedge == coedge && coedge->prevCoedge == coedge ); myCoedge = 0; } else { coedge->nextCoedge->prevCoedge = coedge->prevCoedge; coedge->prevCoedge->nextCoedge = coedge->nextCoedge; if( myCoedge == coedge ) myCoedge = coedge->nextCoedge; } numCoedges--; coedge->myLoop = 0; coedge->nextCoedge = 0; coedge->prevCoedge = 0; return CUBIT_SUCCESS; }
CubitStatus CompositeLoop::remove_all_coedges | ( | DLIList< CompositeCoEdge * > * | removed = 0 | ) |
Definition at line 164 of file CompositeLoop.cpp.
{ while( myCoedge ) { if( list ) list->append( myCoedge ); remove( myCoedge ); } return CUBIT_SUCCESS; }
void CompositeLoop::remove_all_simple_attribute_virt | ( | ) | [virtual] |
void CompositeLoop::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [virtual] |
void CompositeLoop::reverse | ( | bool | b_reverse_coedges | ) |
Definition at line 275 of file CompositeLoop.cpp.
{ CompositeCoEdge* coedge = myCoedge; if( coedge ) do { CompositeCoEdge* temp = coedge->nextCoedge; coedge->nextCoedge = coedge->prevCoedge; coedge->prevCoedge = temp; if (b_reverse_coedges) coedge->reverse(); coedge = temp; } while( coedge != myCoedge ); }
friend class CompositeSurface [friend] |
Definition at line 23 of file CompositeLoop.hpp.
CompositeLoop* CompositeLoop::loopNext [private] |
Definition at line 73 of file CompositeLoop.hpp.
CompositeCoEdge* CompositeLoop::myCoedge [private] |
Definition at line 72 of file CompositeLoop.hpp.
CompositeSurface* CompositeLoop::mySurface [private] |
Definition at line 71 of file CompositeLoop.hpp.
int CompositeLoop::numCoedges [private] |
Definition at line 74 of file CompositeLoop.hpp.