added some content classes as base for the content importers

This commit is contained in:
Glatzemann 2012-08-16 08:17:47 +00:00
parent 91e6bff34c
commit 0785809ad3
13 changed files with 430 additions and 0 deletions

View File

@ -44,7 +44,17 @@
<Compile Include="ContentProcessor.cs" />
<Compile Include="ContentProcessorAttribute.cs" />
<Compile Include="ContextProcessorContext.cs" />
<Compile Include="EffectImporter.cs" />
<Compile Include="ExternalReference.cs" />
<Compile Include="FbxImporter.cs" />
<Compile Include="Graphics\AnimationChannel.cs" />
<Compile Include="Graphics\AnimationChannelDictionary.cs" />
<Compile Include="Graphics\AnimationContent.cs" />
<Compile Include="Graphics\AnimationContentDictionary.cs" />
<Compile Include="Graphics\AnimationKeyframe.cs" />
<Compile Include="Graphics\EffectContent.cs" />
<Compile Include="Graphics\NodeContent.cs" />
<Compile Include="Graphics\NodeContentCollection.cs" />
<Compile Include="IContentImporter.cs" />
<Compile Include="IContentProcessor.cs" />
<Compile Include="NamedValueDictionary.cs" />

View File

@ -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();

View File

@ -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<EffectContent>
{
public EffectImporter()
{
}
public override EffectContent Import(string filename, ContentImporterContext context)
{
throw new NotImplementedException();
}
}
}

View File

@ -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<NodeContent>
{
public FbxImporter()
{
}
public override NodeContent Import(string filename, ContentImporterContext context)
{
throw new NotImplementedException();
}
}
}

View File

@ -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<AnimationKeyframe>, IEnumerable<AnimationKeyframe>, 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<AnimationKeyframe> 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<AnimationKeyframe>.IsReadOnly
{
get { throw new NotImplementedException(); }
}
void ICollection<AnimationKeyframe>.Add(AnimationKeyframe item)
{
throw new NotImplementedException();
}
void ICollection<AnimationKeyframe>.CopyTo(AnimationKeyframe[] array, int arrayIndex)
{
throw new NotImplementedException();
}
IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
}
}

View File

@ -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<AnimationChannel>
{
}
}

View File

@ -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;
}
}
}

View File

@ -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<AnimationContent>
{
public AnimationContentDictionary()
{
}
}
}

View File

@ -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<AnimationKeyframe>
{
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);
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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<NodeContent, NodeContent>
{
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();
}
}
}

View File

@ -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<Object>
{
public OpaqueDataDictionary()
{
throw new NotImplementedException();
}
public string GetContentAsXml()
{
throw new NotImplementedException();
}
public T GetValue<T>(string key, T defaultValue)
{
throw new NotImplementedException();
}
}
}