973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #include <StepGeom_CartesianTransformationOperator.ixx> |
15 | |
16 | |
17 | StepGeom_CartesianTransformationOperator::StepGeom_CartesianTransformationOperator () {} |
18 | |
19 | void StepGeom_CartesianTransformationOperator::Init( |
20 | const Handle(TCollection_HAsciiString)& aName) |
21 | { |
22 | |
23 | StepRepr_RepresentationItem::Init(aName); |
24 | } |
25 | |
26 | void StepGeom_CartesianTransformationOperator::Init( |
27 | const Handle(TCollection_HAsciiString)& aName, |
28 | const Standard_Boolean hasAaxis1, |
29 | const Handle(StepGeom_Direction)& aAxis1, |
30 | const Standard_Boolean hasAaxis2, |
31 | const Handle(StepGeom_Direction)& aAxis2, |
32 | const Handle(StepGeom_CartesianPoint)& aLocalOrigin, |
33 | const Standard_Boolean hasAscale, |
34 | const Standard_Real aScale) |
35 | { |
36 | // --- classe own fields --- |
37 | hasAxis1 = hasAaxis1; |
38 | axis1 = aAxis1; |
39 | hasAxis2 = hasAaxis2; |
40 | axis2 = aAxis2; |
41 | localOrigin = aLocalOrigin; |
42 | hasScale = hasAscale; |
43 | scale = aScale; |
44 | // --- classe inherited fields --- |
45 | StepRepr_RepresentationItem::Init(aName); |
46 | } |
47 | |
48 | |
49 | void StepGeom_CartesianTransformationOperator::SetAxis1(const Handle(StepGeom_Direction)& aAxis1) |
50 | { |
51 | axis1 = aAxis1; |
52 | hasAxis1 = Standard_True; |
53 | } |
54 | |
55 | void StepGeom_CartesianTransformationOperator::UnSetAxis1() |
56 | { |
57 | hasAxis1 = Standard_False; |
58 | axis1.Nullify(); |
59 | } |
60 | |
61 | Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis1() const |
62 | { |
63 | return axis1; |
64 | } |
65 | |
66 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis1() const |
67 | { |
68 | return hasAxis1; |
69 | } |
70 | |
71 | void StepGeom_CartesianTransformationOperator::SetAxis2(const Handle(StepGeom_Direction)& aAxis2) |
72 | { |
73 | axis2 = aAxis2; |
74 | hasAxis2 = Standard_True; |
75 | } |
76 | |
77 | void StepGeom_CartesianTransformationOperator::UnSetAxis2() |
78 | { |
79 | hasAxis2 = Standard_False; |
80 | axis2.Nullify(); |
81 | } |
82 | |
83 | Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis2() const |
84 | { |
85 | return axis2; |
86 | } |
87 | |
88 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis2() const |
89 | { |
90 | return hasAxis2; |
91 | } |
92 | |
93 | void StepGeom_CartesianTransformationOperator::SetLocalOrigin(const Handle(StepGeom_CartesianPoint)& aLocalOrigin) |
94 | { |
95 | localOrigin = aLocalOrigin; |
96 | } |
97 | |
98 | Handle(StepGeom_CartesianPoint) StepGeom_CartesianTransformationOperator::LocalOrigin() const |
99 | { |
100 | return localOrigin; |
101 | } |
102 | |
103 | void StepGeom_CartesianTransformationOperator::SetScale(const Standard_Real aScale) |
104 | { |
105 | scale = aScale; |
106 | hasScale = Standard_True; |
107 | } |
108 | |
109 | void StepGeom_CartesianTransformationOperator::UnSetScale() |
110 | { |
111 | hasScale = Standard_False; |
112 | } |
113 | |
114 | Standard_Real StepGeom_CartesianTransformationOperator::Scale() const |
115 | { |
116 | return scale; |
117 | } |
118 | |
119 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasScale() const |
120 | { |
121 | return hasScale; |
122 | } |