cgma
|
00001 //----------------------------------------------------------------------------- 00002 // 00003 // File: CubitFacetEdgeData.hpp 00004 // 00005 // Purpose: Child class of CubitFacetEdge. It is the Cubit-specific version of 00006 // of the CubitFacetEdge. 00007 // 00008 // Notes: Note that this class contains data which is accessed 00009 // virtually from CubitFacetEdge. In most cases, you can create 00010 // a CubitFacetEdgeData and treat it as if it is a CubitFacetEdge. 00011 // For example: 00012 // CubitFacetEdge *cfe = (CubitFacetEdge *) new CubitFacetEdgeData(...); 00013 // There should be no reason to reference the CubitFacetEdgeData 00014 // directly. This is done to allow different data representations 00015 // of a facet edge in addition to that used by Cubit. 00016 // 00017 //----------------------------------------------------------------------------- 00018 00019 #ifndef CUBITFACETEDGEDATA_HPP 00020 #define CUBITFACETEDGEDATA_HPP 00021 00022 // Include for CubitBoolean 00023 #include "CubitDefines.h" 00024 #include "CubitPoint.hpp" 00025 #include "DLIList.hpp" 00026 #include "CubitFacetEdge.hpp" 00027 00028 class CubitVector; 00029 class CubitFacet; 00030 class CubitPoint; 00031 00032 class CubitFacetEdgeData : public CubitFacetEdge 00033 { 00034 private: 00035 CubitPoint *pointArray[2]; 00036 DLIList<CubitFacet *> adjFacetList; 00037 int entityId; 00038 //- for debug tracking... 00039 public: 00040 CubitFacetEdgeData(CubitPoint *p1, CubitPoint *p2); 00041 CubitFacetEdgeData(CubitPoint *p1, CubitPoint *p2, 00042 CubitFacet *facet1, CubitFacet *facet2, 00043 int edge_index1, int edge_index2); 00044 //- constructors 00045 ~CubitFacetEdgeData(); 00046 //- destructor 00047 int id(){return entityId;} 00048 void set_id( int ent_id ) {entityId=ent_id;}; 00049 00050 CubitPoint *point( int index) { return pointArray[index]; }; 00051 CubitPoint *start_node() { return point(0); } 00052 CubitPoint *end_node() { return point(1); } 00053 //- get one of its points 00054 void set_point( CubitPoint *pt, int index ) { pointArray[index] = pt; } 00055 //- set one of the points 00056 CubitFacet *adj_facet( int index ); 00057 //- get the list of adjacent facets 00058 void facets(DLIList<CubitFacet*> &facet_list ); 00059 00060 void edges(DLIList<CubitFacetEdge*> &edge_list ); 00061 void points(DLIList<CubitPoint*> &point_list ); 00062 int num_adj_facets() 00063 { return adjFacetList.size(); } 00064 int number_tris() { return num_adj_facets(); } 00065 void marked (int my_flag ) { set_flag(my_flag); } 00066 int marked() { return get_flag(); } 00067 00068 void add_facet(CubitFacet *facet_ptr){ adjFacetList.append(facet_ptr); } 00069 CubitStatus remove_facet( CubitFacet *facet_ptr ); 00070 00071 CubitStatus merge_edges( CubitFacetEdgeData* other_edge ); 00072 00073 void flip(); 00074 00075 }; 00076 00077 00078 #endif 00079 00080