From 0785809ad392b0bef59c9b5c74c91e71f899ce9f Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Thu, 16 Aug 2012 08:17:47 +0000 Subject: [PATCH] added some content classes as base for the content importers --- .../ANX.Framework.Content.Pipeline.csproj | 10 ++ .../ContentImporter.cs | 2 + .../EffectImporter.cs | 27 ++++++ ANX.Framework.Content.Pipeline/FbxImporter.cs | 27 ++++++ .../Graphics/AnimationChannel.cs | 94 +++++++++++++++++++ .../Graphics/AnimationChannelDictionary.cs | 19 ++++ .../Graphics/AnimationContent.cs | 34 +++++++ .../Graphics/AnimationContentDictionary.cs | 22 +++++ .../Graphics/AnimationKeyframe.cs | 51 ++++++++++ .../Graphics/EffectContent.cs | 27 ++++++ .../Graphics/NodeContent.cs | 51 ++++++++++ .../Graphics/NodeContentCollection.cs | 32 +++++++ .../OpaqueDataDictionary.cs | 34 +++++++ 13 files changed, 430 insertions(+) create mode 100644 ANX.Framework.Content.Pipeline/EffectImporter.cs create mode 100644 ANX.Framework.Content.Pipeline/FbxImporter.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AnimationChannel.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AnimationChannelDictionary.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AnimationContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AnimationContentDictionary.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/AnimationKeyframe.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/EffectContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/NodeContent.cs create mode 100644 ANX.Framework.Content.Pipeline/Graphics/NodeContentCollection.cs create mode 100644 ANX.Framework.Content.Pipeline/OpaqueDataDictionary.cs diff --git a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj index d1d757f1..b0296f6f 100644 --- a/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj +++ b/ANX.Framework.Content.Pipeline/ANX.Framework.Content.Pipeline.csproj @@ -44,7 +44,17 @@ + + + + + + + + + + diff --git a/ANX.Framework.Content.Pipeline/ContentImporter.cs b/ANX.Framework.Content.Pipeline/ContentImporter.cs index 2fc8cd1c..1b556eba 100644 --- a/ANX.Framework.Content.Pipeline/ContentImporter.cs +++ b/ANX.Framework.Content.Pipeline/ContentImporter.cs @@ -19,6 +19,8 @@ namespace ANX.Framework.Content.Pipeline throw new NotImplementedException(); } + public abstract T Import(string filename, ContentImporterContext context); + Object ANX.Framework.Content.Pipeline.IContentImporter.Import(string filename, ContentImporterContext context) { throw new NotImplementedException(); diff --git a/ANX.Framework.Content.Pipeline/EffectImporter.cs b/ANX.Framework.Content.Pipeline/EffectImporter.cs new file mode 100644 index 00000000..b36d919d --- /dev/null +++ b/ANX.Framework.Content.Pipeline/EffectImporter.cs @@ -0,0 +1,27 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ANX.Framework.Content.Pipeline.Graphics; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline +{ + public class EffectImporter : ContentImporter + { + public EffectImporter() + { + } + + public override EffectContent Import(string filename, ContentImporterContext context) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/FbxImporter.cs b/ANX.Framework.Content.Pipeline/FbxImporter.cs new file mode 100644 index 00000000..db5e11f1 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/FbxImporter.cs @@ -0,0 +1,27 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ANX.Framework.Content.Pipeline.Graphics; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline +{ + public class FbxImporter : ContentImporter + { + public FbxImporter() + { + } + + public override NodeContent Import(string filename, ContentImporterContext context) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/AnimationChannel.cs b/ANX.Framework.Content.Pipeline/Graphics/AnimationChannel.cs new file mode 100644 index 00000000..aa4c8b04 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AnimationChannel.cs @@ -0,0 +1,94 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class AnimationChannel : ICollection, IEnumerable, IEnumerable + { + public AnimationChannel() + { + throw new NotImplementedException(); + } + + public int Count + { + get + { + throw new NotImplementedException(); + } + } + + public AnimationKeyframe this[int index] + { + get + { + throw new NotImplementedException(); + } + } + + public void Add(AnimationKeyframe item) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(AnimationKeyframe item) + { + throw new NotImplementedException(); + } + + public IEnumerator GetEnumerator() + { + throw new NotImplementedException(); + } + + public int IndexOf(AnimationKeyframe item) + { + throw new NotImplementedException(); + } + + public bool Remove(AnimationKeyframe item) + { + throw new NotImplementedException(); + } + + public void RemoveAt(int index) + { + throw new NotImplementedException(); + } + + bool ICollection.IsReadOnly + { + get { throw new NotImplementedException(); } + } + + void ICollection.Add(AnimationKeyframe item) + { + throw new NotImplementedException(); + } + + void ICollection.CopyTo(AnimationKeyframe[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/AnimationChannelDictionary.cs b/ANX.Framework.Content.Pipeline/Graphics/AnimationChannelDictionary.cs new file mode 100644 index 00000000..a728dff7 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AnimationChannelDictionary.cs @@ -0,0 +1,19 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class AnimationChannelDictionary : NamedValueDictionary + { + + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/AnimationContent.cs b/ANX.Framework.Content.Pipeline/Graphics/AnimationContent.cs new file mode 100644 index 00000000..7006e223 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AnimationContent.cs @@ -0,0 +1,34 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public class AnimationContent : ContentItem + { + public AnimationContent() + { + } + + public AnimationChannelDictionary Channels + { + get; + private set; + } + + public TimeSpan Duration + { + get; + set; + } + + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/AnimationContentDictionary.cs b/ANX.Framework.Content.Pipeline/Graphics/AnimationContentDictionary.cs new file mode 100644 index 00000000..277ff08e --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AnimationContentDictionary.cs @@ -0,0 +1,22 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class AnimationContentDictionary : NamedValueDictionary + { + public AnimationContentDictionary() + { + } + + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/AnimationKeyframe.cs b/ANX.Framework.Content.Pipeline/Graphics/AnimationKeyframe.cs new file mode 100644 index 00000000..4fd83a4e --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/AnimationKeyframe.cs @@ -0,0 +1,51 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class AnimationKeyframe : IComparable + { + private TimeSpan time; + private Matrix transform; + + public AnimationKeyframe(TimeSpan time, Matrix transform) + { + this.time = time; + this.transform = transform; + } + + public TimeSpan Time + { + get + { + return this.time; + } + } + + public Matrix Transform + { + get + { + return this.transform; + } + set + { + this.transform = value; + } + } + + public int CompareTo(AnimationKeyframe other) + { + return time.CompareTo(other.time); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/EffectContent.cs b/ANX.Framework.Content.Pipeline/Graphics/EffectContent.cs new file mode 100644 index 00000000..9049de1c --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/EffectContent.cs @@ -0,0 +1,27 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public class EffectContent : ContentItem + { + public EffectContent() + { + } + + public string EffectCode + { + get; + set; + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/NodeContent.cs b/ANX.Framework.Content.Pipeline/Graphics/NodeContent.cs new file mode 100644 index 00000000..e562bebb --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/NodeContent.cs @@ -0,0 +1,51 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public class NodeContent : ContentItem + { + public NodeContent() + { + } + + public Matrix AbsolutTransform + { + get; + private set; + } + + public AnimationContentDictionary Animation + { + get; + private set; + } + + public NodeContentCollection Children + { + get; + private set; + } + + public NodeContent Parent + { + get; + set; + } + + public Matrix Transform + { + get; + set; + } + } +} diff --git a/ANX.Framework.Content.Pipeline/Graphics/NodeContentCollection.cs b/ANX.Framework.Content.Pipeline/Graphics/NodeContentCollection.cs new file mode 100644 index 00000000..b172e778 --- /dev/null +++ b/ANX.Framework.Content.Pipeline/Graphics/NodeContentCollection.cs @@ -0,0 +1,32 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline.Graphics +{ + public sealed class NodeContentCollection : ChildCollection + { + public NodeContentCollection(NodeContent parent) + : base(parent) + { + } + + protected override NodeContent GetParent(NodeContent child) + { + throw new NotImplementedException(); + } + + protected override void SetParent(NodeContent child, NodeContent parent) + { + throw new NotImplementedException(); + } + } +} diff --git a/ANX.Framework.Content.Pipeline/OpaqueDataDictionary.cs b/ANX.Framework.Content.Pipeline/OpaqueDataDictionary.cs new file mode 100644 index 00000000..34ef419b --- /dev/null +++ b/ANX.Framework.Content.Pipeline/OpaqueDataDictionary.cs @@ -0,0 +1,34 @@ +#region Using Statements +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +#endregion + +// This file is part of the ANX.Framework created by the +// "ANX.Framework developer group" and released under the Ms-PL license. +// For details see: http://anxframework.codeplex.com/license + +namespace ANX.Framework.Content.Pipeline +{ + public sealed class OpaqueDataDictionary : NamedValueDictionary + { + public OpaqueDataDictionary() + { + throw new NotImplementedException(); + } + + public string GetContentAsXml() + { + throw new NotImplementedException(); + } + + public T GetValue(string key, T defaultValue) + { + throw new NotImplementedException(); + } + + + } +}