Compile fixes for gcc 3.4
This commit is contained in:
2
extern/solid/include/MT/Interval.h
vendored
2
extern/solid/include/MT/Interval.h
vendored
@@ -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>
|
||||
|
26
extern/solid/include/MT/Quaternion.h
vendored
26
extern/solid/include/MT/Quaternion.h
vendored
@@ -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
|
||||
{
|
||||
|
36
extern/solid/include/MT/Vector3.h
vendored
36
extern/solid/include/MT/Vector3.h
vendored
@@ -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()
|
||||
|
4
extern/solid/src/complex/DT_BBoxTree.h
vendored
4
extern/solid/src/complex/DT_BBoxTree.h
vendored
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user