cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : CoEdge.hpp 00003 // 00004 // Purpose : 00005 // 00006 // Special Notes : 00007 // 00008 // Creator : Xuechen Liu 00009 // 00010 // Creation Date : 08/02/96 00011 // 00012 // Owner : Malcolm J. Panthaki 00013 //------------------------------------------------------------------------- 00014 00015 #ifndef COEDGE_HPP 00016 #define COEDGE_HPP 00017 00018 // ********** BEGIN STANDARD INCLUDES ********** 00019 // ********** END STANDARD INCLUDES ********** 00020 00021 // ********** BEGIN CUBIT INCLUDES ********** 00022 #include "CubitDefines.h" 00023 #include "SenseEntity.hpp" 00024 #include "ToolDataUser.hpp" 00025 // ********** END CUBIT INCLUDES ********** 00026 00027 // ********** BEGIN FORWARD DECLARATIONS ********** 00028 class RefEdge; 00029 class RefFace; 00030 class Loop; 00031 class CoEdgeSM; 00032 // ********** END FORWARD DECLARATIONS ********** 00033 00034 class CUBIT_GEOM_EXPORT CoEdge : public SenseEntity, 00035 public ToolDataUser 00036 { 00037 public : 00038 00039 CoEdge() ; 00040 //- The default constructor 00041 00042 virtual ~CoEdge() ; 00043 //- The destructor 00044 00045 CoEdge(RefEdge* edgePtr, CubitSense sense) ; 00046 //I edgePtr 00047 //I- The pointer to a edge. 00048 //I sense 00049 //I- The sense of this CoEdge. 00050 //- The constructor with a pointer to a edge and the sense of this 00051 //- CoEdge. 00052 00053 CoEdge(CoEdgeSM* OSMEPtr); 00054 00055 DagType dag_type() const { return DagType::co_edge_type(); } 00056 00057 RefEdge* get_ref_edge_ptr() ; 00058 //R RefEdge* 00059 //R- A pointer to the RefEdge which the current sense 00060 //R- entity is associated with. 00061 //- This function returns a pointer to the RefEdge which 00062 //- the current CoEdge is associated with. 00063 00064 RefFace* get_ref_face(); 00065 //R RefFace* 00066 //R- A pointer to the RefFace on which this co-edge is a part of. 00067 00068 Loop* get_loop_ptr(); 00069 //R Loop* 00070 //R- A pointer to the parent Loop of this CoEdge. 00071 00072 virtual void switch_child_notify(TopologyEntity const* newChild, 00073 TopologyEntity const* oldChild) ; 00074 //R void 00075 //I newChild 00076 //I- A pointer to the new child 00077 //I oldChild 00078 //I- A pointer to the old child 00079 //- This function is called after a child of a TopologyEntity is 00080 //- switched. The sense of a CoEdge may change if one of its 00081 //- RefEdges changes. This function takes care of that. If the sense 00082 //- of the RefEdges that were switched is same, nothing is done. If 00083 //- the RefEdges are of opposite sense, the sense of this object is 00084 //- switched, i.e. if it was FORWARD, it is made REVERSED, and vice 00085 //- versa. 00086 00087 CoEdgeSM* get_co_edge_sm_ptr() const; 00088 00089 CubitStatus set_co_edge_sm_ptr(CoEdgeSM*); 00090 00091 CubitBoolean about_spatially_equal( CoEdge* other_coedge, 00092 CubitSense relative_sense, 00093 double tolerance_factor = 1.0, 00094 CubitBoolean notify_refEntity = 00095 CUBIT_FALSE ); 00096 00097 RefVertex* start_vertex(); 00098 00099 RefVertex* end_vertex(); 00100 00101 protected: 00102 00103 private: 00104 CoEdge( const CoEdge& ); 00105 void operator=( const CoEdge&); 00106 } ; 00107 00108 00109 // ********** BEGIN INLINE FUNCTIONS ********** 00110 // ********** END INLINE FUNCTIONS ********** 00111 00112 // ********** BEGIN FRIEND FUNCTIONS ********** 00113 // ********** END FRIEND FUNCTIONS ********** 00114 00115 // ********** BEGIN EXTERN FUNCTIONS ********** 00116 // ********** END EXTERN FUNCTIONS ********** 00117 00118 #endif 00119