cgma
RefVertex.hpp
Go to the documentation of this file.
00001 #ifndef REF_VERTEX_HPP
00002 #define REF_VERTEX_HPP
00003 
00004 #include "BasicTopologyEntity.hpp"
00005 
00006 class RefVolume;
00007 class RefFace;
00008 class TBPoint;
00009 
00010 class CUBIT_GEOM_EXPORT RefVertex : public BasicTopologyEntity
00011 {
00012 public :
00013 
00014   typedef RefEdge ParentType;
00015   
00016   friend class RefEntityFactory;
00017     //- the factory is allowed to call the (private) constructors
00018 
00019   virtual ~RefVertex() ;
00020     //- The destructor
00021 
00022   static const char* get_class_name()
00023      {
00024        return "Vertex";
00025      }
00026 
00027   virtual const char* class_name() const
00028      {
00029        return get_class_name();
00030      }
00031   
00032   DagType dag_type() const { return DagType::ref_vertex_type(); }
00033   const std::type_info& entity_type_info() const { return typeid(RefVertex); }
00034   
00035   TBPoint* get_point_ptr() ;
00036   TBPoint const* get_point_ptr() const ;
00037     //R TBPoint*
00038     //R- A pointer to the TBPoint to which the current 
00039     //R- vertex points. 
00040     //- This function returns a pointer to the TBPoint
00041     //- which the current vertex points to.
00042 
00043   CubitVector coordinates () const;
00044     //R CubitVector
00045     //R- Contains the coordinate values {x y z} of this RefVertex
00046     //- Returns the spatial coordinates of this RefVertex.
00047 
00048   virtual CubitVector center_point();
00049     //- Return the "center" of this RefVertex (its coordinates)
00050 
00051   virtual int dimension() const
00052       { return 0; }
00053     //- returns the geometric dimension of RefVertex'es. 
00054 
00055   void get_parent_ref_entities(DLIList<RefEntity*>& entity_list);
00056 
00057    //int number_mesh_elements(int dimension = -1,
00058    //                        ElementType type = INVALID_ELEMENT_TYPE);
00059     //- Returns number of mesh entities owned by this geometry entity
00060     //- of the specified dimension. If dimension == -1, the highest 
00061     //- dimension elements are returned.
00062 
00063   void common_ref_edges( RefVertex *other_vertex,
00064                          DLIList <RefEdge*> &common_ref_edges,
00065                          RefFace *owning_face = NULL );
00066     //- returns all the common edges between this and the other vertex.
00067     //- It is possible for two vertices to be shared by more than
00068     //- one refedge on a surface.  Use this function rather than
00069     //- the next for robustness.
00070     //- The common edges must have this vertex and other_vertex as its
00071     //- start and end vertices.
00072 
00073   RefEdge *common_ref_edge(RefVertex *other_vertex, 
00074                            RefFace *owning_face = NULL);
00075     //- returns an edge sharing the other vertex and owned by owning_face 
00076     //- (if non-NULL)
00077     //- The edge must have this vertex and other_vertex as its
00078     //- start and end vertices.
00079 
00080   CubitBoolean about_spatially_equal( RefVertex* ref_vertex_ptr_2,
00081                                       double tolerance_factor = 1.0,
00082                                       CubitBoolean notify_ref_entity =
00083                                       CUBIT_FALSE );
00084     //R-CUBIT_TRUE/CUBIT_FALSE
00085     //I RefVertex*, double, CubitBoolean
00086     //I- Second RefVertex to compare, Tolerance factor to for GEOMETRY_RESABS,
00087     //I- and flag for notifying compared RefEntities.
00088     //O CubitBoolean
00089     //O- if the two vertices are spatially equal within the GEOMETRY_RESABS*
00090     //-the tolerance_factor, then CUBIT_TRUE will be returned.  Otherwise
00091     //-CUBIT_FALSE is returned.
00092 
00093 protected :
00094 
00095   RefVertex(TBPoint* pointPtr) ;
00096     //- Contructor: Sets up a reference vertex from a TBPoint
00097 
00098 private :
00099 
00100   void initialize();
00101     //- Initializes all member data
00102 
00103   RefVertex( const RefVertex& );
00104   void operator=( const RefVertex& );
00105 
00106 };
00107 
00108 // ********** BEGIN HELPER CLASSES         **********
00109 // ********** END   HELPER CLASSES         **********
00110 
00111 // ********** BEGIN INLINE FUNCTIONS       **********
00112 // ********** END INLINE FUNCTIONS         **********
00113  
00114 // ********** BEGIN FRIEND FUNCTIONS       **********
00115 // ********** END FRIEND FUNCTIONS         **********
00116  
00117 // ********** BEGIN EXTERN FUNCTIONS       **********
00118 // ********** END EXTERN FUNCTIONS         **********
00119 
00120 template <> struct DLIListSorter<RefVertex*>
00121 {
00122   bool operator()(RefVertex* a, RefVertex* b) { return a->id() < b->id(); }
00123 };
00124 
00125 #endif
00126 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines