0023024: Update headers of OCCT files
[occt.git] / src / StepGeom / StepGeom_CartesianTransformationOperator.cxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
7 //
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10 //
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
17
18 #include <StepGeom_CartesianTransformationOperator.ixx>
19
20
21 StepGeom_CartesianTransformationOperator::StepGeom_CartesianTransformationOperator ()  {}
22
23 void StepGeom_CartesianTransformationOperator::Init(
24         const Handle(TCollection_HAsciiString)& aName)
25 {
26
27         StepRepr_RepresentationItem::Init(aName);
28 }
29
30 void StepGeom_CartesianTransformationOperator::Init(
31         const Handle(TCollection_HAsciiString)& aName,
32         const Standard_Boolean hasAaxis1,
33         const Handle(StepGeom_Direction)& aAxis1,
34         const Standard_Boolean hasAaxis2,
35         const Handle(StepGeom_Direction)& aAxis2,
36         const Handle(StepGeom_CartesianPoint)& aLocalOrigin,
37         const Standard_Boolean hasAscale,
38         const Standard_Real aScale)
39 {
40         // --- classe own fields ---
41         hasAxis1 = hasAaxis1;
42         axis1 = aAxis1;
43         hasAxis2 = hasAaxis2;
44         axis2 = aAxis2;
45         localOrigin = aLocalOrigin;
46         hasScale = hasAscale;
47         scale = aScale;
48         // --- classe inherited fields ---
49         StepRepr_RepresentationItem::Init(aName);
50 }
51
52
53 void StepGeom_CartesianTransformationOperator::SetAxis1(const Handle(StepGeom_Direction)& aAxis1)
54 {
55         axis1 = aAxis1;
56         hasAxis1 = Standard_True;
57 }
58
59 void StepGeom_CartesianTransformationOperator::UnSetAxis1()
60 {
61         hasAxis1 = Standard_False;
62         axis1.Nullify();
63 }
64
65 Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis1() const
66 {
67         return axis1;
68 }
69
70 Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis1() const
71 {
72         return hasAxis1;
73 }
74
75 void StepGeom_CartesianTransformationOperator::SetAxis2(const Handle(StepGeom_Direction)& aAxis2)
76 {
77         axis2 = aAxis2;
78         hasAxis2 = Standard_True;
79 }
80
81 void StepGeom_CartesianTransformationOperator::UnSetAxis2()
82 {
83         hasAxis2 = Standard_False;
84         axis2.Nullify();
85 }
86
87 Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis2() const
88 {
89         return axis2;
90 }
91
92 Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis2() const
93 {
94         return hasAxis2;
95 }
96
97 void StepGeom_CartesianTransformationOperator::SetLocalOrigin(const Handle(StepGeom_CartesianPoint)& aLocalOrigin)
98 {
99         localOrigin = aLocalOrigin;
100 }
101
102 Handle(StepGeom_CartesianPoint) StepGeom_CartesianTransformationOperator::LocalOrigin() const
103 {
104         return localOrigin;
105 }
106
107 void StepGeom_CartesianTransformationOperator::SetScale(const Standard_Real aScale)
108 {
109         scale = aScale;
110         hasScale = Standard_True;
111 }
112
113 void StepGeom_CartesianTransformationOperator::UnSetScale()
114 {
115         hasScale = Standard_False;
116 }
117
118 Standard_Real StepGeom_CartesianTransformationOperator::Scale() const
119 {
120         return scale;
121 }
122
123 Standard_Boolean StepGeom_CartesianTransformationOperator::HasScale() const
124 {
125         return hasScale;
126 }