Salome HOME
Merge from BR_V5_DEV 16Feb09
[tools/medcoupling.git] / src / INTERP_KERNEL / Interpolation3DSurf.txx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __INTERPOLATION3DSURF_TXX__
20 #define __INTERPOLATION3DSURF_TXX__
21
22 #include "Interpolation3DSurf.hxx"
23 #include "InterpolationPlanar.txx"
24
25 namespace INTERP_KERNEL
26 {
27   const double Interpolation3DSurf::DFT_MEDIAN_PLANE=0.5;
28   const double Interpolation3DSurf::DFT_SURF3D_ADJ_EPS=1e-4;
29   
30   Interpolation3DSurf::Interpolation3DSurf():_do_rotate(true)
31                                             ,_median_plane(DFT_MEDIAN_PLANE)
32                                             ,_surf_3D_adjustment_eps(DFT_SURF3D_ADJ_EPS)
33   {
34   }
35
36   Interpolation3DSurf::Interpolation3DSurf(const InterpolationOptions& io):InterpolationPlanar<Interpolation3DSurf>(io)
37   {
38   }
39
40   
41   /**
42      \brief  Function used to set the options for the intersection calculation
43      \details The following options can be modified:
44      -# Intersection_type: the type of algorithm to be used in the computation of the cell-cell intersections.
45      - Values: Triangle, Convex.
46      - Default: Triangle.
47      -# MedianPlane: Position of the median plane where both cells will be projected
48      - Values: between 0 and 1.
49      - Default: 0.5.
50      -# DoRotate: rotate the coordinate system such that the target cell is in the Oxy plane.
51      - Values: true (necessarilly if Intersection_type=Triangle), false.
52      - Default: true (as default Intersection_type=Triangle)
53      -# Precision: Level of precision of the computations is precision times the characteristic size of the mesh.
54      - Values: positive real number.
55      - Default: 1.0E-12.
56      -# PrintLevel: Level of verboseness during the computations.
57      - Values: interger between 0 and 3.
58      - Default: 0.
59   */
60   void Interpolation3DSurf::setOptions(double precision, int printLevel, double medianPlane, 
61                                        IntersectionType intersectionType, bool doRotate, int orientation)
62   {
63     InterpolationPlanar<Interpolation3DSurf>::setOptions(precision,printLevel,intersectionType, orientation);
64     _do_rotate=doRotate;
65     _median_plane=medianPlane;
66   }
67 }
68
69 #endif