/// <inheritdoc /> public IEnumerable <IVoxelProjection <TVoxel, TSurfaceData> > GetContourableProjections( IContourDeterminer <TVoxel> contourDeterminer) { IDualContourableContracts.GetContourableProjections(contourDeterminer); return(new EnumerableProjectionsIndexable <TVoxel, TSurfaceData>( contourDeterminer, this.voxels, this.start, this.end, this.stageIndexOrigin)); }
/// <inheritdoc /> public IEnumerable <IVoxelProjection <TerrainVoxel, TSurfaceData> > GetContourableProjections( IContourDeterminer <TerrainVoxel> contourDeterminer) { IDualContourableContracts.GetContourableProjections(contourDeterminer); return(new EnumerableProjectionsIndexable <TerrainVoxel, TSurfaceData>( contourDeterminer, this.voxels, Index3D.Zero, this.voxelChunkDimensionsInVoxels, this.stageVoxelIndexOfViewOrigin)); }
public FlatQuadContourer( IContourDeterminer <TVoxel> contourDeterminer, ISurfaceValueGenerator <TVoxel, TSurfaceData, Vector3> positioner, ISurfaceValueGenerator <TVoxel, TSurfaceData, Color> colorer, ISurfaceValueGenerator <TVoxel, TSurfaceData, Vector2> texturer) { Contracts.Requires.That(contourDeterminer != null); Contracts.Requires.That(positioner != null); Contracts.Requires.That(colorer != null); Contracts.Requires.That(texturer != null); this.contourDeterminer = contourDeterminer; this.positioner = positioner; this.colorer = colorer; this.texturer = texturer; }
/// <summary> /// Initializes a new instance of the <see cref="EnumerableProjectionsIndexable{TVoxel, TSurfaceData}" /> class. /// </summary> /// <param name="contourDeterminer">The delegate used to determine the contour.</param> /// <param name="voxels">The voxels to contour.</param> /// <param name="startContourAtIndex">The index to start the contour at.</param> /// <param name="dimensionsToContour">The dimensions of the bounds to contour.</param> /// <param name="stageIndexOrigin">The stage index of the zero index origin of the indexable voxels.</param> public EnumerableProjectionsIndexable( IContourDeterminer <TVoxel> contourDeterminer, IReadOnlyIndexable <Index3D, TVoxel> voxels, Index3D startContourAtIndex, Index3D dimensionsToContour, Index3D stageIndexOrigin) { Contracts.Requires.That(contourDeterminer != null); Contracts.Requires.That(voxels != null); Contracts.Requires.That(voxels.IsIndexValid(startContourAtIndex)); Contracts.Requires.That(dimensionsToContour.IsAllPositiveOrZero()); this.determiner = contourDeterminer; this.voxels = voxels; this.start = startContourAtIndex; this.end = startContourAtIndex + dimensionsToContour; this.stageIndexOrigin = stageIndexOrigin; }
public static void GetContourableProjections <TVoxel>(IContourDeterminer <TVoxel> contourDeterminer) where TVoxel : struct { Contracts.Requires.That(contourDeterminer != null); }