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 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
16 | #include <StepGeom_CartesianPoint.hxx> |
17 | #include <StepGeom_CartesianTransformationOperator.hxx> |
18 | #include <StepGeom_Direction.hxx> |
19 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
20 | |
92efcf78 |
21 | IMPLEMENT_STANDARD_RTTIEXT(StepGeom_CartesianTransformationOperator,StepGeom_GeometricRepresentationItem) |
22 | |
7fd59977 |
23 | StepGeom_CartesianTransformationOperator::StepGeom_CartesianTransformationOperator () {} |
24 | |
7fd59977 |
25 | void StepGeom_CartesianTransformationOperator::Init( |
26 | const Handle(TCollection_HAsciiString)& aName, |
27 | const Standard_Boolean hasAaxis1, |
28 | const Handle(StepGeom_Direction)& aAxis1, |
29 | const Standard_Boolean hasAaxis2, |
30 | const Handle(StepGeom_Direction)& aAxis2, |
31 | const Handle(StepGeom_CartesianPoint)& aLocalOrigin, |
32 | const Standard_Boolean hasAscale, |
33 | const Standard_Real aScale) |
34 | { |
35 | // --- classe own fields --- |
36 | hasAxis1 = hasAaxis1; |
37 | axis1 = aAxis1; |
38 | hasAxis2 = hasAaxis2; |
39 | axis2 = aAxis2; |
40 | localOrigin = aLocalOrigin; |
41 | hasScale = hasAscale; |
42 | scale = aScale; |
43 | // --- classe inherited fields --- |
44 | StepRepr_RepresentationItem::Init(aName); |
45 | } |
46 | |
47 | |
48 | void StepGeom_CartesianTransformationOperator::SetAxis1(const Handle(StepGeom_Direction)& aAxis1) |
49 | { |
50 | axis1 = aAxis1; |
51 | hasAxis1 = Standard_True; |
52 | } |
53 | |
54 | void StepGeom_CartesianTransformationOperator::UnSetAxis1() |
55 | { |
56 | hasAxis1 = Standard_False; |
57 | axis1.Nullify(); |
58 | } |
59 | |
60 | Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis1() const |
61 | { |
62 | return axis1; |
63 | } |
64 | |
65 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis1() const |
66 | { |
67 | return hasAxis1; |
68 | } |
69 | |
70 | void StepGeom_CartesianTransformationOperator::SetAxis2(const Handle(StepGeom_Direction)& aAxis2) |
71 | { |
72 | axis2 = aAxis2; |
73 | hasAxis2 = Standard_True; |
74 | } |
75 | |
76 | void StepGeom_CartesianTransformationOperator::UnSetAxis2() |
77 | { |
78 | hasAxis2 = Standard_False; |
79 | axis2.Nullify(); |
80 | } |
81 | |
82 | Handle(StepGeom_Direction) StepGeom_CartesianTransformationOperator::Axis2() const |
83 | { |
84 | return axis2; |
85 | } |
86 | |
87 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasAxis2() const |
88 | { |
89 | return hasAxis2; |
90 | } |
91 | |
92 | void StepGeom_CartesianTransformationOperator::SetLocalOrigin(const Handle(StepGeom_CartesianPoint)& aLocalOrigin) |
93 | { |
94 | localOrigin = aLocalOrigin; |
95 | } |
96 | |
97 | Handle(StepGeom_CartesianPoint) StepGeom_CartesianTransformationOperator::LocalOrigin() const |
98 | { |
99 | return localOrigin; |
100 | } |
101 | |
102 | void StepGeom_CartesianTransformationOperator::SetScale(const Standard_Real aScale) |
103 | { |
104 | scale = aScale; |
105 | hasScale = Standard_True; |
106 | } |
107 | |
108 | void StepGeom_CartesianTransformationOperator::UnSetScale() |
109 | { |
110 | hasScale = Standard_False; |
111 | } |
112 | |
113 | Standard_Real StepGeom_CartesianTransformationOperator::Scale() const |
114 | { |
115 | return scale; |
116 | } |
117 | |
118 | Standard_Boolean StepGeom_CartesianTransformationOperator::HasScale() const |
119 | { |
120 | return hasScale; |
121 | } |