UltimateZoneBuilder/Source/Core/GZBuilder/Data/ModelData.cs

48 lines
1.2 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2012-04-17 19:13:47 +00:00
using SlimDX;
using SlimDX.Direct3D9;
using CodeImp.DoomBuilder.GZBuilder.MD3;
2012-04-17 19:13:47 +00:00
namespace CodeImp.DoomBuilder.GZBuilder.Data
{
internal sealed class ModelData
{
internal List<string> ModelNames;
internal List<string> TextureNames;
2012-04-17 19:13:47 +00:00
internal GZModel Model;
2012-04-17 19:13:47 +00:00
private ModelLoadState loadstate;
public ModelLoadState LoadState { get { return loadstate; } internal set { loadstate = value; } }
internal Vector3 Scale;
internal float zOffset;
2012-04-17 19:13:47 +00:00
internal float AngleOffset; //in radians
internal float PitchOffset; //in radians
internal float RollOffset; //in radians
internal bool OverridePalette; //used for voxel models only
internal bool IsVoxel;
internal bool InheritActorPitch;
internal bool InheritActorRoll;
internal ModelData() {
ModelNames = new List<string>();
TextureNames = new List<string>();
Scale = new Vector3(1, 1, 1);
}
internal void Dispose() {
if (Model != null) {
foreach (Mesh mesh in Model.Meshes)
mesh.Dispose();
foreach (Texture t in Model.Textures)
t.Dispose();
loadstate = ModelLoadState.None;
}
}
}
2012-04-17 19:13:47 +00:00
}