/// Gets the material weights of the specified position. /** * \param x The 'x' position of the voxel to get. * \param y The 'y' position of the voxel to get. * \param z The 'z' position of the voxel to get. * \return The material weights of the voxel. */ public MaterialSet GetVoxel(int x, int y, int z) { MaterialSet materialSet; if (volumeHandle.HasValue) { CubiquityDLL.GetVoxelMC(volumeHandle.Value, x, y, z, out materialSet); } else { // Should maybe throw instead? materialSet = new MaterialSet(); } return(materialSet); }
/// Gets the material weights of the specified position. /** * \param x The 'x' position of the voxel to get. * \param y The 'y' position of the voxel to get. * \param z The 'z' position of the voxel to get. * \return The material weights of the voxel. */ public MaterialSet GetVoxel(int x, int y, int z) { // The initialization can fail (bad filename, database locked, etc), so the volume handle could still be null. MaterialSet materialSet; if (volumeHandle.HasValue) { CubiquityDLL.GetVoxelMC(volumeHandle.Value, x, y, z, out materialSet); } else { materialSet = new MaterialSet(); } return(materialSet); }