cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : GeometryEntity.hpp 00003 // 00004 // Purpose : This file contains the declarations of the base class 00005 // GeometryEntity. This is the root of the class hierarchy 00006 // the encapsulates all geometry information attached to 00007 // topological entities. The topological entities are 00008 // independent of their underlying geometric representation. 00009 // 00010 // Special Notes : 00011 // 00012 // Creator : Xuechen Liu 00013 // 00014 // Creation Date : 07/11/96 00015 // 00016 // Owner : Malcolm J. Panthaki 00017 //------------------------------------------------------------------------- 00018 00019 #ifndef GEOMETRY_ENTITY_HPP 00020 #define GEOMETRY_ENTITY_HPP 00021 00022 // ********** BEGIN STANDARD INCLUDES ********** 00023 // ********** END STANDARD INCLUDES ********** 00024 00025 // ********** BEGIN CUBIT INCLUDES ********** 00026 #include "TopologyBridge.hpp" 00027 #include "GeometryDefines.h" 00028 #include "CubitBox.hpp" 00029 #include "CubitObservable.hpp" 00030 // ********** END CUBIT INCLUDES ********** 00031 00032 // ********** BEGIN MACROS DEFINITIONS ********** 00033 // ********** END MACROS DEFINITIONS ********** 00034 00035 // ********** BEGIN FORWARD DECLARATIONS ********** 00036 class TopologyEntity ; 00037 template <class X> class DLIList; 00038 class GeometryQueryEngine ; 00039 // ********** END FORWARD DECLARATIONS ********** 00040 00041 // ********** BEGIN ENUM DEFINITIONS ********** 00042 // ********** END ENUM DEFINITIONS ********** 00043 00044 class CUBIT_GEOM_EXPORT GeometryEntity : public TopologyBridge 00045 { 00046 public : 00047 00048 GeometryEntity() : myId(0) {} 00049 //- The default constructor 00050 00051 virtual ~GeometryEntity(); 00052 //- The destructor 00053 //- The destructor is made pure virtual to prevent instantiation 00054 //- of this class. 00055 00056 virtual CubitBox bounding_box() const = 0; 00057 00058 virtual double measure() = 0; 00059 //R double 00060 //R- The numeric value of the measure (its units depend on the dimension 00061 //R- of the RefEntity being "measured") 00062 //- A generic geometric extent function. 00063 //- Returns volume for Lump, area for Surface, length for Curve and 00064 //- 1.0 for Point 00065 00066 virtual GeometryType geometry_type() = 0; 00067 //R GeometryType (enum) 00068 //R- The enumerated type of the geometric representation 00069 //- Returns the type of geometric representation, e.g. 00070 //- STRAIGHT_CURVE_TYPE, SPHERE_SURFACE_TYPE, etc 00071 00072 int get_saved_id() const { return myId; } 00073 void set_saved_id( int value ) { myId = value; } 00074 00075 void get_saved_names( std::vector<CubitString> &names ); 00076 void set_saved_names( const std::vector<CubitString>& names ); 00077 00078 protected: 00079 private: 00080 00081 int myId; 00082 std::vector<CubitString> myNames; 00083 00084 }; 00085 00086 // ********** BEGIN HELPER CLASSES ********** 00087 // ********** END HELPER CLASSES ********** 00088 00089 // ********** BEGIN INLINE FUNCTIONS ********** 00090 // ********** END INLINE FUNCTIONS ********** 00091 00092 // ********** BEGIN FRIEND FUNCTIONS ********** 00093 // ********** END FRIEND FUNCTIONS ********** 00094 00095 // ********** BEGIN EXTERN FUNCTIONS ********** 00096 // ********** END EXTERN FUNCTIONS ********** 00097 00098 #endif 00099