/// Sets the material weights of the specified position. /** * \param x The 'x' position of the voxel to set. * \param y The 'y' position of the voxel to set. * \param z The 'z' position of the voxel to set. * \param materialSet The material weights the voxel should be set to. */ public void SetVoxel(int x, int y, int z, MaterialSet materialSet) { if (volumeHandle.HasValue) { if (x >= enclosingRegion.lowerCorner.x && y >= enclosingRegion.lowerCorner.y && z >= enclosingRegion.lowerCorner.z && x <= enclosingRegion.upperCorner.x && y <= enclosingRegion.upperCorner.y && z <= enclosingRegion.upperCorner.z) { CubiquityDLL.SetVoxelMC(volumeHandle.Value, x, y, z, materialSet); } } }
/// Sets the material weights of the specified position. /** * \param x The 'x' position of the voxel to set. * \param y The 'y' position of the voxel to set. * \param z The 'z' position of the voxel to set. * \param materialSet The material weights the voxel should be set to. */ public void SetVoxel(int x, int y, int z, MaterialSet materialSet) { // The initialization can fail (bad filename, database locked, etc), so the volume handle could still be null. if (volumeHandle.HasValue) { if (x >= enclosingRegion.lowerCorner.x && y >= enclosingRegion.lowerCorner.y && z >= enclosingRegion.lowerCorner.z && x <= enclosingRegion.upperCorner.x && y <= enclosingRegion.upperCorner.y && z <= enclosingRegion.upperCorner.z) { CubiquityDLL.SetVoxelMC(volumeHandle.Value, x, y, z, materialSet); } } }