cgma
RefVolume.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : RefVolume.hpp 
00003 //
00004 // Purpose       : This file contains the declarations of the class 
00005 //                 RefVolume.
00006 //
00007 // Special Notes : 
00008 //
00009 // Creator       : Malcolm J. Panthaki
00010 //
00011 // Creation Date : 07/11/96
00012 //
00013 // Owner         : Malcolm J. Panthaki
00014 //-------------------------------------------------------------------------
00015 
00016 #ifndef REFVOLUME_HPP
00017 #define REFVOLUME_HPP
00018 
00019 // ********** BEGIN STANDARD INCLUDES      **********
00020 // ********** END STANDARD INCLUDES        **********
00021 
00022 // ********** BEGIN MOTIF INCLUDES         **********
00023 // ********** END MOTIF INCLUDES           **********
00024 
00025 // ********** BEGIN OPEN INVENTOR INCLUDES **********
00026 // ********** END OPEN INVENTOR INCLUDES   **********
00027 
00028 // ********** BEGIN CUBIT INCLUDES         **********
00029 
00030 #include "CastTo.hpp"
00031 #include "BasicTopologyEntity.hpp"
00032 #include "Lump.hpp"
00033 // lists
00034 #include "DLIList.hpp"
00035 // ********** END CUBIT INCLUDES           **********
00036 
00037 // ********** BEGIN MACRO DEFINITIONS      **********
00038 // ********** END MACRO DEFINITIONS        **********
00039 
00040 // ********** BEGIN ENUM DECLARATIONS      **********
00041 // ********** END ENUM DECLARATIONS        **********
00042 
00043 // ********** BEGIN FORWARD DECLARATIONS   **********
00044 
00045 // ********** END FORWARD DECLARATIONS     **********
00046 
00048 class CUBIT_GEOM_EXPORT RefVolume : public BasicTopologyEntity
00049 {
00050 public :
00051   
00052   typedef RefFace ChildType;
00053   typedef Body ParentType;
00054 
00055   friend class RefEntityFactory;
00056     //- the factory is allowed to call the (private) constructors
00057 
00058     /* constructors/destructors */
00059 
00060   virtual ~RefVolume() ;
00061     //- The destructor
00062 
00063     /* topology */
00064 
00066   DagType dag_type() const { return DagType::ref_volume_type(); }  
00067 
00069   const std::type_info& entity_type_info() const { return typeid(RefVolume); }
00070 
00071   void get_parent_ref_entities(DLIList<RefEntity*>& entity_list);
00072 
00074   static const char* get_class_name()
00075   {
00076     return "Volume";
00077   }
00078 
00080   virtual const char* class_name() const
00081   {
00082     return get_class_name();
00083   }
00084   
00086   Lump* get_lump_ptr() ;
00087 
00093   Lump const* get_lump_ptr() const ;
00094 
00096   Body* get_body_ptr() ;
00097 
00101   int num_boundary_components();
00102 
00112   CubitBoolean about_spatially_equal ( RefVolume* ref_vol_ptr_2,
00113                                        double tolerance_factor);
00114 
00118   int genus();
00119 
00120     /* geometry */
00121 
00123   virtual CubitVector center_point();
00124   
00126   CubitBoolean is_sheet();
00127   
00128 //**********Graphics Related Functions**********//
00129 
00131   virtual int dimension() const; 
00132 
00133     /* other functions */
00134 
00135   virtual CubitString measure_label();
00136 
00138 
00139   CubitStatus mass_properties( CubitVector &centroid, double &volume );
00140   CubitStatus mass_properties( CubitVector principal_axes[3], 
00141                                CubitVector &principal_moments, 
00142                                CubitVector &centroid, 
00143                                double &volume );
00145 
00147   int validate();
00148 
00149 protected:
00150 
00151   RefVolume(Lump* lumpPtr) ;
00152     //- The constructor with a pointer to a Lump.
00153 
00154 private:
00155 
00156    void initialize();
00157    //- Initializes all the member data
00158 
00159 
00160   RefVolume( const RefVolume& );
00161   void operator=( const RefVolume& );
00162 };
00163 
00164 template <> struct DLIListSorter<RefVolume*>
00165 {
00166   bool operator()(RefVolume* a, RefVolume* b) { return a->id() < b->id(); }
00167 };
00168 
00169 #endif
00170 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines