Permalink
Browse files

Additional sync

1 parent b89604c commit 01c7297753aa324ec220141c778dedd18a6e2135 @pstanczyk pstanczyk committed Oct 15, 2013
@@ -88,8 +88,11 @@
#include <half.h>
#include <math.h>
#include <float.h>
+#include <cmath>
#include <sys/types.h>
+using std::isfinite;
+
namespace PxDeep {
//-*****************************************************************************
@@ -129,8 +129,8 @@ class Frustum
// to transform the frustum before setting the planes.
//-----------------------------------------------------------------------
- void planes(Plane3<T> p[6]);
- void planes(Plane3<T> p[6], const Matrix44<T> &M);
+ void planes(Plane3<T> p[6]) const;
+ void planes(Plane3<T> p[6], const Matrix44<T> &M) const;
//----------------------
// Derived Quantities
@@ -645,7 +645,7 @@ T Frustum<T>::worldRadius(const Vec3<T> &p, T radius) const
}
template<class T>
-void Frustum<T>::planes(Plane3<T> p[6])
+void Frustum<T>::planes(Plane3<T> p[6]) const
{
//
// Plane order: Top, Right, Bottom, Left, Near, Far.
@@ -678,7 +678,7 @@ void Frustum<T>::planes(Plane3<T> p[6])
template<class T>
-void Frustum<T>::planes(Plane3<T> p[6], const Matrix44<T> &M)
+void Frustum<T>::planes(Plane3<T> p[6], const Matrix44<T> &M) const
{
//
// Plane order: Top, Right, Bottom, Left, Near, Far.
@@ -134,7 +134,7 @@ class FrustumTest
cameraMat.makeIdentity();
setFrustum(frust, cameraMat);
}
- FrustumTest(Frustum<T> &frustum, const Matrix44<T> &cameraMat)
+ FrustumTest(const Frustum<T> &frustum, const Matrix44<T> &cameraMat)
{
setFrustum(frustum, cameraMat);
}
@@ -143,7 +143,7 @@ class FrustumTest
// setFrustum()
// This updates the frustum test with a new frustum and matrix.
// This should usually be called just once per frame.
- void setFrustum(Frustum<T> &frustum, const Matrix44<T> &cameraMat);
+ void setFrustum(const Frustum<T> &frustum, const Matrix44<T> &cameraMat);
////////////////////////////////////////////////////////////////////
// isVisible()
@@ -189,7 +189,7 @@ class FrustumTest
// This should usually only be called once per frame, or however
// often the camera moves.
template<class T>
-void FrustumTest<T>::setFrustum(Frustum<T> &frustum,
+void FrustumTest<T>::setFrustum(const Frustum<T> &frustum,
const Matrix44<T> &cameraMat)
{
Plane3<T> frustumPlanes[6];
@@ -56,6 +56,9 @@ using namespace OPENEXR_IMF_NAMESPACE;
using namespace std;
using namespace IMATH_NAMESPACE;
+#ifndef ILM_IMF_TEST_IMAGEDIR
+ #define ILM_IMF_TEST_IMAGEDIR
+#endif
namespace
{
@@ -42,6 +42,10 @@
#include <stdio.h>
#include <assert.h>
+#ifndef ILM_IMF_TEST_IMAGEDIR
+ #define ILM_IMF_TEST_IMAGEDIR
+#endif
+
using namespace OPENEXR_IMF_NAMESPACE;
using namespace std;
@@ -275,10 +279,10 @@ testNativeFormat (const std::string &tempDir)
"in Xdr, not native format" << endl;
cout << "image 1:" << endl;
- readCopyRead(tempDir, "test_native1.exr", 54435);
+ readCopyRead(tempDir, ILM_IMF_TEST_IMAGEDIR "test_native1.exr", 54435);
cout << "image 2:" << endl;
- readCopyRead(tempDir, "test_native2.exr", 37639);
+ readCopyRead(tempDir, ILM_IMF_TEST_IMAGEDIR "test_native2.exr", 37639);
cout << "ok\n" << endl;
}
@@ -56,9 +56,6 @@
#include <ImfVecAttribute.h>
-//for IMF_HAVE_SSE2
-#include <ImfOptimizedPixelReading.h>
-
#include <stdio.h>
#include <assert.h>
#include <string.h>
@@ -534,7 +531,6 @@ testAllCombinations (bool isAligned,
const char * pRgbFilename = pRgb.c_str();
const char * pRgbaFilename = pRgba.c_str();
-
const int pHeight = isAligned ? IMAGE_2K_HEIGHT : IMAGE_2K_HEIGHT - 1;
const int pWidth = isAligned ? IMAGE_2K_WIDTH : IMAGE_2K_WIDTH - 1;
Oops, something went wrong.

0 comments on commit 01c7297

Please sign in to comment.