/// <summary> /// Initializes a new instance of the <see cref="TerrainTile"/> class with the specified /// material. /// </summary> /// <param name="graphicsService">The graphic service.</param> /// <param name="material">The material. Can be <see langword="null"/> - see remarks.</param> /// <remarks> /// The specified material is used to render the terrain geometry (heights, normals, holes) into /// the clipmaps. When the <paramref name="material"/> is <see langword="null"/>, no geometry is /// rendered into the terrain tile. /// </remarks> /// <exception cref="ArgumentNullException"> /// <paramref name="graphicsService"/> is <see langword="null"/>. /// </exception> public TerrainTile(IGraphicsService graphicsService, Material material) { if (graphicsService == null) { throw new ArgumentNullException("graphicsService"); } Material = material; Layers = new TerrainLayerCollection(this); UpdateAabb(); }
public TerrainTile(IGraphicsService graphicsService) { if (graphicsService == null) { throw new ArgumentNullException("graphicsService"); } // ReSharper disable once DoNotCallOverridableMethodsInConstructor Material = OnCreateMaterial(graphicsService); Layers = new TerrainLayerCollection(this); UpdateAabb(); }