A few minor changes to help build on Linux
Still get "PolyVox/include/Volume.inl:128: error: ‘mVolume’ was not declared in this scope" though
This commit is contained in:
@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#pragma region Headers
|
#pragma region Headers
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring> //For memcpy
|
#include <cstring> //For memcpy
|
||||||
|
#include <stdexcept> //for std::invalid_argument
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
|
@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
#ifndef __PolyVox_Utility_H__
|
#ifndef __PolyVox_Utility_H__
|
||||||
#define __PolyVox_Utility_H__
|
#define __PolyVox_Utility_H__
|
||||||
|
|
||||||
#include "Typedef.h"
|
#include "TypeDef.h"
|
||||||
|
|
||||||
#include "boost/cstdint.hpp"
|
#include "boost/cstdint.hpp"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
#include "block.h"
|
#include "Block.h"
|
||||||
#include "Volume.h"
|
#include "Volume.h"
|
||||||
|
|
||||||
using namespace boost;
|
using namespace boost;
|
||||||
|
@ -130,11 +130,11 @@ namespace PolyVox
|
|||||||
assert(pos.z() <= POLYVOX_REGION_SIDE_LENGTH);
|
assert(pos.z() <= POLYVOX_REGION_SIDE_LENGTH);
|
||||||
|
|
||||||
float xIntPart;
|
float xIntPart;
|
||||||
float xFracPart = modf(pos.x(), &xIntPart);
|
float xFracPart = std::modf(pos.x(), &xIntPart);
|
||||||
float yIntPart;
|
float yIntPart;
|
||||||
float yFracPart = modf(pos.y(), &yIntPart);
|
float yFracPart = std::modf(pos.y(), &yIntPart);
|
||||||
float zIntPart;
|
float zIntPart;
|
||||||
float zFracPart = modf(pos.z(), &zIntPart);
|
float zFracPart = std::modf(pos.z(), &zIntPart);
|
||||||
|
|
||||||
//Of all the fractional parts, two should be zero and one should have a value.
|
//Of all the fractional parts, two should be zero and one should have a value.
|
||||||
if(xFracPart > 0.000001f)
|
if(xFracPart > 0.000001f)
|
||||||
@ -164,11 +164,11 @@ namespace PolyVox
|
|||||||
assert(newIndex < 10000);
|
assert(newIndex < 10000);
|
||||||
|
|
||||||
float xIntPart;
|
float xIntPart;
|
||||||
float xFracPart = modf(pos.x(), &xIntPart);
|
float xFracPart = std::modf(pos.x(), &xIntPart);
|
||||||
float yIntPart;
|
float yIntPart;
|
||||||
float yFracPart = modf(pos.y(), &yIntPart);
|
float yFracPart = std::modf(pos.y(), &yIntPart);
|
||||||
float zIntPart;
|
float zIntPart;
|
||||||
float zFracPart = modf(pos.z(), &zIntPart);
|
float zFracPart = std::modf(pos.z(), &zIntPart);
|
||||||
|
|
||||||
//Of all the fractional parts, two should be zero and one should have a value.
|
//Of all the fractional parts, two should be zero and one should have a value.
|
||||||
if(xFracPart > 0.000001f)
|
if(xFracPart > 0.000001f)
|
||||||
|
Reference in New Issue
Block a user