cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : CompositePoint.hpp 00003 // 00004 // Purpose : Decorator for Points owned by higher-order Composites 00005 // 00006 // Special Notes : This object is used a) to complete the child topology 00007 // graph of curves and b) to stitch points. 00008 // 00009 // Creator : Jason Kraftcheck 00010 // 00011 // Creation Date : 03/07/02 00012 //------------------------------------------------------------------------- 00013 00014 #ifndef COMPOSITE_POINT_HPP 00015 #define COMPOSITE_POINT_HPP 00016 00017 #include "Point.hpp" 00018 #include "TBOwner.hpp" 00019 #include "CompositeCurve.hpp" 00020 #include "VGDefines.h" 00021 template <class X> class DLIList; 00022 00023 class CompositePoint : public TBPoint, public TBOwner 00024 { 00025 friend class CompositeCurve; 00026 00027 public: 00028 int HadBridgeRemoved; 00029 00030 CompositePoint( TBPoint* real_pt ); 00031 virtual ~CompositePoint(); 00032 00033 CompositeCurve* next_curve( CompositeCurve* prev = 0 ) const 00034 { return prev ? prev->next( this ) : firstCurve; } 00035 00036 TBPoint* get_point() const 00037 { return realPoint; } 00038 00039 void append_simple_attribute_virt( const CubitSimpleAttrib& csa ) 00040 { 00041 if(get_point()) 00042 get_point()->append_simple_attribute_virt( csa ); 00043 } 00044 void remove_simple_attribute_virt( const CubitSimpleAttrib& csa ) 00045 { 00046 if(get_point()) 00047 get_point()->remove_simple_attribute_virt( csa ); 00048 } 00049 void remove_all_simple_attribute_virt() 00050 { 00051 if(get_point()) 00052 get_point()->remove_all_simple_attribute_virt(); 00053 } 00054 CubitStatus get_simple_attribute( DLIList<CubitSimpleAttrib>& list ) 00055 { 00056 if(get_point()) 00057 return get_point()->get_simple_attribute( list ); 00058 return CUBIT_FAILURE; 00059 } 00060 CubitStatus get_simple_attribute( const CubitString& name, 00061 DLIList<CubitSimpleAttrib>& attrib_list ) 00062 { 00063 if(get_point()) 00064 return get_point()->get_simple_attribute( name, attrib_list ); 00065 return CUBIT_FAILURE; 00066 } 00067 00068 GeometryQueryEngine* get_geometry_query_engine() const; 00069 00070 void get_parents_virt( DLIList<TopologyBridge*>& ); 00071 void get_children_virt( DLIList<TopologyBridge*>& ); 00072 int layer() const { return COMPOSITE_LAYER; } 00073 00074 CubitVector coordinates() const 00075 { 00076 if(get_point()) 00077 return get_point()->coordinates(); 00078 return CubitVector(0,0,0); 00079 } 00080 00081 CubitStatus remove_bridge( TopologyBridge* bridge ); 00082 CubitStatus swap_bridge( TopologyBridge* old_tb, TopologyBridge* new_tb, bool ); 00083 void notify_reversed( TopologyBridge* bridge ); 00084 00085 void print_debug_info( const char* prefix = 0, bool brief = false ) const; 00086 00087 CubitStatus stitch( CompositePoint* point ); 00088 void unstitch_all(); 00089 void get_stitched( DLIList<CompositePoint*>& result ); 00090 00091 private: 00092 00093 CompositeCurve* firstCurve; 00094 00095 TBPoint* realPoint; 00096 00097 CompositePoint* stitchNext; 00098 }; 00099 00100 #endif