cgma
BoundingBoxTool.hpp
Go to the documentation of this file.
00001 //- Class: BoundingBoxTool
00002 //- Description: Class for bounding boxes (primarily for "tight" bounding boxes)
00003 //- Owner: Steve Storm
00004 //- Created: 06-October-2000
00005 
00006 #ifndef BoundingBoxTool_HPP
00007 #define BoundingBoxTool_HPP
00008 
00009 #include "CubitDefines.h"
00010 #include "CGMGeomConfigure.h"
00011 #include "DLIList.hpp"
00012 #include "CubitVector.hpp"
00013 
00014 
00015 class Body;
00016 class GMem;
00017 class CubitVector;
00018 class RefEntity;
00019 class RefVolume;
00020 class RefEdge;
00021 class RefFace;
00022 class RefVertex;
00023 
00025 class CUBIT_GEOM_EXPORT BoundingBoxTool
00026 {
00027 
00028 public :   
00029 
00033    static CubitStatus get_tight_bounding_box( DLIList<RefEntity*> &ref_entity_list, 
00034                                        CubitVector &center,
00035                                        CubitVector axes[3],
00036                                        CubitVector &extension,
00037                                        double ang_facet_tol,
00038                                        double abs_facet_tol);
00039 
00042    static CubitStatus get_axis_bounding_box( DLIList<RefEntity*> &ref_entity_list, 
00043                                       CubitVector &center,
00044                                       CubitVector axes[3],
00045                                       CubitVector &extension );
00046 
00048    static CubitStatus get_corner_points( CubitVector &center,
00049                                   CubitVector axes[3],
00050                                   CubitVector &extension,
00051                                   CubitVector& p1, CubitVector& p2,
00052                                   CubitVector& p3, CubitVector& p4,
00053                                   CubitVector& p5, CubitVector& p6,
00054                                   CubitVector& p7, CubitVector& p8);
00055 
00060    static CubitBoolean get_use_triangles();
00061    static void set_use_triangles( CubitBoolean val );
00062 
00063    static int get_use_triangles_setting();
00064    static void set_use_triangles_setting( int val );
00065 
00074    //- tessellations are always used, even if this parameter is false.
00075    static CubitBoolean get_use_curves();
00076    static void set_use_curves( CubitBoolean val );
00077 
00078    static int get_use_curves_setting();
00079    static void set_use_curves_setting( int val );
00080 
00088    static CubitBoolean get_use_vertices();
00089    static void set_use_vertices( CubitBoolean val );
00090 
00091    static int get_use_vertices_setting();
00092    static void set_use_vertices_setting( int val );
00093 
00094  
00096    static void initialize_settings();
00097     
00098 protected :
00099    
00100    ~BoundingBoxTool();
00101    //- Destructor.
00102    
00103    BoundingBoxTool();
00104      //- Constructor for the BoundingBoxTool object
00105    
00106 private :
00107 
00108    static CubitStatus append_ref_entity_points( DLIList<RefEntity*> &ref_entity_list, 
00109                                          DLIList<CubitVector*> &vec_list,
00110                                          double ang_tol, double abs_tol);
00111    static CubitStatus append_body_points( DLIList<Body*> &body_list, 
00112                                    DLIList<CubitVector*> &vec_list,
00113                                    double ang_tol, double abs_tol );
00114    static CubitStatus append_volume_points( DLIList<RefVolume*> &vol_list, 
00115                                      DLIList<CubitVector*> &vec_list,
00116                                      double ang_tol, double abs_tol );
00117    static CubitStatus append_curve_points( DLIList<RefEdge*> &ref_edge_list, 
00118                                     DLIList<CubitVector*> &vec_list );
00119    static CubitStatus append_vertex_points( DLIList<RefVertex*> &ref_vertex_list, 
00120                                      DLIList<CubitVector*> &vec_list );
00121    static CubitStatus append_surface_points( DLIList<RefFace*> &ref_face_list, 
00122                                       DLIList<CubitVector*> &vec_list,
00123                                       double ang_tol, double abs_tol );
00124    //- The "append" functions allocate memory for the vectors which
00125    //- must be freed by the calling code.
00126 
00127    static CubitBoolean expand_groups_in_list( DLIList<RefEntity*> &ref_entity_list );
00128    
00129 
00130   static  CubitBoolean useTriangles;
00131   static  CubitBoolean useCurves;
00132   static  CubitBoolean useVertices;
00133 };
00134 
00135 
00136 
00137 #endif
00138 
00139 
00140 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines