コード例 #1
0
 /// <summary>
 ///   An empty default MapVoxelMesh.
 /// </summary>
 public MapVoxelMesh()
 {
   this._chunks = new Dictionary<VoxelLocation, IVoxelMesh>();
   this._chunkBuilder = new OctreeChunckBuilder();
   this._max = new VoxelLocation();
   this._min = new VoxelLocation();
 }
コード例 #2
0
    /// <summary>
    ///   Copy an existing MapVoxelMesh.
    /// </summary>
    /// <param name="toCopy"></param>
    public MapVoxelMesh(MapVoxelMesh toCopy)
    {
      this._chunks = new Dictionary<VoxelLocation, IVoxelMesh>();
      this._chunkBuilder = (IChunckBuilder)toCopy._chunkBuilder.Copy();
      this._max = new VoxelLocation(toCopy._max);
      this._min = new VoxelLocation(toCopy._min);

      this.Copy(toCopy.Start, toCopy.End, toCopy.Start, toCopy);
    }
コード例 #3
0
    /// <summary>
    ///   Copy an existing VoxelMesh with a custom chunck configuration.
    /// </summary>
    /// <param name="toCopy"></param>
    /// <param name="builder"></param>
    public MapVoxelMesh(IVoxelMesh toCopy, IChunckBuilder builder)
    {
      this._chunks = new Dictionary<VoxelLocation, IVoxelMesh>();
      this._chunkBuilder = builder;

      this.Copy(toCopy.Start, toCopy.End, toCopy.Start, toCopy);
      this.EvaluateSize();
    }
コード例 #4
0
 /// <summary>
 ///   Create a MapVoxelMesh with a custom chunck configuration.
 /// </summary>
 /// <param name="builder"></param>
 public MapVoxelMesh(IChunckBuilder builder)
 {
   this._chunks = new Dictionary<VoxelLocation, IVoxelMesh>();
   this._chunkBuilder = builder;
   this._max = new VoxelLocation();
   this._min = new VoxelLocation();
 }