cgma
ChollaPoint.hpp
Go to the documentation of this file.
00001 //- Class: ChollaPoint
00002 //- Owner: Steven J. Owen
00003 //- Description: Maintains a list of mesh.  This is used to store
00004 //-        the exterior skin while creating a geometry from a mesh.
00005 //- Created: 4/27/01
00006 //- Checked By:
00007 //- Version:
00008 
00009 #ifndef ChollaPoint_HPP
00010 #define ChollaPoint_HPP
00011 
00012 #include "DLIList.hpp"
00013 #include "ChollaEntity.hpp"
00014 
00015 class Curve;
00016 class FacetEntity;
00017 class ChollaCurve;
00018 class ChollaSurface;
00019 class ChollaVolume;
00020 
00021 class ChollaPoint : public ChollaEntity
00022 {
00023 private:
00024 
00025   DLIList<ChollaCurve*> curveList;
00026   FacetEntity *myCubitPoint;
00027   void *myPoint;
00028   int id;
00029   ChollaPoint *myMergePartner;
00030 
00031 public:
00032 
00033   ChollaPoint( );
00034     //- default constructor
00035 
00036   ~ChollaPoint();
00037     // destructor
00038 
00039   void add_facet(FacetEntity *exterior_node)
00040   { myCubitPoint = exterior_node; }
00041     //- define the node associated with this point
00042 
00043   void remove_facet( void )
00044   {myCubitPoint = NULL;}
00045    //- sets myCubitPoint to NULL
00046 
00047   void remove_facet( FacetEntity *facet_pnt )
00048   {if( myCubitPoint == facet_pnt ) myCubitPoint = NULL;}
00049    //- sets myCubitPoint to NULL only if specified facet_pnt matches with myCubitPoint
00050 
00051 
00052   FacetEntity *get_facets()
00053     {return myCubitPoint;}
00054     //- get the point
00055 
00056   void add_curve( ChollaCurve *fcm_ptr )
00057     {curveList.append_unique( fcm_ptr );}
00058     //- associate a curve with this point
00059 
00060   inline void remove_curve( ChollaCurve *fcm_ptr )
00061   { curveList.remove( fcm_ptr ); }
00062   //- removes a curve attached with it
00063 
00064   DLIList<ChollaCurve*> &get_curves()
00065     {return curveList;}
00066     //- get the list of curves attached to this point
00067 
00068   DLIList<ChollaCurve*> *get_curve_list_ptr()
00069     {return &curveList;}
00070     //- get the pointer to the list of curves
00071 
00072   void assign_geometric_point(void *point)
00073     {myPoint = point;}
00074     //- set the geometric point associated with the ChollaPoint
00075 
00076   void* get_geometric_point()
00077     {return myPoint;}
00078     //- return the geometric point associated with the ChollaPoint
00079 
00080   int get_id(){return id;}
00081 
00082   void get_surfaces(DLIList<ChollaSurface *> &surf_list);
00083     //- get list of associated cholla surfaces
00084   
00085   CubitBoolean is_in_curve( ChollaCurve *chcurve );
00086     // return whether this point is in the given curve
00087 
00088   CubitBoolean is_in_surface( ChollaSurface *cholla_surf );
00089     // return whether this point is in the given surface
00090 
00091   CubitBoolean is_in_volume( ChollaVolume *cholla_vol );
00092     // return whether this point is in the given volume
00093   
00094   CubitStatus verify_curves();
00095     //- verify that all curves at this point have this point as an adjacency
00096 
00097   ChollaPoint *merge_partner(){ return myMergePartner; }
00098 
00099   void set_merge_partner( ChollaPoint *merge_partner )
00100     { myMergePartner = merge_partner;}  
00101 
00102 
00103 };
00104 
00105 template <> struct DLIListSorter<ChollaPoint*>
00106 {
00107   bool operator()(ChollaPoint* a, ChollaPoint* b) { return a->get_id() < b->get_id(); }
00108 };
00109 
00110 #endif
00111 
00112 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines