0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / Geom2d / Geom2d_Transformation.cxx
CommitLineData
7fd59977 1// File: Geom2d_Transformation.cxx
2// Created: Wed Mar 24 19:30:53 1993
3// Author: JCV
4// <fid@sdsun2>
5// Copyright: Matra Datavision 1993
6
7//File Geom2d_Transformation.cxx, JCV 23/06/91
8
9#include <Geom2d_Transformation.ixx>
10
11
12typedef Geom2d_Transformation Transformation;
13typedef Handle(Geom2d_Transformation) Handle(Transformation);
14
15typedef gp_Ax2d Ax2d;
16typedef gp_Pnt2d Pnt2d;
17typedef gp_TrsfForm TrsfForm;
18typedef gp_Vec2d Vec2d;
19
20
21
22
23
24
25
26
27Handle(Geom2d_Transformation) Geom2d_Transformation::Copy() const {
28
29 Handle(Transformation) T;
30 T = new Transformation (gpTrsf2d);
31 return T;
32}
33
34
35
36
37Geom2d_Transformation::Geom2d_Transformation () { }
38
39
40Geom2d_Transformation::Geom2d_Transformation (const gp_Trsf2d& T)
41: gpTrsf2d (T) { }
42
43
44Handle(Transformation) Geom2d_Transformation::Inverted () const {
45
46 return new Transformation (gpTrsf2d.Inverted());
47}
48
49
50Handle(Transformation) Geom2d_Transformation::Multiplied (
51
52const Handle(Transformation)& Other) const {
53
54 return new Transformation (gpTrsf2d.Multiplied (Other->Trsf2d()));
55}
56
57
58Handle(Transformation) Geom2d_Transformation::Powered (const Standard_Integer N) const{
59
60 gp_Trsf2d Temp = gpTrsf2d;
61 Temp.Power (N);
62 return new Transformation (Temp);
63}
64
65
66
67void Geom2d_Transformation::SetMirror (const gp_Pnt2d& P) {
68
69 gpTrsf2d.SetMirror (P);
70}
71
72
73void Geom2d_Transformation::SetMirror (const gp_Ax2d& A) {
74
75 gpTrsf2d.SetMirror (A);
76}
77
78
79void Geom2d_Transformation::SetRotation (const gp_Pnt2d& P, const Standard_Real Ang) {
80
81 gpTrsf2d.SetRotation (P, Ang);
82}
83
84
85void Geom2d_Transformation::SetScale (const gp_Pnt2d& P, const Standard_Real S) {
86
87 gpTrsf2d.SetScale (P, S);
88}
89
90
91void Geom2d_Transformation::SetTransformation (const gp_Ax2d& ToAxis) {
92
93 gpTrsf2d.SetTransformation (ToAxis);
94}
95
96
97void Geom2d_Transformation::SetTransformation (
98const gp_Ax2d& FromAxis1, const gp_Ax2d& ToAxis2) {
99
100 gpTrsf2d.SetTransformation (FromAxis1, ToAxis2);
101}
102
103
104void Geom2d_Transformation::SetTranslation (const gp_Vec2d& V) {
105
106 gpTrsf2d.SetTranslation (V);
107}
108
109
110void Geom2d_Transformation::SetTranslation (const gp_Pnt2d& P1, const gp_Pnt2d& P2) {
111
112 gpTrsf2d.SetTranslation (P1, P2);
113}
114
115
116void Geom2d_Transformation::SetTrsf2d (const gp_Trsf2d& T) { gpTrsf2d = T; }
117
118
119Standard_Boolean Geom2d_Transformation::IsNegative () const {
120
121 return gpTrsf2d.IsNegative();
122}
123
124
125TrsfForm Geom2d_Transformation::Form () const { return gpTrsf2d.Form(); }
126
127
128Standard_Real Geom2d_Transformation::ScaleFactor () const {
129
130 return gpTrsf2d.ScaleFactor();
131}
132
133
134gp_Trsf2d Geom2d_Transformation::Trsf2d () const { return gpTrsf2d; }
135
136
137
138Standard_Real Geom2d_Transformation::Value (const Standard_Integer Row, const Standard_Integer Col) const{
139
140 return gpTrsf2d.Value (Row, Col);
141}
142
143
144void Geom2d_Transformation::Invert () { gpTrsf2d.Invert(); }
145
146
147void Geom2d_Transformation::Transforms (Standard_Real& X, Standard_Real& Y) const {
148
149 gpTrsf2d.Transforms (X, Y);
150}
151
152
153void Geom2d_Transformation::Multiply (const Handle(Geom2d_Transformation)& Other) {
154
155 gpTrsf2d.Multiply (Other->Trsf2d());
156}
157
158
159void Geom2d_Transformation::Power (const Standard_Integer N) { gpTrsf2d.Power (N); }
160
161
162void Geom2d_Transformation::PreMultiply (
163const Handle(Transformation)& Other) {
164
165 gpTrsf2d.PreMultiply (Other->Trsf2d());
166}
167
168
169
170