cgma
PartitionLump.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : PartitionLump.hpp
00003 //
00004 // Purpose       : 
00005 //
00006 // Special Notes : 
00007 //
00008 // Creator       : Jason Kraftcheck
00009 //
00010 // Creation Date : 08/15/02
00011 //-------------------------------------------------------------------------
00012 #ifndef PARTITION_LUMP_HPP
00013 #define PARTITION_LUMP_HPP
00014 
00015 #include "DLIList.hpp"
00016 #include "Lump.hpp"
00017 #include "PartitionEntity.hpp"
00018 #include "PartitionShell.hpp"
00019 
00020 class PartitionBody;
00021 class PartitionSurface;
00022 class PartitionCurve;
00023 class PartitionPoint;
00024 
00025 class PartitionLump : public Lump, public PartitionEntity
00026 {
00027 
00028 public:
00029   friend class PartitionBody;
00030   
00031   PartitionLump( Lump* real_lump );
00032   PartitionLump( PartitionLump* split_from );
00033   virtual ~PartitionLump();
00034   
00035   Lump* real_lump() const;
00036   
00037   PartitionShell* first_shell() const;
00038   PartitionShell* next_shell( PartitionShell* after_this = 0 ) const;
00039   
00040   CubitStatus add( PartitionShell* shell );
00041   CubitStatus remove( PartitionShell* shell );
00042   void remove_all_shells();
00043   
00044   PartitionBody* get_body() const;
00045   TopologyBridge* find_parent_body() const;
00046   
00047   virtual CubitStatus save( CubitSimpleAttrib& );
00048   
00049   void get_parents_virt( DLIList<TopologyBridge*>& );
00050   void get_children_virt( DLIList<TopologyBridge*>& );
00051   int layer() const { return sub_entity_set().get_owner_layer(); }
00052   GeometryQueryEngine* get_geometry_query_engine() const;
00053   
00054   void append_simple_attribute_virt( const CubitSimpleAttrib& );
00055   void remove_simple_attribute_virt( const CubitSimpleAttrib& );
00056   void remove_all_simple_attribute_virt();
00057   CubitStatus get_simple_attribute( DLIList<CubitSimpleAttrib>& );
00058   CubitStatus get_simple_attribute( const CubitString& name,
00059                                     DLIList<CubitSimpleAttrib>& );
00060   
00061   CubitBox bounding_box() const;
00062   double measure();
00063   
00064   void reverse_sense();
00065   void transform(const CubitTransformMatrix&);
00066   
00067   //void print_debug_info( const char* prefix = 0 ) const;
00068   
00069   void notify_split( FacetEntity*, FacetEntity* );
00070   
00071   void get_all_children( DLIList<PartitionEntity*>& result );
00072   
00073   CubitStatus mass_properties( CubitVector& volume_centrioid,
00074                                double& volume );
00075   
00076   CubitPointContainment point_containment( const CubitVector& pos, double tolerance = -1);
00077  
00078 private:
00079 
00080   PartitionShell* listHead;
00081 };
00082 
00083 inline PartitionShell* PartitionLump::first_shell() const
00084   { return listHead; }
00085 
00086 inline PartitionShell* PartitionLump::next_shell( PartitionShell* prev ) const
00087   { return !prev ? listHead : (prev->myLump == this) ? prev->lumpNext : 0; }
00088 
00089 #endif
00090 
00091 
00092 
00093    
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines