cgma
PartitionShell.hpp
Go to the documentation of this file.
00001 #ifndef PARTITION_SHELL_HPP
00002 #define PARTITION_SHELL_HPP
00003 
00004 #include "ShellSM.hpp"
00005 #include "PartitionCoSurf.hpp"
00006 
00007 class PartitionSurface;
00008 class PartitionLump;
00009 class CubitVector;
00010 
00011 class PartitionShell : public ShellSM
00012 {
00013 friend class PartitionLump;
00014 
00015 public:
00016   
00017   PartitionShell( );
00018   virtual ~PartitionShell();
00019   
00020   PartitionLump* get_lump() const;
00021   
00022   PartitionCoSurf* next_co_surface( const PartitionCoSurf* prev = 0 ) const;
00023   
00024   CubitStatus add( PartitionCoSurf* cosurf );
00025   CubitStatus remove( PartitionCoSurf* cosurf );
00026   
00027   PartitionCoSurf* add( PartitionSurface* surf, CubitSense sense );
00028     // create a CoSurf
00029   PartitionCoSurf* find_first( const PartitionSurface* surface ) const;
00030     // find first CoSurf with the passed surface
00031   PartitionCoSurf* find_next( const PartitionCoSurf* cosurf ) const;
00032     // find next CoSurf with the same surface
00033   CubitSense find_sense( const PartitionSurface* surface ) const;
00034     // returns CUBIT_UNKNOWN if multiple CoSurfs
00035   void remove_all_surfaces( DLIList<PartitionSurface*>* removed = 0 );
00036   
00037   void get_parents_virt( DLIList<TopologyBridge*>& parents );
00038   void get_children_virt( DLIList<TopologyBridge*>& children );
00039   int layer() const;
00040   GeometryQueryEngine* get_geometry_query_engine() const;
00041   
00042   void append_simple_attribute_virt( const CubitSimpleAttrib&  );
00043   void remove_simple_attribute_virt( const CubitSimpleAttrib&  );
00044   void remove_all_simple_attribute_virt();
00045   CubitStatus get_simple_attribute( DLIList<CubitSimpleAttrib>& );
00046   CubitStatus get_simple_attribute( const CubitString&,
00047                                     DLIList<CubitSimpleAttrib>& );
00048   
00049   void print_debug_info( const char* prefix = 0 ) const;
00050   
00051   CubitPointContainment point_containment( const CubitVector& pt );
00052   
00053   bool is_nonmanifold( PartitionSurface* surface ) const;
00054   
00055   CubitStatus mass_properties( CubitVector& centroid, double& volume );
00056   
00057 private:
00058 
00059   PartitionLump* myLump;
00060   PartitionShell* lumpNext;
00061   
00062   PartitionCoSurf* firstCoSurf;
00063 };
00064 
00065 inline PartitionLump* PartitionShell::get_lump() const
00066   { return myLump; }
00067 
00068 inline PartitionCoSurf* 
00069 PartitionShell::next_co_surface( const PartitionCoSurf* prev ) const
00070   { return !prev ? firstCoSurf : prev->myShell == this ? prev->shellNext : 0; }
00071 
00072 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines