Added code to determine how much memory a volume is using.
Also map of homogenous regions is no longer static.
This commit is contained in:
		| @@ -169,5 +169,19 @@ namespace PolyVox | ||||
| 		} | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	template <typename VoxelType> | ||||
| 	uint32_t Block<VoxelType>::sizeInChars(void) | ||||
| 	{ | ||||
| 		uint32_t uSizeInChars = sizeof(Block<VoxelType>); | ||||
|  | ||||
| 		if(m_tData != 0) | ||||
| 		{ | ||||
| 			const uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength; | ||||
| 			uSizeInChars += uNoOfVoxels * sizeof(VoxelType); | ||||
| 		} | ||||
|  | ||||
| 		return  uSizeInChars; | ||||
| 	} | ||||
| 	#pragma endregion | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user