cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : PartitionEntity.hpp 00003 // 00004 // Purpose : Base class for partition entities 00005 // 00006 // Special Notes : 00007 // 00008 // Creator : Jason Kraftcheck 00009 // 00010 // Creation Date : 04/21/02 00011 //------------------------------------------------------------------------- 00012 00013 #ifndef PARTITION_ENTITY_HPP 00014 #define PARTITION_ENTITY_HPP 00015 00016 #include "SubEntitySet.hpp" 00017 #include "CubitBox.hpp" 00018 class FacetEntity; 00019 class CubitTransformMatrix; 00020 class CubitPoint; 00021 00022 class PartitionEntity 00023 { 00024 00025 public: 00026 00027 virtual ~PartitionEntity(); 00028 00029 TopologyBridge* partitioned_entity() const; 00030 00031 SubEntitySet& sub_entity_set() const; 00032 00033 virtual CubitStatus move_to_geometry( CubitVector& position ); 00034 00035 CubitStatus relax_to_geometry( CubitPoint* facet_point, 00036 const CubitVector* input_position = 0 ); 00037 00038 int mark; 00039 00040 virtual void print_debug_info( const char* prefix = 0, 00041 bool print_subentity_set = true ) const; 00042 void print_partitioned_entity( const char* prefix = 0 ) const; 00043 00044 virtual void transform(const CubitTransformMatrix& xform) = 0; 00045 00046 virtual void reverse_sense() = 0; 00047 00048 virtual void notify_split( FacetEntity* old_entity, 00049 FacetEntity* new_entity ) = 0; 00050 00051 virtual CubitStatus save( CubitSimpleAttrib& attrib ) = 0; 00052 00053 virtual CubitBox bounding_box() const = 0; // for abstracttree 00054 00055 protected: 00056 00057 PartitionEntity( ); 00058 00059 private: 00060 00061 // don't allow assignment (make assignment private) 00062 PartitionEntity( const PartitionEntity& ); 00063 void operator=( const PartitionEntity& ); 00064 00065 friend class SubEntitySet; 00066 00067 SubEntitySet* entitySet; 00068 PartitionEntity* entitySetNext; 00069 // These variables are set/cleared by SubEntitySet. 00070 // They are never modified directly by this class. 00071 00072 int entitySetId; 00073 // An ID in the SubEntitySet used for save and restore. 00074 }; 00075 00076 inline TopologyBridge* PartitionEntity::partitioned_entity() const 00077 { 00078 return entitySet->get_entity(); 00079 } 00080 00081 inline SubEntitySet& PartitionEntity::sub_entity_set() const 00082 { 00083 return *entitySet; 00084 } 00085 00086 #endif