cgma
GeoNode.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : GeoNode.hpp
00003 //
00004 // Purpose       : Node class used for geometry operations.  See also GeoTet.
00005 //
00006 // Description   : light-weight entity used for computational geometry 
00007 //                 tools.  Don't load this up with extra stuff!
00008 //
00009 // Creator       : Steve Owen
00010 //
00011 // Creation Date : 8/13/2003
00012 //
00013 // Owner         : Steve Owen
00014 //-------------------------------------------------------------------------
00015 
00016 #ifndef GEONODE_HPP
00017 #define GEONODE_HPP
00018 
00019 #include "MemoryManager.hpp"
00020 #include "ToolDataUser.hpp"
00021 #include "CubitVector.hpp"
00022 #include "DLIList.hpp"
00023 
00024 class GeoTet;
00025 
00026 class GeoNode: public ToolDataUser
00027 {
00028 private:
00029 
00030   CubitVector mLocation;
00031     // the location of the node
00032 
00033   DLIList<GeoTet *> mTetList;
00034     // adjacent tets to this node
00035 
00036   void *ownerPtr;
00037     // generic owner pointer
00038 
00039   int isMarked;
00040 
00041   static MemoryManager memoryManager;
00042     //- memory management object
00043 
00044 public:
00045 
00046   GeoNode( CubitVector &xx );
00047     //- constructor
00048 
00049   ~GeoNode();
00050     //- destructor
00051 
00052   CubitVector coordinates()
00053     {return mLocation;}
00054     //- get location of this node
00055 
00056   void set_coordinates( CubitVector &coords )
00057     { mLocation = coords; }
00058     //- set coordinate location
00059 
00060   int number_tets()
00061     {return mTetList.size();}
00062     //- return number of tets attached to this node.
00063 
00064   void add_element( GeoTet *tet_ptr, int = CUBIT_TRUE)
00065     { mTetList.append(tet_ptr); }
00066     //- add a tet to the adjacency list
00067 
00068   void remove_element( GeoTet *tet_ptr )
00069     { mTetList.remove(tet_ptr); }
00070     //- remove tet from the adjacency list
00071 
00072   DLIList<GeoTet*> *tet_list()
00073     { return &mTetList; }
00074     //- get the pointer to the tet list
00075 
00076   void *get_owner() {return ownerPtr;}
00077   void set_owner( void *owner_ptr ) {ownerPtr = owner_ptr;}
00078     //- get and set the generic owner pointer
00079 
00080   void marked( int flag ) { isMarked = flag; }
00081   int marked() { return isMarked; }
00082     //- get and set the marked flag
00083 
00084   CubitBoolean edge_between( GeoNode *other_node );
00085     //- returns whether an edge exists between the two GeoNodes
00086 
00087   CubitBoolean face_between( GeoNode *other_node0, GeoNode *other_node1 );
00088     //- returns whether a face exists between the three GeoNodes
00089 
00090   int tets_at_edge( GeoNode *other_node,                 
00091                     DLIList<GeoTet *> &gtet_list );
00092     //- get a list of tets shared by the two nodes
00093     //- returns number of tets in list
00094 
00095   int interior_edges( DLIList <GeoNode *> &node_list );
00096     //- get a list of opposite geonodes to this node
00097     //- don't return nodes that are external to the domain
00098 
00099 };
00100 
00101 #endif
00102 
00103 // EOF
00104 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines