public LayerTerrainComponent(PlanarTerrain terrain, Format format) : base(terrain) { if (format == null) throw new ArgumentNullException("format"); Format = format; }
public HeightTerrainComponent(PlanarTerrain terrain, Format format) : base(terrain, format) { foreach (PlanarTerrainBlock block in terrain.Blocks) { block.HeightTexture = Get(block); } }
public LayerTerrainComponent(PlanarTerrain terrain, Format format) : base(terrain) { if (format == null) { throw new ArgumentNullException("format"); } Format = format; }
/// <summary>Initialize the normal layer.</summary> /// <param name="terrain"></param> public NormalTerrainComponent(PlanarTerrain terrain) : base(terrain, Formats.Vector4nb) { foreach (PlanarTerrainBlock block in terrain.Blocks) { RecreateNormalMap(block); block.NormalTexture = Get(block); } }
public TerrainComponent(PlanarTerrain terrain) { if (terrain == null) throw new ArgumentNullException("terrain"); Terrain = terrain; terrain.ComponentsMutable.Add(this); if (SupportsNodeLodBlend) terrain.ComponentsNodeLodBlend.Add(this); if (SupportsNodeClip) terrain.ComponentsNodeClip.Add(this); }
internal PlanarTerrainBlock(PlanarTerrain terrain, Vector2i blockIndex) { this.terrain = terrain; this.blockIndex = blockIndex; int size = terrain.BlockSize; //heightTexture = new Texture2D(device, size, size, true, Format.Single, DepthFormat.None, 0, RenderTargetUsage.PlatformContents); //heightBackBuffer = new Texture2D(device, size, size, true, Format.Single, DepthFormat.None, 0, RenderTargetUsage.PlatformContents); treeRoot = new TerrainTreeNode(this, new Vector2i(0, 0), size, terrain.DeepestLod); DirtyTreeArea = new Box2i(0, 0, size, size); }
/// <summary>Detach the <see cref="TerrainComponent"/> from the <see cref="Terrain"/>.</summary> public void Detach() { if (Terrain != null) throw new InvalidOperationException("The module has already been detached from the terrain."); Terrain.ComponentsMutable.Remove(this); OnDetach(); if (Detached != null) Detached(this, EventArgs.Empty); if (SupportsNodeLodBlend) Terrain.ComponentsNodeLodBlend.Remove(this); if (SupportsNodeClip) Terrain.ComponentsNodeClip.Remove(this); Terrain = null; }
public DistanceLodTerrainComponent(PlanarTerrain terrain) : base(terrain) { }
/// <summary> /// Initialise the clip module using the given clip function. /// </summary> /// <param name="terrain">The terrain to add this module to.</param> public ClipTerrainComponent(PlanarTerrain terrain) : base(terrain) { }
public FrustumClipTerrainModule(PlanarTerrain terrain) : base(terrain) { Frustum = new Frustum(Matrix4d.Identity); }
public AttachedTreeTerrainModule(PlanarTerrain terrain) : base(terrain) { }
public HeightTerrainComponent(PlanarTerrain terrain, Format format) : base(terrain, format) { foreach (PlanarTerrainBlock block in terrain.Blocks) block.HeightTexture = Get(block); }
public HeightTerrainComponent(PlanarTerrain terrain) : this(terrain, Formats.Vector1f) { }
public GrassTerrainComponent(PlanarTerrain terrain) : base(terrain) { }
public ColorTerrainComponent(PlanarTerrain terrain, Format format) : base(terrain, format) { }
/// <summary>Initialize the <see cref="OcclusionQueryTerrainComponent"/>.</summary> /// <param name="terrain">The <see cref="PlanarTerrain"/> this is to be a <see cref="TerrainComponent"/> for.</param> public OcclusionQueryTerrainComponent(PlanarTerrain terrain) : base(terrain) { }