Merge branch 'master' of git@gitorious.org:polyvox/polyvox.git

Conflicts:
	library/PolyVoxCore/include/PolyVoxCore/Raycast.inl
This commit is contained in:
David Williams 2011-09-24 11:11:09 +01:00
commit 63d8c4c083
11 changed files with 20 additions and 7 deletions

View File

@ -30,6 +30,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/Array.h"
#include <list>
#include <stdexcept> //For runtime_error
namespace PolyVox
{

View File

@ -163,7 +163,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< LargeVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< LargeVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< LargeVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -103,6 +103,7 @@ namespace PolyVox
LargeVolume<VoxelType>::~LargeVolume()
{
flushAll();
delete[] m_pUncompressedBorderData;
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -259,9 +259,9 @@ namespace PolyVox
bool MeshDecimator<VertexType>::collapseChangesFaceNormals(uint32_t uSrc, uint32_t uDst, float fThreshold)
{
bool faceFlipped = false;
vector<uint32_t>& triangles = trianglesUsingVertex[uSrc];
std::vector<uint32_t>& triangles = trianglesUsingVertex[uSrc];
for(vector<uint32_t>::iterator triIter = triangles.begin(); triIter != triangles.end(); triIter++)
for(std::vector<uint32_t>::iterator triIter = triangles.begin(); triIter != triangles.end(); triIter++)
{
uint32_t tri = *triIter;

View File

@ -52,7 +52,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< RawVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< RawVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< RawVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -145,6 +145,7 @@ namespace PolyVox
return;
}
m_result.previousVoxel = Vector3DInt32(i,j,k);
if(tx <= ty && tx <= tz)
{
if(i == iend) break;

View File

@ -49,6 +49,7 @@ namespace PolyVox
{
public:
Block(uint16_t uSideLength = 0);
~Block();
uint16_t getSideLength(void) const;
VoxelType getVoxelAt(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos) const;
@ -77,7 +78,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< SimpleVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< SimpleVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< SimpleVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -71,7 +71,7 @@ namespace PolyVox
SimpleVolume<VoxelType>::~SimpleVolume()
{
delete[] m_pBlocks;
m_pBlocks = 0;
delete[] m_pUncompressedBorderData;
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -35,6 +35,12 @@ namespace PolyVox
}
}
template <typename VoxelType>
SimpleVolume<VoxelType>::Block::~Block()
{
delete[] m_tUncompressedData;
}
template <typename VoxelType>
uint16_t SimpleVolume<VoxelType>::Block::getSideLength(void) const
{

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_VolumeResampler_H__
#define __PolyVox_VolumeResampler_H__
#include <cmath>
namespace PolyVox
{
template< template<typename> class SrcVolumeType, template<typename> class DestVolumeType, typename VoxelType>

View File

@ -119,7 +119,8 @@ namespace PolyVox
uint8_t voxel110Den = voxel110.getDensity();
uint8_t voxel111Den = voxel111.getDensity();
float dummy;
//FIXME - should accept all float parameters, but GCC complains?
double dummy;
sx = modf(sx, &dummy);
sy = modf(sy, &dummy);
sz = modf(sz, &dummy);