Added surface extractor tests templatised on voxel type.
This commit is contained in:
		| @@ -32,19 +32,6 @@ freely, subject to the following restrictions: | ||||
|  | ||||
| namespace PolyVox | ||||
| { | ||||
| 	template<> | ||||
| 	class VoxelTypeTraits< uint8_t >	 | ||||
| 	{ | ||||
| 	public: | ||||
| 		typedef uint8_t DensityType; | ||||
| 		static const bool HasDensity = true; | ||||
| 		static const bool HasMaterial = false; | ||||
| 		static bool hasDensity() { return true; } | ||||
| 		static bool hasMaterial() { return false; } | ||||
| 		static uint8_t minDensity() { return 0; } | ||||
| 		static uint8_t maxDensity() { return 255; } | ||||
| 	}; | ||||
|  | ||||
| 	template< template<typename> class VolumeType, typename VoxelType> | ||||
| 	class SurfaceExtractor | ||||
| 	{ | ||||
|   | ||||
| @@ -88,6 +88,19 @@ namespace PolyVox | ||||
| 	{ | ||||
| 		return voxel; | ||||
| 	} | ||||
|  | ||||
| 	template<> | ||||
| 	class VoxelTypeTraits< uint8_t >	 | ||||
| 	{ | ||||
| 	public: | ||||
| 		typedef uint8_t DensityType; | ||||
| 		static const bool HasDensity = true; | ||||
| 		static const bool HasMaterial = false; | ||||
| 		static bool hasDensity() { return true; } | ||||
| 		static bool hasMaterial() { return false; } | ||||
| 		static uint8_t minDensity() { return 0; } | ||||
| 		static uint8_t maxDensity() { return 255; } | ||||
| 	}; | ||||
| } | ||||
|  | ||||
| #endif //__PolyVox_Voxel_H__ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user