Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/ImathSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set(tmp)
# Namespace-related settings: allows one to customize the namespace
# generated, and to version the namespaces.
set(IMATH_NAMESPACE_CUSTOM "0" CACHE STRING "Whether the namespace has been customized (so external users know)")
set(IMATH_INTERNAL_NAMESPACE "Imath_${IMATH_VERSION_API}" CACHE STRING "Real namespace for Imath that will end up in compiled symbols")
set(IMATH_INTERNAL_NAMESPACE "Imath" CACHE STRING "Real namespace root for Imath that will end up in compiled symbols")
set(IMATH_NAMESPACE "Imath" CACHE STRING "Public namespace alias for Imath")
set(IMATH_PACKAGE_NAME "Imath ${IMATH_VERSION}${IMATH_VERSION_RELEASE_TYPE}" CACHE STRING "Public string / label for displaying package")

Expand Down
4 changes: 2 additions & 2 deletions src/Imath/ImathBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include "ImathVec.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// The `Box<V>` template represents an axis-aligned bounding box defined by
Expand Down Expand Up @@ -854,6 +854,6 @@ Box<Vec3<T>>::majorAxis () const IMATH_NOEXCEPT
return (s.y >= s.z) ? 1 : 2;
}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHBOX_H
4 changes: 2 additions & 2 deletions src/Imath/ImathBoxAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "ImathMatrix.h"
#include "ImathPlane.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// Clip the coordinates of a point, `p`, against a `Box<T>`, `box`.
Expand Down Expand Up @@ -896,6 +896,6 @@ intersects (const Box<Vec3<T>>& box, const Line3<T>& ray) IMATH_NOEXCEPT
return intersects (box, ray, ignored);
}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHBOXALGO_H
4 changes: 2 additions & 2 deletions src/Imath/ImathColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "ImathVec.h"
#include "half.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// 3-channel color class that inherits from Vec3.
Expand Down Expand Up @@ -794,6 +794,6 @@ operator* (S x, const Color4<T>& v) IMATH_NOEXCEPT
return Color4<T> (x * v.r, x * v.g, x * v.b, x * v.a);
}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHCOLOR_H
4 changes: 2 additions & 2 deletions src/Imath/ImathColorAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "ImathColorAlgo.h"

IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER
IMATH_STABLE_3_2_ENTER

Vec3<double>
hsv2rgb_d (const Vec3<double>& hsv) IMATH_NOEXCEPT
Expand Down Expand Up @@ -195,4 +195,4 @@ rgb2hsv_d (const Color4<double>& c) IMATH_NOEXCEPT
return Color4<double> (hue, sat, val, c.a);
}

IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT
IMATH_STABLE_3_2_EXIT
4 changes: 2 additions & 2 deletions src/Imath/ImathColorAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "ImathColor.h"
#include "ImathMath.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

//
// Non-templated helper routines for color conversion.
Expand Down Expand Up @@ -261,6 +261,6 @@ packed2rgb (PackedColor packed, Color4<T>& out) IMATH_NOEXCEPT
}
}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHCOLORALGO_H
4 changes: 2 additions & 2 deletions src/Imath/ImathEuler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <iostream>

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

#if (defined _WIN32 || defined _WIN64) && defined _MSC_VER
// Disable MS VC++ warnings about conversion from double to float
Expand Down Expand Up @@ -1088,6 +1088,6 @@ operator<< (std::ostream& o, const Euler<T>& euler)
# pragma warning(pop)
#endif

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHEULER_H
4 changes: 2 additions & 2 deletions src/Imath/ImathForward.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "ImathExport.h"
#include "ImathNamespace.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

/// @cond Doxygen_Suppress

Expand Down Expand Up @@ -75,6 +75,6 @@ class IMATH_EXPORT_TYPE Rand48;

/// @endcond

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHFORWARD_H
10 changes: 5 additions & 5 deletions src/Imath/ImathFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "ImathNamespace.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

/// @cond Doxygen_Suppress
template <class T> class Vec3;
Expand All @@ -30,12 +30,12 @@ template <class T> class Matrix44;
///
/// A typical usage would be :
///
/// m[0] = IMATH_INTERNAL_NAMESPACE::firstFrame( p[0], p[1], p[2] );
/// m[0] = IMATH_NAMESPACE::firstFrame( p[0], p[1], p[2] );
/// for( int i = 1; i < n - 1; i++ )
/// {
/// m[i] = IMATH_INTERNAL_NAMESPACE::nextFrame( m[i-1], p[i-1], p[i], t[i-1], t[i] );
/// m[i] = IMATH_NAMESPACE::nextFrame( m[i-1], p[i-1], p[i], t[i-1], t[i] );
/// }
/// m[n-1] = IMATH_INTERNAL_NAMESPACE::lastFrame( m[n-2], p[n-2], p[n-1] );
/// m[n-1] = IMATH_NAMESPACE::lastFrame( m[n-2], p[n-2], p[n-1] );
///
/// See Graphics Gems I for the underlying algorithm.

