1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef __INTERPOLATIONOPTIONS_HXX__
20 #define __INTERPOLATIONOPTIONS_HXX__
23 namespace INTERP_KERNEL {
24 typedef enum { Triangulation, Convex, Geometric2D } IntersectionType;
25 /// Type describing the different ways in which the hexahedron can be split into tetrahedra.
26 /// The PLANAR_* policies persume that each face is to be considered planar, while the general
27 /// policies make no such hypothesis. The integer at the end gives the number of tetrahedra
28 /// that result from the split.
29 typedef enum { PLANAR_FACE_5 = 5, PLANAR_FACE_6 = 6, GENERAL_24 = 24, GENERAL_48 = 48 } SplittingPolicy;
32 class InterpolationOptions{
35 IntersectionType _intersection_type;
37 double _median_plane ;
39 double _bounding_box_adjustment ;
41 SplittingPolicy _splitting_policy ;
44 InterpolationOptions() { init(); }
45 int getPrintLevel() const { return _print_level; }
46 void setPrintLevel(int pl) { _print_level=pl; }
48 IntersectionType getIntersectionType() const { return InterpolationOptions::_intersection_type; }
49 void setIntersectionType(IntersectionType it) { InterpolationOptions::_intersection_type=it; }
51 double getPrecision() const { return InterpolationOptions::_precision; }
52 void setPrecision(double p) { InterpolationOptions::_precision=p; }
54 double getMedianPlane() { return InterpolationOptions::_median_plane; }
55 void setMedianPlane(double mp) { InterpolationOptions::_median_plane=mp; }
57 bool getDoRotate() { return InterpolationOptions::_do_rotate; }
58 void setDoRotate( bool dr) { InterpolationOptions::_do_rotate = dr; }
60 double getBoundingBoxAdjustment() { return InterpolationOptions::_bounding_box_adjustment; }
61 void setBoundingBoxAdjustment(double bba) { InterpolationOptions::_bounding_box_adjustment=bba; }
63 int getOrientation() { return InterpolationOptions::_orientation; }
64 void setOrientation(int o) { InterpolationOptions::_orientation=o; }
66 SplittingPolicy getSplittingPolicy() { return _splitting_policy; }
67 void setSplittingPolicy(SplittingPolicy sp) { _splitting_policy=sp; }
71 _intersection_type=Triangulation;
75 _bounding_box_adjustment=0.1;
77 _splitting_policy=GENERAL_48;