Fixed usage of region which was too large for the cubic surface extractor.
This commit is contained in:
		| @@ -29,10 +29,10 @@ namespace PolyVox | ||||
| 	CubicSurfaceExtractor<VolumeType, MeshType, IsQuadNeeded>::CubicSurfaceExtractor(VolumeType* volData, Region region, MeshType* result, IsQuadNeeded isQuadNeeded, bool bMergeQuads) | ||||
| 	{ | ||||
| 		// This extractor has a limit as to how large the extracted region can be, because the vertex positions are encoded with a single byte per component. | ||||
| 		int32_t maxReionDimension = 256; | ||||
| 		POLYVOX_THROW_IF(region.getWidthInVoxels() > maxReionDimension, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
| 		POLYVOX_THROW_IF(region.getHeightInVoxels() > maxReionDimension, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
| 		POLYVOX_THROW_IF(region.getDepthInVoxels() > maxReionDimension, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
| 		int32_t maxReionDimensionInVoxels = 255; | ||||
| 		POLYVOX_THROW_IF(region.getWidthInVoxels() > maxReionDimensionInVoxels, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
| 		POLYVOX_THROW_IF(region.getHeightInVoxels() > maxReionDimensionInVoxels, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
| 		POLYVOX_THROW_IF(region.getDepthInVoxels() > maxReionDimensionInVoxels, std::invalid_argument, "Requested extraction region exceeds maximum dimensions"); | ||||
|  | ||||
| 		Timer timer; | ||||
| 		result->clear(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user