1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
*** src/kernel/base/SFPoint2f.cpp.orig Sun Dec 17 12:28:27 2006
--- src/kernel/base/SFPoint2f.cpp Sun Dec 17 12:30:01 2006
***************
*** 67,74 ****
// operations on points
//overloading of the operators +, -, *
! SFPoint2f X3DTK::operator+ (const SFPoint2f &v1, const SFVec2f &v2)
{
SFPoint2f res;
res.x = v1.x + v2.x;
--- 67,75 ----
// operations on points
//overloading of the operators +, -, *
+ namespace X3DTK {
! SFPoint2f operator+ (const SFPoint2f &v1, const SFVec2f &v2)
{
SFPoint2f res;
res.x = v1.x + v2.x;
***************
*** 76,82 ****
return res;
}
! SFPoint2f X3DTK::operator+ (const SFPoint2f &v1, const SFPoint2f &v2)
{
SFPoint2f res;
res.x = v1.x + v2.x;
--- 77,83 ----
return res;
}
! SFPoint2f operator+ (const SFPoint2f &v1, const SFPoint2f &v2)
{
SFPoint2f res;
res.x = v1.x + v2.x;
***************
*** 84,90 ****
return res;
}
! SFPoint2f X3DTK::operator- (const SFPoint2f &v1, const SFVec2f &v2)
{
SFPoint2f res;
res.x = v1.x - v2.x;
--- 85,91 ----
return res;
}
! SFPoint2f operator- (const SFPoint2f &v1, const SFVec2f &v2)
{
SFPoint2f res;
res.x = v1.x - v2.x;
***************
*** 92,98 ****
return res;
}
! SFVec2f X3DTK::operator- (const SFPoint2f &v1, const SFPoint2f &v2)
{
SFVec2f res;
res.x = v1.x - v2.x;
--- 93,99 ----
return res;
}
! SFVec2f operator- (const SFPoint2f &v1, const SFPoint2f &v2)
{
SFVec2f res;
res.x = v1.x - v2.x;
***************
*** 100,106 ****
return res;
}
! SFPoint2f X3DTK::operator* (const float a, const SFPoint2f &v)
{
SFPoint2f res;
res.x = a * v.x;
--- 101,107 ----
return res;
}
! SFPoint2f operator* (const float a, const SFPoint2f &v)
{
SFPoint2f res;
res.x = a * v.x;
***************
*** 108,115 ****
return res;
}
! float X3DTK::distance(const SFPoint2f &A, const SFPoint2f &B)
{
return (A - B).norm();
}
--- 109,117 ----
return res;
}
! float distance(const SFPoint2f &A, const SFPoint2f &B)
{
return (A - B).norm();
}
+ }
|