From 9f56acee99307898d179b4d726a47528e8f78cad Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 21 Dec 2006 19:33:08 +0000 Subject: - Fix build with gcc 4.1 PR: ports/106834 Submitted by: German Tischler (maintainer) --- .../files/patch-src-kernel-base-SFPoint2f.cpp | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp (limited to 'graphics/libx3dtk/files/patch-src-kernel-base-SFPoint2f.cpp') 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(); + } + ++ } -- cgit v1.2.3