Tidying up of headers and #includes.

This commit is contained in:
David Williams
2011-09-04 12:12:30 +01:00
parent 7515186b47
commit 894455e35f
64 changed files with 128 additions and 205 deletions

View File

@ -24,13 +24,13 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_AStarPathfinder_H__
#define __PolyVox_AStarPathfinder_H__
#include "PolyVoxCore/Array.h"
#include "PolyVoxImpl/AStarPathfinderImpl.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Array.h"
#include <list>
namespace PolyVox
{
const float sqrt_1 = 1.0f;

View File

@ -21,8 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Material.h"
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////

View File

@ -24,8 +24,14 @@ freely, subject to the following restrictions:
#ifndef __AmbientOcclusionCalculator_H__
#define __AmbientOcclusionCalculator_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/RandomUnitVectors.h"
#include "PolyVoxImpl/RandomVectors.h"
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Raycast.h"
#include <algorithm>
namespace PolyVox
{

View File

@ -21,15 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/Raycast.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/RandomUnitVectors.h"
#include "PolyVoxImpl/RandomVectors.h"
#include <algorithm>
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -24,10 +24,10 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Array_H__
#define __PolyVox_Array_H__
#include "PolyVoxCore/ArraySizes.h" //Not strictly required, but convienient
#include "PolyVoxImpl/SubArray.h"
#include "PolyVoxCore/ArraySizes.h" //Not strictly required, but convienient
namespace PolyVox
{
///Provides an efficient implementation of a multidimensional array.

View File

@ -24,8 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_ConstVolumeProxy_H__
#define __PolyVox_ConstVolumeProxy_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h"
namespace PolyVox
{

View File

@ -24,12 +24,11 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_CubicSurfaceExtractor_H__
#define __PolyVox_CubicSurfaceExtractor_H__
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/SurfaceMesh.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/MaterialDensityPair.h"
#include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxImpl/MarchingCubesTables.h"
#include "PolyVoxCore/VertexTypes.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -24,10 +24,10 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_CubicSurfaceExtractorWithNormals_H__
#define __PolyVox_CubicSurfaceExtractorWithNormals_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/MarchingCubesTables.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/SurfaceMesh.h"
namespace PolyVox
{

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/MaterialDensityPair.h"
#include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxImpl/MarchingCubesTables.h"
#include "PolyVoxCore/VertexTypes.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -24,7 +24,6 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Density_H__
#define __PolyVox_Density_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
namespace PolyVox

View File

@ -24,9 +24,10 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_GradientEstimators_H__
#define __PolyVox_GradientEstimators_H__
#include <vector>
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/VoxelFilters.h"
#include <vector>
namespace PolyVox
{

View File

@ -21,10 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/VoxelFilters.h"
#include "PolyVoxCore/LargeVolume.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_IteratorController_H__
#define __PolyVox_IteratorController_H__
#include "PolyVoxCore/Region.h"
namespace PolyVox
{
template <typename IteratorType>

View File

@ -25,14 +25,19 @@ freely, subject to the following restrictions:
#define __PolyVox_LargeVolume_H__
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Volume.h"
#include <limits>
#include <cassert>
#include <cstdlib> //For abort()
#include <cstring> //For memcpy
#include <list>
#include <map>
#include <set>
#include <memory>
#include <stdexcept> //For invalid_argument
#include <vector>
namespace PolyVox
@ -141,6 +146,9 @@ namespace PolyVox
/// This is true even if you are only reading data from the volume, as concurrently reading from different threads can invalidate the contents
/// of the block cache (amoung other problems).
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <typename VoxelType> class ConstVolumeProxy;
template <typename VoxelType>
class LargeVolume : public Volume<VoxelType>
{

View File

@ -21,18 +21,8 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
//Included here rather than in the .h because it refers to LargeVolume (avoids forward declaration)
#include "PolyVoxCore/ConstVolumeProxy.h"
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h"
#include <limits>
#include <cassert>
#include <cstdlib> //For abort()
#include <cstring> //For memcpy
#include <list>
#include <stdexcept> //For invalid_argument
namespace PolyVox
{

View File

@ -21,13 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Region.h"
#include <limits>
#define BORDER_LOW(x) ((( x >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != x)
#define BORDER_HIGH(x) ((( (x+1) >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != (x+1))
//#define BORDER_LOW(x) (( x % mVolume->m_uBlockSideLength) != 0)

View File

@ -24,7 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_LowPassFilter_H__
#define __PolyVox_LowPassFilter_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/IteratorController.h"
#include "PolyVoxCore/RawVolume.h" //Is this desirable?
#include "PolyVoxCore/Region.h"
namespace PolyVox

View File

@ -21,9 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/IteratorController.h"
#include "PolyVoxCore/RawVolume.h"
namespace PolyVox
{
template< template<typename> class SrcVolumeType, template<typename> class DestVolumeType, typename VoxelType>

View File

@ -24,7 +24,6 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Material_H__
#define __PolyVox_Material_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
#include <cassert>

View File

@ -24,7 +24,6 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_MaterialDensityPair_H__
#define __PolyVox_MaterialDensityPair_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
namespace PolyVox

View File

@ -24,7 +24,9 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_MeshDecimator_H__
#define __PolyVox_MeshDecimator_H__
#include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/VertexTypes.h"
#include <bitset>
#include <vector>

View File

@ -21,8 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/SurfaceMesh.h"
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////

View File

@ -60,18 +60,10 @@ namespace PolyVox
template <typename VoxelType> class Block;
template <typename VoxelType> class ConstVolumeProxy;
//---------- LargeVolume ----------
template <typename VoxelType> class LargeVolume;
//---------------------------------
//---------- Mesh ----------
class Mesh;
class MeshEdge;
class MeshFace;
class MeshVertex;
//---------------------------------
template <typename Type> class Density;
typedef Density<uint8_t> Density8;

View File

@ -24,12 +24,16 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RawVolume_H__
#define __PolyVox_RawVolume_H__
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Volume.h"
#include <cassert>
#include <cstdlib> //For abort()
#include <limits>
#include <memory>
#include <stdexcept> //For invalid_argument
namespace PolyVox
{

View File

@ -21,17 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/ConstVolumeProxy.h"
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h"
#include <limits>
#include <cassert>
#include <cstdlib> //For abort()
#include <stdexcept> //For invalid_argument
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////

View File

@ -21,13 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/RawVolume.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Region.h"
#include <limits>
#define BORDER_LOWX(val) (val > this->mVolume->getEnclosingRegion().getLowerCorner().getX())
#define BORDER_HIGHX(val) (val < this->mVolume->getEnclosingRegion().getUpperCorner().getX())
#define BORDER_LOWY(val) (val > this->mVolume->getEnclosingRegion().getLowerCorner().getY())

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Raycast_H__
#define __PolyVox_Raycast_H__
#include "PolyVoxCore/Vector.h"
namespace PolyVox
{
/// Stores the result of a raycast operation.

View File

@ -20,6 +20,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RaycastWithCallback_H__
#define __PolyVox_RaycastWithCallback_H__
#include "PolyVoxCore/Vector.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -20,6 +20,7 @@ freely, subject to the following restrictions:
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -25,6 +25,7 @@ freely, subject to the following restrictions:
#define __PolyVox_Region_H__
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Vector.h"
namespace PolyVox

View File

@ -24,12 +24,19 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SimpleVolume_H__
#define __PolyVox_SimpleVolume_H__
#include "PolyVoxImpl/Utility.h"
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Volume.h"
#include <cassert>
#include <cstdlib> //For abort()
#include <cstring> //For memcpy
#include <limits>
#include <memory>
#include <stdexcept> //For invalid_argument
namespace PolyVox
{

View File

@ -21,17 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/ConstVolumeProxy.h"
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h"
#include <limits>
#include <cassert>
#include <cstdlib> //For abort()
#include <stdexcept> //For invalid_argument
namespace PolyVox
{
////////////////////////////////////////////////////////////////////////////////

View File

@ -21,14 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxImpl/Utility.h"
#include "Vector.h"
#include <cassert>
#include <cstring> //For memcpy
#include <limits>
#include <stdexcept> //for std::invalid_argument
namespace PolyVox
{
template <typename VoxelType>

View File

@ -21,13 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/SimpleVolume.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Region.h"
#include <limits>
#define BORDER_LOW(x) ((( x >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != x)
#define BORDER_HIGH(x) ((( (x+1) >> this->mVolume->m_uBlockSideLengthPower) << this->mVolume->m_uBlockSideLengthPower) != (x+1))
//#define BORDER_LOW(x) (( x % this->mVolume->m_uBlockSideLength) != 0)

View File

@ -24,11 +24,12 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SurfaceExtractor_H__
#define __PolyVox_SurfaceExtractor_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/LargeVolume.h"
#include "PolyVoxImpl/MarchingCubesTables.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/SurfaceMesh.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Array.h"
#include "PolyVoxCore/MaterialDensityPair.h"
#include "PolyVoxCore/SurfaceMesh.h"
#include "PolyVoxImpl/MarchingCubesTables.h"
#include "PolyVoxCore/VertexTypes.h"
namespace PolyVox
{
template< template<typename> class VolumeType, typename VoxelType>

View File

@ -24,15 +24,18 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SurfaceMesh_H__
#define __PolyVox_SurfaceMesh_H__
#include <vector>
#include <set>
#include <memory>
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/VertexTypes.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/VertexTypes.h" //Should probably do away with this on in the future...
#include <algorithm>
#include <cstdlib>
#include <list>
#include <memory>
#include <set>
#include <vector>
namespace PolyVox
{
class LodRecord

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include <cstdlib>
#include <list>
#include <algorithm>
using namespace std;
namespace PolyVox
{
template <typename VertexType>
@ -366,7 +360,7 @@ namespace PolyVox
template <typename VertexType>
void SurfaceMesh<VertexType>::removeUnusedVertices(void)
{
vector<bool> isVertexUsed(m_vecVertices.size());
std::vector<bool> isVertexUsed(m_vecVertices.size());
fill(isVertexUsed.begin(), isVertexUsed.end(), false);
for(uint32_t triCt = 0; triCt < m_vecTriangleIndices.size(); triCt++)
@ -376,7 +370,7 @@ namespace PolyVox
}
int noOfUsedVertices = 0;
vector<uint32_t> newPos(m_vecVertices.size());
std::vector<uint32_t> newPos(m_vecVertices.size());
for(uint32_t vertCt = 0; vertCt < m_vecVertices.size(); vertCt++)
{
if(isVertexUsed[vertCt])

View File

@ -24,8 +24,11 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Vector_H__
#define __PolyVox_Vector_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
#include <cassert>
#include <cmath>
#include <cstring>
#include <iostream>
namespace PolyVox

View File

@ -21,11 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include <cassert>
#include <cmath>
#include <string>
#include <cstring>
namespace PolyVox
{
//-------------------------- Constructors, etc ---------------------------------

View File

@ -25,6 +25,7 @@ freely, subject to the following restrictions:
#define __PolyVox_SurfaceVertex_H__
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Vector.h"
#include <bitset>

View File

@ -24,11 +24,12 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Volume_H__
#define __PolyVox_Volume_H__
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxCore/Vector.h"
#include <cassert>
#include <limits>
#include <memory>
namespace PolyVox
{

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxCore/Log.h"
#include "PolyVoxCore/Region.h"
#include "PolyVoxCore/Vector.h"
#include <cassert>
namespace PolyVox
{
template <typename VoxelType>

View File

@ -24,8 +24,6 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_VolumeResampler_H__
#define __PolyVox_VolumeResampler_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
namespace PolyVox
{
template< template<typename> class SrcVolumeType, template<typename> class DestVolumeType, typename VoxelType>
@ -38,7 +36,6 @@ namespace PolyVox
private:
void resampleSameSize();
void resampleHalfSize();
void resampleArbitrary();
//Source data

View File

@ -21,12 +21,6 @@ freely, subject to the following restrictions:
distribution.
*******************************************************************************/
#include "PolyVoxImpl/Block.h"
#include "PolyVoxCore/Volume.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/Region.h"
#include <limits>
namespace PolyVox
{
template <typename VoxelType>

View File

@ -24,11 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_VoxelFilters_H__
#define __PolyVox_VoxelFilters_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/LargeVolume.h"
namespace PolyVox
{
template< template<typename> class VolumeType>

View File

@ -26,6 +26,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/Vector.h"
#include <algorithm>
#include <limits> //For numeric_limits
#include <set>
#include <vector>

View File

@ -24,7 +24,9 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_Block_H__
#define __PolyVox_Block_H__
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Vector.h"
#include <limits>
#include <vector>
@ -44,8 +46,6 @@ namespace PolyVox
static uint32_t maxRunlength(void) {return (std::numeric_limits<LengthType>::max)();}
};
//Make Sampler a friend
friend class LargeVolume<VoxelType>::Sampler;
public:
Block(uint16_t uSideLength = 0);

View File

@ -23,7 +23,6 @@ freely, subject to the following restrictions:
#include "PolyVoxImpl/Utility.h"
#include "PolyVoxCore/Vector.h"
#include "PolyVoxCore/LargeVolume.h"
#include <cassert>
#include <cstring> //For memcpy

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RandomUnitVectors_H__
#define __PolyVox_RandomUnitVectors_H__
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Vector.h"
namespace PolyVox

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_RandomVectors_H__
#define __PolyVox_RandomVectors_H__
#include "PolyVoxImpl/TypeDef.h"
#include "PolyVoxCore/Vector.h"
namespace PolyVox

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_SubArray_H__
#define __PolyVox_SubArray_H__
#include "PolyVoxImpl/TypeDef.h"
namespace PolyVox
{
template <uint32_t noOfDims, typename ElementType> class Array;