diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-04 07:04:56 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-04 07:04:56 +0400 |
commit | 72493e41bd24b0c6a30c486e32421acb6bf2ce07 (patch) | |
tree | 51d6f39bdf3707a5239b2d45a19dee26e2634af6 /extern | |
parent | 44f45894c2fca8f7e0b7bbfff0e50f24e6c993a5 (diff) |
Compile fixes for gcc 3.4
Diffstat (limited to 'extern')
-rwxr-xr-x | extern/solid/include/MT/Interval.h | 2 | ||||
-rwxr-xr-x | extern/solid/include/MT/Quaternion.h | 26 | ||||
-rwxr-xr-x | extern/solid/include/MT/Vector3.h | 36 | ||||
-rwxr-xr-x | extern/solid/src/complex/DT_BBoxTree.h | 4 |
4 files changed, 34 insertions, 34 deletions
diff --git a/extern/solid/include/MT/Interval.h b/extern/solid/include/MT/Interval.h index 8e1666c9c23..b7397971700 100755 --- a/extern/solid/include/MT/Interval.h +++ b/extern/solid/include/MT/Interval.h @@ -111,7 +111,7 @@ namespace MT { inline std::ostream& operator<<(std::ostream& os, const Interval<Scalar>& z) { - return os << '[' << x.lower() << ", " << x.upper() << ']'; + return os << '[' << z.lower() << ", " << z.upper() << ']'; } template <typename Scalar> diff --git a/extern/solid/include/MT/Quaternion.h b/extern/solid/include/MT/Quaternion.h index fd7149e95e8..3726b4f0c5b 100755 --- a/extern/solid/include/MT/Quaternion.h +++ b/extern/solid/include/MT/Quaternion.h @@ -84,19 +84,19 @@ namespace MT { Quaternion<Scalar>& operator+=(const Quaternion<Scalar>& q) { - m_co[0] += q[0]; m_co[1] += q[1]; m_co[2] += q[2]; m_co[3] += q[3]; + this->m_co[0] += q[0]; this->m_co[1] += q[1]; this->m_co[2] += q[2]; this->m_co[3] += q[3]; return *this; } Quaternion<Scalar>& operator-=(const Quaternion<Scalar>& q) { - m_co[0] -= q[0]; m_co[1] -= q[1]; m_co[2] -= q[2]; m_co[3] -= q[3]; + this->m_co[0] -= q[0]; this->m_co[1] -= q[1]; this->m_co[2] -= q[2]; this->m_co[3] -= q[3]; return *this; } Quaternion<Scalar>& operator*=(const Scalar& s) { - m_co[0] *= s; m_co[1] *= s; m_co[2] *= s; m_co[3] *= s; + this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; this->m_co[3] *= s; return *this; } @@ -108,16 +108,16 @@ namespace MT { Quaternion<Scalar>& operator*=(const Quaternion<Scalar>& q) { - setValue(m_co[3] * q[0] + m_co[0] * q[3] + m_co[1] * q[2] - m_co[2] * q[1], - m_co[3] * q[1] + m_co[1] * q[3] + m_co[2] * q[0] - m_co[0] * q[2], - m_co[3] * q[2] + m_co[2] * q[3] + m_co[0] * q[1] - m_co[1] * q[0], - m_co[3] * q[3] - m_co[0] * q[0] - m_co[1] * q[1] - m_co[2] * q[2]); + setValue(this->m_co[3] * q[0] + this->m_co[0] * q[3] + this->m_co[1] * q[2] - this->m_co[2] * q[1], + this->m_co[3] * q[1] + this->m_co[1] * q[3] + this->m_co[2] * q[0] - this->m_co[0] * q[2], + this->m_co[3] * q[2] + this->m_co[2] * q[3] + this->m_co[0] * q[1] - this->m_co[1] * q[0], + this->m_co[3] * q[3] - this->m_co[0] * q[0] - this->m_co[1] * q[1] - this->m_co[2] * q[2]); return *this; } Scalar dot(const Quaternion<Scalar>& q) const { - return m_co[0] * q[0] + m_co[1] * q[1] + m_co[2] * q[2] + m_co[3] * q[3]; + return this->m_co[0] * q[0] + this->m_co[1] * q[1] + this->m_co[2] * q[2] + this->m_co[3] * q[3]; } Scalar length2() const @@ -149,7 +149,7 @@ namespace MT { Quaternion<Scalar> conjugate() const { - return Quaternion<Scalar>(-m_co[0], -m_co[1], -m_co[2], m_co[3]); + return Quaternion<Scalar>(-this->m_co[0], -this->m_co[1], -this->m_co[2], this->m_co[3]); } Quaternion<Scalar> inverse() const @@ -165,10 +165,10 @@ namespace MT { Scalar d = Scalar(1.0) / Scalar_traits<Scalar>::sin(theta); Scalar s0 = Scalar_traits<Scalar>::sin((Scalar(1.0) - t) * theta); Scalar s1 = Scalar_traits<Scalar>::sin(t * theta); - return Quaternion<Scalar>((m_co[0] * s0 + q[0] * s1) * d, - (m_co[1] * s0 + q[1] * s1) * d, - (m_co[2] * s0 + q[2] * s1) * d, - (m_co[3] * s0 + q[3] * s1) * d); + return Quaternion<Scalar>((this->m_co[0] * s0 + q[0] * s1) * d, + (this->m_co[1] * s0 + q[1] * s1) * d, + (this->m_co[2] * s0 + q[2] * s1) * d, + (this->m_co[3] * s0 + q[3] * s1) * d); } else { diff --git a/extern/solid/include/MT/Vector3.h b/extern/solid/include/MT/Vector3.h index 6248a138092..98c99068407 100755 --- a/extern/solid/include/MT/Vector3.h +++ b/extern/solid/include/MT/Vector3.h @@ -45,19 +45,19 @@ namespace MT { Vector3<Scalar>& operator+=(const Vector3<Scalar>& v) { - m_co[0] += v[0]; m_co[1] += v[1]; m_co[2] += v[2]; + this->m_co[0] += v[0]; this->m_co[1] += v[1]; this->m_co[2] += v[2]; return *this; } Vector3<Scalar>& operator-=(const Vector3<Scalar>& v) { - m_co[0] -= v[0]; m_co[1] -= v[1]; m_co[2] -= v[2]; + this->m_co[0] -= v[0]; this->m_co[1] -= v[1]; this->m_co[2] -= v[2]; return *this; } Vector3<Scalar>& operator*=(const Scalar& s) { - m_co[0] *= s; m_co[1] *= s; m_co[2] *= s; + this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; return *this; } @@ -69,7 +69,7 @@ namespace MT { Scalar dot(const Vector3<Scalar>& v) const { - return m_co[0] * v[0] + m_co[1] * v[1] + m_co[2] * v[2]; + return this->m_co[0] * v[0] + this->m_co[1] * v[1] + this->m_co[2] * v[2]; } Scalar length2() const @@ -111,33 +111,33 @@ namespace MT { Vector3<Scalar> absolute() const { - return Vector3<Scalar>(Scalar_traits<Scalar>::abs(m_co[0]), - Scalar_traits<Scalar>::abs(m_co[1]), - Scalar_traits<Scalar>::abs(m_co[2])); + return Vector3<Scalar>(Scalar_traits<Scalar>::abs(this->m_co[0]), + Scalar_traits<Scalar>::abs(this->m_co[1]), + Scalar_traits<Scalar>::abs(this->m_co[2])); } Vector3<Scalar> cross(const Vector3<Scalar>& v) const { - return Vector3<Scalar>(m_co[1] * v[2] - m_co[2] * v[1], - m_co[2] * v[0] - m_co[0] * v[2], - m_co[0] * v[1] - m_co[1] * v[0]); + return Vector3<Scalar>(this->m_co[1] * v[2] - this->m_co[2] * v[1], + this->m_co[2] * v[0] - this->m_co[0] * v[2], + this->m_co[0] * v[1] - this->m_co[1] * v[0]); } Scalar triple(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) const { - return m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + - m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + - m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]); + return this->m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + + this->m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + + this->m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]); } int minAxis() const { - return m_co[0] < m_co[1] ? (m_co[0] < m_co[2] ? 0 : 2) : (m_co[1] < m_co[2] ? 1 : 2); + return this->m_co[0] < this->m_co[1] ? (this->m_co[0] < this->m_co[2] ? 0 : 2) : (this->m_co[1] < this->m_co[2] ? 1 : 2); } int maxAxis() const { - return m_co[0] < m_co[1] ? (m_co[1] < m_co[2] ? 2 : 1) : (m_co[0] < m_co[2] ? 2 : 0); + return this->m_co[0] < this->m_co[1] ? (this->m_co[1] < this->m_co[2] ? 2 : 1) : (this->m_co[0] < this->m_co[2] ? 2 : 0); } int furthestAxis() const @@ -152,9 +152,9 @@ namespace MT { Vector3<Scalar> lerp(const Vector3<Scalar>& v, const Scalar& t) const { - return Vector3<Scalar>(m_co[0] + (v[0] - m_co[0]) * t, - m_co[1] + (v[1] - m_co[1]) * t, - m_co[2] + (v[2] - m_co[2]) * t); + return Vector3<Scalar>(this->m_co[0] + (v[0] - this->m_co[0]) * t, + this->m_co[1] + (v[1] - this->m_co[1]) * t, + this->m_co[2] + (v[2] - this->m_co[2]) * t); } static Vector3<Scalar> random() diff --git a/extern/solid/src/complex/DT_BBoxTree.h b/extern/solid/src/complex/DT_BBoxTree.h index 995da05573a..3d9da6e34ba 100755 --- a/extern/solid/src/complex/DT_BBoxTree.h +++ b/extern/solid/src/complex/DT_BBoxTree.h @@ -136,7 +136,7 @@ public: : DT_Pack<Shape1, Shape2>(a, b), m_margin(margin) { - m_b_cbox += computeCBox(margin, m_a.m_inv_xform); + this->m_b_cbox += computeCBox(margin, this->m_a.m_inv_xform); } MT_Scalar m_margin; @@ -185,7 +185,7 @@ bool ray_cast(const DT_BBoxTree& a, const DT_RootData<Shape>& rd, if (a.m_type == DT_BBoxTree::LEAF) { - return ::ray_cast(rd, a.m_index, source, target, lambda, normal); + return ray_cast(rd, a.m_index, source, target, lambda, normal); } else { |