cgma
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 #ifndef MEDIALTOOL3D_HDR 00018 #define MEDIALTOOL3D_HDR 00019 00020 #include "DLIList.hpp" 00021 #include "CGMGeomConfigure.h" 00022 class RefVertex; 00023 class RefEdge; 00024 class RefFace; 00025 class RefVolume; 00026 00028 // Includes for when we really are compiling the medial stuff 00030 #ifdef USING_MEDIAL 00031 //--------- Medial Extractor 3D Includes ----------------------------- 00032 #include "medial/medial_util/MedialDefines.hpp" 00033 class Vec3D; 00034 class Triangle3D; 00035 class MedialVertex3D; 00036 class MedialEdge3D; 00037 class MedialFace3D; 00038 //---------- Cubit Includes ------------------------------------------ 00039 class CubitVector; 00040 #endif // USING_MEDIAL 00041 00042 class CUBIT_GEOM_EXPORT MedialTool3D 00043 { 00044 public: 00045 00047 MedialTool3D(RefVolume *ref_volume_ptr); 00048 00050 virtual ~MedialTool3D(); 00051 00057 CubitStatus create_medial_axis_3d( DLIList <RefVertex*> &medial_verts, 00058 DLIList <RefEdge*> &medial_edges, 00059 DLIList <RefFace*> &medial_faces, 00060 bool full_search, 00061 double cube_size, 00062 double accuracy, 00063 double min_ang_strong, 00064 double min_angle_diff_components); 00065 00066 private: 00067 00069 RefVolume *myRefVolume; 00070 00072 // Functions that gets compiled only when compiling the medial stuff 00074 #ifdef USING_MEDIAL 00075 00076 void convert_vec3d_to_cubitvector(Vec3D &my_vec3d, CubitVector &my_cubitvec); 00077 00079 void convert_cubitvector_to_vec3d(CubitVector &my_cubitvec, Vec3D &my_vec3d); 00080 00084 CubitStatus get_boundary_facets( Vec3DPArray &boundary_verts, 00085 Triangle3DPArray &boundary_facets); 00086 00088 void draw_medial_results( MedialVertex3DPArray &output_vertices, 00089 MedialEdge3DPArray &output_edges, 00090 MedialFace3DPArray &output_faces, 00091 int vert_color, int edge_color, int face_color); 00092 00094 void draw_medial_face(MedialFace3D* my_face, int tri_color); 00095 00096 #endif // USING_MEDIAL 00097 00098 }; 00099 #endif // MEDIALTOOL3D_HDR 00100