Merge branch 'master' of git@gitorious.org:polyvox/polyvox.git
This commit is contained in:
commit
f73b2a479b
@ -23,6 +23,9 @@ endif()
|
|||||||
IF(CMAKE_COMPILER_IS_GNUCXX) #Maybe "OR MINGW"
|
IF(CMAKE_COMPILER_IS_GNUCXX) #Maybe "OR MINGW"
|
||||||
ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
|
ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
if(CMAKE_CXX_COMPILER MATCHES "clang")
|
||||||
|
ADD_DEFINITIONS(-std=c++0x) #Enable C++0x mode
|
||||||
|
endif()
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(library)
|
ADD_SUBDIRECTORY(library)
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from docutils import nodes, utils
|
|||||||
from sphinx.util.nodes import split_explicit_title
|
from sphinx.util.nodes import split_explicit_title
|
||||||
from sphinx.util.console import bold, standout
|
from sphinx.util.console import bold, standout
|
||||||
|
|
||||||
from parsing import normalise, ParseException
|
from .parsing import normalise, ParseException
|
||||||
|
|
||||||
def find_url(doc, symbol):
|
def find_url(doc, symbol):
|
||||||
"""
|
"""
|
||||||
@ -156,7 +156,7 @@ def parse_tag_file(doc):
|
|||||||
else:
|
else:
|
||||||
mapping[member_symbol] = {'kind' : kind, 'arglist' : {normalised_arglist : anchor_link}}
|
mapping[member_symbol] = {'kind' : kind, 'arglist' : {normalised_arglist : anchor_link}}
|
||||||
else:
|
else:
|
||||||
print 'Skipping %s %s%s. Error reported from parser was: %s' % (old_tuple[2], old_tuple[0], old_tuple[1], normalised_tuple[0])
|
print('Skipping %s %s%s. Error reported from parser was: %s' % (old_tuple[2], old_tuple[0], old_tuple[1], normalised_tuple[0]))
|
||||||
|
|
||||||
#from pprint import pprint; pprint(mapping)
|
#from pprint import pprint; pprint(mapping)
|
||||||
return mapping
|
return mapping
|
||||||
|
@ -94,7 +94,7 @@ def normalise(symbol):
|
|||||||
arglist_input_string = arglist_input_string[:closing_bracket_location+1]
|
arglist_input_string = arglist_input_string[:closing_bracket_location+1]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
#This shouldn't happen.
|
#This shouldn't happen.
|
||||||
print 'Could not find closing bracket in %s' % arglist_input_string
|
print('Could not find closing bracket in %s' % arglist_input_string)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -149,4 +149,4 @@ void OpenGLWidget::mouseMoveEvent(QMouseEvent* event)
|
|||||||
m_LastFrameMousePos = m_CurrentMousePos;
|
m_LastFrameMousePos = m_CurrentMousePos;
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -64,4 +64,4 @@ private:
|
|||||||
int m_yRotation;
|
int m_yRotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__BasicExample_OpenGLWidget_H__
|
#endif //__BasicExample_OpenGLWidget_H__
|
||||||
|
@ -248,4 +248,4 @@ void OpenGLWidget::setupProjectionMatrix(void)
|
|||||||
float aspect = static_cast<float>(width()) / static_cast<float>(height());
|
float aspect = static_cast<float>(width()) / static_cast<float>(height());
|
||||||
|
|
||||||
glOrtho(frustumSize*aspect, -frustumSize*aspect, frustumSize, -frustumSize, 1.0, 5000);
|
glOrtho(frustumSize*aspect, -frustumSize*aspect, frustumSize, -frustumSize, 1.0, 5000);
|
||||||
}
|
}
|
||||||
|
@ -80,4 +80,4 @@ class OpenGLWidget : public QGLWidget
|
|||||||
unsigned int m_uVolumeDepthInRegions;
|
unsigned int m_uVolumeDepthInRegions;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__PolyVox_OpenGLWidget_H__
|
#endif //__PolyVox_OpenGLWidget_H__
|
||||||
|
@ -132,4 +132,4 @@ void OpenGLWidget::mouseMoveEvent(QMouseEvent* event)
|
|||||||
m_LastFrameMousePos = m_CurrentMousePos;
|
m_LastFrameMousePos = m_CurrentMousePos;
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -64,4 +64,4 @@ private:
|
|||||||
int m_yRotation;
|
int m_yRotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__BasicExample_OpenGLWidget_H__
|
#endif //__BasicExample_OpenGLWidget_H__
|
||||||
|
@ -183,4 +183,4 @@ void OpenGLWidget::mouseMoveEvent(QMouseEvent* event)
|
|||||||
m_LastFrameMousePos = m_CurrentMousePos;
|
m_LastFrameMousePos = m_CurrentMousePos;
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -71,4 +71,4 @@ private:
|
|||||||
int m_yRotation;
|
int m_yRotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__BasicExample_OpenGLWidget_H__
|
#endif //__BasicExample_OpenGLWidget_H__
|
||||||
|
@ -44,7 +44,7 @@ namespace PolyVox
|
|||||||
extern const POLYVOX_API Vector3DInt32 arrayPathfinderCorners[8];
|
extern const POLYVOX_API Vector3DInt32 arrayPathfinderCorners[8];
|
||||||
|
|
||||||
/// This function provides the default method for checking whether a given voxel
|
/// This function provides the default method for checking whether a given voxel
|
||||||
/// is vaid for the path computed by the AStarPathfinder.
|
/// is valid for the path computed by the AStarPathfinder.
|
||||||
template< template<typename> class VolumeType, typename VoxelType>
|
template< template<typename> class VolumeType, typename VoxelType>
|
||||||
bool aStarDefaultVoxelValidator(const VolumeType<VoxelType>* volData, const Vector3DInt32& v3dPos);
|
bool aStarDefaultVoxelValidator(const VolumeType<VoxelType>* volData, const Vector3DInt32& v3dPos);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ namespace PolyVox
|
|||||||
float fHBias = 1.0,
|
float fHBias = 1.0,
|
||||||
uint32_t uMaxNoOfNodes = 10000,
|
uint32_t uMaxNoOfNodes = 10000,
|
||||||
Connectivity connectivity = TwentySixConnected,
|
Connectivity connectivity = TwentySixConnected,
|
||||||
polyvox_function<bool (const VolumeType<VoxelType>*, const Vector3DInt32&)> funcIsVoxelValidForPath = &aStarDefaultVoxelValidator<VolumeType, VoxelType>,
|
polyvox_function<bool (const VolumeType<VoxelType>*, const Vector3DInt32&)> funcIsVoxelValidForPath = &aStarDefaultVoxelValidator,
|
||||||
polyvox_function<void (float)> funcProgressCallback = 0
|
polyvox_function<void (float)> funcProgressCallback = 0
|
||||||
)
|
)
|
||||||
:volume(volData)
|
:volume(volData)
|
||||||
|
@ -326,4 +326,4 @@ namespace PolyVox
|
|||||||
hVal += fHash;
|
hVal += fHash;
|
||||||
return hVal;
|
return hVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,4 +131,4 @@ namespace PolyVox
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,4 +74,4 @@ namespace PolyVox
|
|||||||
};
|
};
|
||||||
}//namespace PolyVox
|
}//namespace PolyVox
|
||||||
|
|
||||||
#endif //__PolyVox_ArraySizes_H__
|
#endif //__PolyVox_ArraySizes_H__
|
||||||
|
@ -76,4 +76,4 @@ namespace PolyVox
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__PolyVox_ConstVolumeProxy_H__
|
#endif //__PolyVox_ConstVolumeProxy_H__
|
||||||
|
@ -344,4 +344,4 @@ namespace PolyVox
|
|||||||
//Quads cannot be merged.
|
//Quads cannot be merged.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,4 +139,4 @@ namespace PolyVox
|
|||||||
lodRecord.endIndex = m_meshCurrent->getNoOfIndices();
|
lodRecord.endIndex = m_meshCurrent->getNoOfIndices();
|
||||||
m_meshCurrent->m_vecLodRecords.push_back(lodRecord);
|
m_meshCurrent->m_vecLodRecords.push_back(lodRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -512,4 +512,4 @@ namespace PolyVox
|
|||||||
}
|
}
|
||||||
|
|
||||||
#undef BORDER_LOW
|
#undef BORDER_LOW
|
||||||
#undef BORDER_HIGH
|
#undef BORDER_HIGH
|
||||||
|
@ -60,4 +60,4 @@ namespace PolyVox
|
|||||||
#define POLYVOX_LOG_WARN(message) if(logHandler){logHandler(message, LS_WARN);}
|
#define POLYVOX_LOG_WARN(message) if(logHandler){logHandler(message, LS_WARN);}
|
||||||
#define POLYVOX_LOG_ERROR(message) if(logHandler){logHandler(message, LS_ERROR);}
|
#define POLYVOX_LOG_ERROR(message) if(logHandler){logHandler(message, LS_ERROR);}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,4 +124,4 @@ namespace PolyVox
|
|||||||
typename VoxelTypeTraits<MaterialDensityPair88>::MaterialType convertToMaterial(MaterialDensityPair88 voxel);
|
typename VoxelTypeTraits<MaterialDensityPair88>::MaterialType convertToMaterial(MaterialDensityPair88 voxel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -419,4 +419,4 @@ namespace PolyVox
|
|||||||
#undef BORDER_LOWY
|
#undef BORDER_LOWY
|
||||||
#undef BORDER_HIGHY
|
#undef BORDER_HIGHY
|
||||||
#undef BORDER_LOWZ
|
#undef BORDER_LOWZ
|
||||||
#undef BORDER_HIGHZ
|
#undef BORDER_HIGHZ
|
||||||
|
@ -122,4 +122,4 @@ namespace PolyVox
|
|||||||
|
|
||||||
#include "PolyVoxCore/Raycast.inl"
|
#include "PolyVoxCore/Raycast.inl"
|
||||||
|
|
||||||
#endif //__PolyVox_Raycast_H__
|
#endif //__PolyVox_Raycast_H__
|
||||||
|
@ -179,4 +179,4 @@ namespace PolyVox
|
|||||||
m_result.intersectionVoxel = Vector3DInt32(0,0,0);
|
m_result.intersectionVoxel = Vector3DInt32(0,0,0);
|
||||||
m_result.previousVoxel = Vector3DInt32(0,0,0);
|
m_result.previousVoxel = Vector3DInt32(0,0,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,4 +485,4 @@ namespace PolyVox
|
|||||||
m_vecVertices[ct].setPosition(position);
|
m_vecVertices[ct].setPosition(position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,4 +32,4 @@ namespace PolyVox
|
|||||||
float computeSmoothedVoxel(typename VolumeType<uint8_t>::Sampler& volIter);
|
float computeSmoothedVoxel(typename VolumeType<uint8_t>::Sampler& volIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -221,4 +221,4 @@ namespace PolyVox
|
|||||||
//bool operator<(const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs);
|
//bool operator<(const AllNodesContainer::iterator& lhs, const AllNodesContainer::iterator& rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__PolyVox_AStarPathfinderImpl_H__
|
#endif //__PolyVox_AStarPathfinderImpl_H__
|
||||||
|
@ -43,4 +43,4 @@ namespace PolyVox
|
|||||||
std::copy(&pSizes[0],&pSizes[N-1],m_pSizes);
|
std::copy(&pSizes[0],&pSizes[N-1],m_pSizes);
|
||||||
m_pSizes[N-1]=uSize;
|
m_pSizes[N-1]=uSize;
|
||||||
}
|
}
|
||||||
}//namespace PolyVox
|
}//namespace PolyVox
|
||||||
|
@ -28,8 +28,8 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
extern POLYVOX_API int edgeTable[256];
|
extern const POLYVOX_API int edgeTable[256];
|
||||||
extern POLYVOX_API int triTable[256][16];
|
extern const POLYVOX_API int triTable[256][16];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,4 +85,4 @@ namespace PolyVox
|
|||||||
|
|
||||||
#include "PolyVoxImpl/SubArray.inl"
|
#include "PolyVoxImpl/SubArray.inl"
|
||||||
|
|
||||||
#endif //__PolyVox_SubArray_H__
|
#endif //__PolyVox_SubArray_H__
|
||||||
|
@ -76,6 +76,9 @@ freely, subject to the following restrictions:
|
|||||||
#define polyvox_bind boost::bind
|
#define polyvox_bind boost::bind
|
||||||
#define polyvox_placeholder_1 _1
|
#define polyvox_placeholder_1 _1
|
||||||
#define polyvox_placeholder_2 _2
|
#define polyvox_placeholder_2 _2
|
||||||
|
|
||||||
|
#include <boost/static_assert.hpp>
|
||||||
|
#define static_assert BOOST_STATIC_ASSERT
|
||||||
|
|
||||||
|
|
||||||
//As long as we're requiring boost, we'll use it to compensate
|
//As long as we're requiring boost, we'll use it to compensate
|
||||||
@ -98,6 +101,7 @@ freely, subject to the following restrictions:
|
|||||||
#define polyvox_placeholder_1 std::placeholders::_1
|
#define polyvox_placeholder_1 std::placeholders::_1
|
||||||
#define polyvox_placeholder_2 std::placeholders::_2
|
#define polyvox_placeholder_2 std::placeholders::_2
|
||||||
#define polyvox_hash std::hash
|
#define polyvox_hash std::hash
|
||||||
|
//#define static_assert static_assert //we can use this
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,4 +64,4 @@ namespace PolyVox
|
|||||||
Vector3DInt32(+1, +1, -1),
|
Vector3DInt32(+1, +1, -1),
|
||||||
Vector3DInt32(+1, +1, +1)
|
Vector3DInt32(+1, +1, +1)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -52,4 +52,4 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return m_pSizes;
|
return m_pSizes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,4 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return voxel.getDensity();
|
return voxel.getDensity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,4 +26,4 @@ freely, subject to the following restrictions:
|
|||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
void (*logHandler)(std::string, int severity) = 0;
|
void (*logHandler)(std::string, int severity) = 0;
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,4 @@ namespace PolyVox
|
|||||||
//{
|
//{
|
||||||
// return voxel.getDensity();
|
// return voxel.getDensity();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
@ -48,4 +48,4 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return voxel.getMaterial();
|
return voxel.getMaterial();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,8 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
int edgeTable[256]=
|
const int edgeTable[256]=
|
||||||
{
|
{
|
||||||
0x000, 0x109, 0x203, 0x30a, 0x80c, 0x905, 0xa0f, 0xb06,
|
0x000, 0x109, 0x203, 0x30a, 0x80c, 0x905, 0xa0f, 0xb06,
|
||||||
0x406, 0x50f, 0x605, 0x70c, 0xc0a, 0xd03, 0xe09, 0xf00,
|
0x406, 0x50f, 0x605, 0x70c, 0xc0a, 0xd03, 0xe09, 0xf00,
|
||||||
0x190, 0x099, 0x393, 0x29a, 0x99c, 0x895, 0xb9f, 0xa96,
|
0x190, 0x099, 0x393, 0x29a, 0x99c, 0x895, 0xb9f, 0xa96,
|
||||||
@ -66,7 +66,7 @@ namespace PolyVox
|
|||||||
0xb06, 0xa0f, 0x905, 0x80c, 0x30a, 0x203, 0x109, 0x000
|
0xb06, 0xa0f, 0x905, 0x80c, 0x30a, 0x203, 0x109, 0x000
|
||||||
};
|
};
|
||||||
|
|
||||||
int triTable[256][16] =
|
const int triTable[256][16] =
|
||||||
{
|
{
|
||||||
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
|
{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
|
||||||
{ 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
|
{ 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
|
||||||
|
@ -1052,4 +1052,4 @@ namespace PolyVox
|
|||||||
Vector3DFloat(+0.862667f, +0.053377f, +0.652333f),
|
Vector3DFloat(+0.862667f, +0.053377f, +0.652333f),
|
||||||
Vector3DFloat(-0.002289f, +0.568834f, -0.069185f)
|
Vector3DFloat(-0.002289f, +0.568834f, -0.069185f)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -63,4 +63,4 @@ namespace PolyVox
|
|||||||
sum /= 27.0f;
|
sum /= 27.0f;
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,4 @@ namespace PolyVox
|
|||||||
{
|
{
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user