summaryrefslogtreecommitdiff
path: root/graphics/libx3dtk/files/patch-src-kernel-base-SFPoint3f.cpp
blob: acee77f3202b85910d865946c087728fc4f75c24 (plain) (blame)
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
*** src/kernel/base/SFPoint3f.cpp.orig	Sun Dec 17 12:30:22 2006
--- src/kernel/base/SFPoint3f.cpp	Sun Dec 17 12:31:00 2006
***************
*** 75,81 ****
  // operations on points
  //overloading of the operators +, -, *
  
! SFPoint3f X3DTK::operator+ (const SFPoint3f &v1, const SFVec3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x + v2.x;
--- 75,82 ----
  // operations on points
  //overloading of the operators +, -, *
  
! namespace X3DTK {
! SFPoint3f operator+ (const SFPoint3f &v1, const SFVec3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x + v2.x;
***************
*** 84,90 ****
    return res;
  }
  
! SFPoint3f X3DTK::operator+ (const SFPoint3f &v1, const SFPoint3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x + v2.x;
--- 85,91 ----
    return res;
  }
  
! SFPoint3f operator+ (const SFPoint3f &v1, const SFPoint3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x + v2.x;
***************
*** 93,99 ****
    return res;
  }
  
! SFPoint3f X3DTK::operator- (const SFPoint3f &v1, const SFVec3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x - v2.x;
--- 94,100 ----
    return res;
  }
  
! SFPoint3f operator- (const SFPoint3f &v1, const SFVec3f &v2)
  {
    SFPoint3f res;
    res.x = v1.x - v2.x;
***************
*** 102,108 ****
    return res;
  }
  
! SFVec3f X3DTK::operator- (const SFPoint3f &v1, const SFPoint3f &v2)
  {
    SFVec3f res;
    res.x = v1.x - v2.x;
--- 103,109 ----
    return res;
  }
  
! SFVec3f operator- (const SFPoint3f &v1, const SFPoint3f &v2)
  {
    SFVec3f res;
    res.x = v1.x - v2.x;
***************
*** 111,117 ****
    return res;
  }
  
! SFPoint3f X3DTK::operator* (const float a, const SFPoint3f &v)
  {
    SFPoint3f res;
    res.x = a * v.x;
--- 112,118 ----
    return res;
  }
  
! SFPoint3f operator* (const float a, const SFPoint3f &v)
  {
    SFPoint3f res;
    res.x = a * v.x;
***************
*** 120,127 ****
    return res;
  }
  
! float X3DTK::distance(const SFPoint3f &A, const SFPoint3f &B)
  {
    return (A - B).norm();
  }
! 
--- 121,128 ----
    return res;
  }
  
! float distance(const SFPoint3f &A, const SFPoint3f &B)
  {
    return (A - B).norm();
  }
! }