summaryrefslogtreecommitdiff
path: root/graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-12-21 19:33:08 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-12-21 19:33:08 +0000
commit9f56acee99307898d179b4d726a47528e8f78cad (patch)
treedbb583569bc0f879b6df93000903c1362d7e5e21 /graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp
parentUpdate to 1.0.16 (diff)
- Fix build with gcc 4.1
PR: ports/106834 Submitted by: German Tischler <tanis@gaspode.franken.de> (maintainer)
Notes
Notes: svn path=/head/; revision=180363
Diffstat (limited to 'graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp')
-rw-r--r--graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp110
1 files changed, 110 insertions, 0 deletions
diff --git a/graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp b/graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp
new file mode 100644
index 000000000000..d564aec28125
--- /dev/null
+++ b/graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp
@@ -0,0 +1,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();
+ }
+
++ }