Salome HOME
68a458b409a56cfb304c1e83a5f9b7cd2a667fd7
[modules/gui.git] / src / OCCViewer / OCCViewer_ClipPlane.cxx
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #include "OCCViewer_ClipPlane.h"
24
25 #include <gp_Pln.hxx>
26
27 /*!
28   Constructor of class OrientedPlane
29  */
30 OrientedPlane::OrientedPlane():
31   Orientation (0),
32   Distance (0.5),
33   Rotation1 (0),
34   Rotation2 (0)
35 {
36 }
37
38 /*!
39   Operator of another OrientedPlane  assignment.
40   @param   other the OrientedPlane to assign.
41   @return  the assigned OrientedPlane.
42 */
43 OrientedPlane& OrientedPlane::operator = ( const OrientedPlane& other )
44 {
45   Orientation = other.Orientation;
46   Distance = other.Distance;
47   Rotation1 = other.Rotation1;
48   Rotation2 = other.Rotation2;
49   return *this;
50 }
51
52 OCCViewer_ClipPlane::OCCViewer_ClipPlane() :
53   RelativeMode(),
54   X (0.0), Y (0.0), Z (0.0),
55   Dx(1.0), Dy(1.0), Dz(1.0),
56   Orientation (0),
57   IsInvert (false),
58   PlaneMode (Absolute),
59   IsOn(true)
60 {
61 }
62
63 /*!
64   Operator of another OCCViewer_ClipPlane assignment.
65   @param   other the OCCViewer_ClipPlane to assign.
66   @return  the assigned OCCViewer_ClipPlane.
67 */
68 OCCViewer_ClipPlane& OCCViewer_ClipPlane::operator = ( const OCCViewer_ClipPlane& other )
69 {
70   RelativeMode = other.RelativeMode;
71   X = other.X;
72   Y = other.Y;  
73   Z = other.Z;
74   Dx = other.Dx;
75   Dy = other.Dy;
76   Dz = other.Dz;
77   Orientation = other.Orientation;
78   IsInvert = other.IsInvert;
79   PlaneMode = other.PlaneMode;
80   IsOn = other.IsOn;
81   return *this;
82 }