Expand Down Expand Up @@ -219,6 +219,6 @@ Matrix44<T> constexpr lastFrame (

/// @}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHFRAME_H
4 changes: 2 additions & 2 deletions src/Imath/ImathFrustum.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ImathPlane.h"
#include "ImathVec.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// Template class `Frustum<T>`
Expand Down Expand Up @@ -1047,7 +1047,7 @@ typedef Frustum<float> Frustumf;
/// Frustum of type double
typedef Frustum<double> Frustumd;

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#if defined _WIN32 || defined _WIN64
# ifdef _redef_near
Expand Down
8 changes: 4 additions & 4 deletions src/Imath/ImathFrustumTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "ImathSphere.h"
#include "ImathVec.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// template class FrustumTest<T>
Expand Down Expand Up @@ -140,13 +140,13 @@ template <class T> class IMATH_EXPORT_TEMPLATE_TYPE FrustumTest
bool completelyContains (const Box<Vec3<T>>& box) const IMATH_NOEXCEPT;

/// Return the camera matrix (primarily for debugging)
IMATH_INTERNAL_NAMESPACE::Matrix44<T> cameraMat () const IMATH_NOEXCEPT
IMATH_NAMESPACE::Matrix44<T> cameraMat () const IMATH_NOEXCEPT
{
return cameraMatrix;
}

/// Return the viewing frustum (primarily for debugging)
IMATH_INTERNAL_NAMESPACE::Frustum<T> currentFrustum () const IMATH_NOEXCEPT
IMATH_NAMESPACE::Frustum<T> currentFrustum () const IMATH_NOEXCEPT
{
return currFrustum;
}
Expand Down Expand Up @@ -350,6 +350,6 @@ typedef FrustumTest<float> FrustumTestf;
/// FrustymTest of type double
typedef FrustumTest<double> FrustumTestd;

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHFRUSTUMTEST_H
4 changes: 2 additions & 2 deletions src/Imath/ImathFun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "ImathFun.h"
#include <cmath>

IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER
IMATH_STABLE_3_2_ENTER

float succf(float f) IMATH_NOEXCEPT
{
Expand All @@ -32,4 +32,4 @@ double predd(double d) IMATH_NOEXCEPT
std::nextafter(d, -std::numeric_limits<double>::infinity()) : d;
}

IMATH_INTERNAL_NAMESPACE_SOURCE_EXIT
IMATH_STABLE_3_2_EXIT
12 changes: 6 additions & 6 deletions src/Imath/ImathFun.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ImathNamespace.h"
#include "ImathPlatform.h"

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

template <class T>
IMATH_HOSTDEVICE constexpr inline T
Expand Down Expand Up @@ -83,28 +83,28 @@ template <class T>
IMATH_HOSTDEVICE constexpr inline int
cmp (T a, T b) IMATH_NOEXCEPT
{
return IMATH_INTERNAL_NAMESPACE::sign (a - b);
return IMATH_NAMESPACE::sign (a - b);
}

template <class T>
IMATH_HOSTDEVICE constexpr inline int
cmpt (T a, T b, T t) IMATH_NOEXCEPT
{
return (IMATH_INTERNAL_NAMESPACE::abs (a - b) <= t) ? 0 : cmp (a, b);
return (IMATH_NAMESPACE::abs (a - b) <= t) ? 0 : cmp (a, b);
}

template <class T>
IMATH_HOSTDEVICE constexpr inline bool
iszero (T a, T t) IMATH_NOEXCEPT
{
return (IMATH_INTERNAL_NAMESPACE::abs (a) <= t) ? 1 : 0;
return (IMATH_NAMESPACE::abs (a) <= t) ? 1 : 0;
}

template <class T1, class T2, class T3>
IMATH_HOSTDEVICE constexpr inline bool
equal (T1 a, T2 b, T3 t) IMATH_NOEXCEPT
{
return IMATH_INTERNAL_NAMESPACE::abs (a - b) <= t;
return IMATH_NAMESPACE::abs (a - b) <= t;
}

template <class T>
Expand Down Expand Up @@ -228,6 +228,6 @@ finited (double d) IMATH_NOEXCEPT
return (u.i & 0x7ff0000000000000LL) != 0x7ff0000000000000LL;
}

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif // INCLUDED_IMATHFUN_H
28 changes: 14 additions & 14 deletions src/Imath/ImathGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,42 @@

