cgma
TDOctreeRefEdge.hpp
Go to the documentation of this file.
00001 //- Class:       TDOctreeRefEdge
00002 //- Description: Tool data for storing additional information related to faceting edges
00003 //- Owner:       W. R. Quadors
00004 //- Checked by:
00005 //- Version:
00006 
00007 #ifndef TD_SKELETON_MREF_EDGE
00008 
00009 #define TD_SKELETON_MREF_EDGE
00010 
00011 #include "CubitDefines.h"
00012 #include "ToolData.hpp"
00013 #include "MemoryManager.hpp"
00014 #include "CastTo.hpp"
00015 #include "GMem.hpp"
00016 
00017 struct GPoint;
00018 class RefEdge;
00019 class CubitVector;
00020   
00021 class TDOctreeRefEdge : public ToolData
00022 {
00023 private:
00024     //static MemoryManager memoryManager;
00025     //- memory management object
00026 
00027   GMem *resultPointData;
00028   RefEdge *refEdge;
00029   CubitBoolean visit;
00030 
00031 public:
00032 
00033   TDOctreeRefEdge();
00034     //- constructor
00035 
00036   ~TDOctreeRefEdge();
00037     //- destructor
00038  
00039   inline CubitBoolean get_visit( void ){ return visit; }
00040   inline void set_visit( CubitBoolean type ){ visit = type; }
00041 
00042     // deletes all Gpoints in the list
00043   void clean_gpoint_list( void );
00044 
00045   void set_mref_edge( RefEdge *ptr_mref_edge ){ refEdge = ptr_mref_edge; } 
00046  
00047   static int is_td_skl_mref_edge(const ToolData* td){return (CAST_TO(const_cast<ToolData*>(td), TDOctreeRefEdge) != NULL);}
00048 
00049   GPoint *get_head_gpoint(){ return resultPointData->point_list(); }
00050     
00051   int get_gpoint_list_length( void ){ return resultPointData->pointListCount; }
00052 
00053     //SetDynamicMemoryAllocation(memoryManager)
00054     //- class specific new and delete operators
00055     
00056     // static void set_memory_allocation_increment(int increment = 0){memoryManager.set_memory_allocation_increment(increment);}
00057     //- set block memory size increment
00058   
00059     // static void destroy_memory(){memoryManager.destroy_memory();}
00060     //- destroy all memory allocted to this object
00061 
00062   static CubitStatus add_td( RefEdge *mref_edge );
00063   static TDOctreeRefEdge* get_td( RefEdge *mref_edge );
00064 
00065   static void decimate_curve_points_for_source_entity(GMem &point_data, double angle_tolerance, GMem& result_point_data);
00066   static CubitBoolean find_curve_curvature_using_three_points(CubitVector point_a, CubitVector point_b, CubitVector point_c, CubitVector &curvature );
00067 
00068   CubitBoolean generate_gpoint_list( double decimation_ang );
00069 };
00070     
00071 
00072 #endif // TD_SKELETON_MREF_EDGE
00073 
00074 
00075 //EOF
00076 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines