Made raycasting, ambient occlusion, and A* pathfinding independant of volume type.

This commit is contained in:
David Williams
2011-05-01 17:26:12 +01:00
parent 27968973a4
commit 6a38d9fca7
8 changed files with 68 additions and 66 deletions

View File

@ -29,19 +29,19 @@ freely, subject to the following restrictions:
namespace PolyVox
{
template <typename VoxelType>
template< template<typename> class VolumeType, typename VoxelType>
class AmbientOcclusionCalculator
{
public:
AmbientOcclusionCalculator(LargeVolume<VoxelType>* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement);
AmbientOcclusionCalculator(VolumeType<VoxelType>* volInput, Array<3, uint8_t>* arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement);
~AmbientOcclusionCalculator();
void execute(void);
private:
Region m_region;
typename LargeVolume<VoxelType>::Sampler m_sampVolume;
LargeVolume<VoxelType>* m_volInput;
typename VolumeType<VoxelType>::Sampler m_sampVolume;
VolumeType<VoxelType>* m_volInput;
Array<3, uint8_t>* m_arrayResult;
float m_fRayLength;