/// Call glVertex3f
inline void
glVertex (const IMATH_INTERNAL_NAMESPACE::V3f& v)
glVertex (const IMATH_NAMESPACE::V3f& v)
{
glVertex3f (v.x, v.y, v.z);
}

/// Call glVertex2f
inline void
glVertex (const IMATH_INTERNAL_NAMESPACE::V2f& v)
glVertex (const IMATH_NAMESPACE::V2f& v)
{
glVertex2f (v.x, v.y);
}

/// Call glNormal3f
inline void
glNormal (const IMATH_INTERNAL_NAMESPACE::V3f& n)
glNormal (const IMATH_NAMESPACE::V3f& n)
{
glNormal3f (n.x, n.y, n.z);
}

/// Call glColor3f
inline void
glColor (const IMATH_INTERNAL_NAMESPACE::V3f& c)
glColor (const IMATH_NAMESPACE::V3f& c)
{
glColor3f (c.x, c.y, c.z);
}

/// Call glTranslatef
inline void
glTranslate (const IMATH_INTERNAL_NAMESPACE::V3f& t)
glTranslate (const IMATH_NAMESPACE::V3f& t)
{
glTranslatef (t.x, t.y, t.z);
}

/// Call glTexCoord2f
inline void
glTexCoord (const IMATH_INTERNAL_NAMESPACE::V2f& t)
glTexCoord (const IMATH_NAMESPACE::V2f& t)
{
glTexCoord2f (t.x, t.y);
}
Expand All @@ -78,15 +78,15 @@ const float GL_FLOAT_MAX = 1.8e+19; // sqrt (FLT_MAX)
inline bool
badFloat (float f)
{
return !IMATH_INTERNAL_NAMESPACE::finitef (f) || f < -GL_FLOAT_MAX ||
return !IMATH_NAMESPACE::finitef (f) || f < -GL_FLOAT_MAX ||
f > GL_FLOAT_MAX;
}

} // namespace

/// Throw an exception if m is not a valid matrix for GL
inline void
throwBadMatrix (const IMATH_INTERNAL_NAMESPACE::M44f& m)
throwBadMatrix (const IMATH_NAMESPACE::M44f& m)
{
if (badFloat (m[0][0]) || badFloat (m[0][1]) || badFloat (m[0][2]) ||
badFloat (m[0][3]) || badFloat (m[1][0]) || badFloat (m[1][1]) ||
Expand All @@ -99,37 +99,37 @@ throwBadMatrix (const IMATH_INTERNAL_NAMESPACE::M44f& m)

/// Call glMultmatrixf. Throw an exception if m is not a valid matrix for GL.
inline void
glMultMatrix (const IMATH_INTERNAL_NAMESPACE::M44f& m)
glMultMatrix (const IMATH_NAMESPACE::M44f& m)
{
throwBadMatrix (m);
glMultMatrixf ((GLfloat*) m[0]);
}

/// Call glMultmatrixf. Throw an exception if m is not a valid matrix for GL.
inline void
glMultMatrix (const IMATH_INTERNAL_NAMESPACE::M44f* m)
glMultMatrix (const IMATH_NAMESPACE::M44f* m)
{
throwBadMatrix (*m);
glMultMatrixf ((GLfloat*) (*m)[0]);
}

/// Call glLoadmatrixf. Throw an exception if m is not a valid matrix for GL.
inline void
glLoadMatrix (const IMATH_INTERNAL_NAMESPACE::M44f& m)
glLoadMatrix (const IMATH_NAMESPACE::M44f& m)
{
throwBadMatrix (m);
glLoadMatrixf ((GLfloat*) m[0]);
}

/// Call glLoadmatrixf. Throw an exception if m is not a valid matrix for GL.
inline void
glLoadMatrix (const IMATH_INTERNAL_NAMESPACE::M44f* m)
glLoadMatrix (const IMATH_NAMESPACE::M44f* m)
{
throwBadMatrix (*m);
glLoadMatrixf ((GLfloat*) (*m)[0]);
}

IMATH_INTERNAL_NAMESPACE_HEADER_ENTER
IMATH_STABLE_3_2_ENTER

///
/// A class object that pushes/pops the GL matrix. This object assists with
Expand Down Expand Up @@ -173,6 +173,6 @@ class GLBegin
~GLBegin () { glEnd (); }
};

IMATH_INTERNAL_NAMESPACE_HEADER_EXIT
IMATH_STABLE_3_2_EXIT

#endif
Loading
Loading