forked from megasus/WoWEditor
/
MapArea.cs
48 lines (38 loc) · 1.59 KB
/
MapArea.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using SharpDX;
using WoWEditor6.IO.Files.Models;
namespace WoWEditor6.IO.Files.Terrain
{
abstract class MapArea : IDisposable
{
public int IndexX { get; protected set; }
public int IndexY { get; protected set; }
public string Continent { get; protected set; }
public bool IsValid { get; protected set; }
public List<M2Instance> DoodadInstances { get; private set; }
public AdtVertex[] FullVertices { get; private set; }
// ReSharper disable once UnusedAutoPropertyAccessor.Global
public BoundingBox BoundingBox { get; protected set; }
public BoundingBox ModelBox { get; protected set; }
protected MapArea()
{
IsValid = true;
DoodadInstances = new List<M2Instance>();
FullVertices = new AdtVertex[145 * 256];
}
public virtual void Dispose()
{
DoodadInstances.Clear();
}
public abstract void Save();
public abstract Graphics.Texture GetTexture(int index);
public abstract void AsyncLoad();
public abstract MapChunk GetChunk(int index);
public abstract bool Intersect(ref Ray ray, out MapChunk chunk, out float distance);
public abstract bool OnChangeTerrain(Editing.TerrainChangeParameters parameters);
public abstract void OnUpdateModelPositions(Editing.TerrainChangeParameters parameters);
public abstract void UpdateNormals();
public abstract bool OnTextureTerrain(Editing.TextureChangeParameters parameters);
}
}