- Working on tests for all the graphics collection classes (Finished: ModelBoneCollection, DisplayModeCollection, ModelBone)
- Added some excludes to the AssemblyLoader to decrease startup time a little bit
This commit is contained in:
parent
72ee0fd837
commit
6c488dbca5
@ -106,6 +106,7 @@
|
|||||||
<Compile Include="Graphics\VertexContent.cs" />
|
<Compile Include="Graphics\VertexContent.cs" />
|
||||||
<Compile Include="IContentImporter.cs" />
|
<Compile Include="IContentImporter.cs" />
|
||||||
<Compile Include="IContentProcessor.cs" />
|
<Compile Include="IContentProcessor.cs" />
|
||||||
|
<Compile Include="Importer\FontDescriptionImporter.cs" />
|
||||||
<Compile Include="Importer\TextureImporter.cs" />
|
<Compile Include="Importer\TextureImporter.cs" />
|
||||||
<Compile Include="Importer\WavImporter.cs" />
|
<Compile Include="Importer\WavImporter.cs" />
|
||||||
<Compile Include="Importer\XmlImporter.cs" />
|
<Compile Include="Importer\XmlImporter.cs" />
|
||||||
@ -184,6 +185,7 @@
|
|||||||
<Compile Include="TargetPlatform.cs" />
|
<Compile Include="TargetPlatform.cs" />
|
||||||
<Compile Include="Tasks\BuildContent.cs" />
|
<Compile Include="Tasks\BuildContent.cs" />
|
||||||
<Compile Include="Tasks\BuildItem.cs" />
|
<Compile Include="Tasks\BuildItem.cs" />
|
||||||
|
<Compile Include="Tasks\BuildModeConverter.cs" />
|
||||||
<Compile Include="Tasks\ContentProject.cs" />
|
<Compile Include="Tasks\ContentProject.cs" />
|
||||||
<Compile Include="Tasks\ImporterConverter.cs" />
|
<Compile Include="Tasks\ImporterConverter.cs" />
|
||||||
<Compile Include="Tasks\ImporterManager.cs" />
|
<Compile Include="Tasks\ImporterManager.cs" />
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
<Compile Include="Graphics\VertexContent.cs" />
|
<Compile Include="Graphics\VertexContent.cs" />
|
||||||
<Compile Include="IContentImporter.cs" />
|
<Compile Include="IContentImporter.cs" />
|
||||||
<Compile Include="IContentProcessor.cs" />
|
<Compile Include="IContentProcessor.cs" />
|
||||||
|
<Compile Include="Importer\FontDescriptionImporter.cs" />
|
||||||
<Compile Include="Importer\TextureImporter.cs" />
|
<Compile Include="Importer\TextureImporter.cs" />
|
||||||
<Compile Include="Importer\WavImporter.cs" />
|
<Compile Include="Importer\WavImporter.cs" />
|
||||||
<Compile Include="Importer\XmlImporter.cs" />
|
<Compile Include="Importer\XmlImporter.cs" />
|
||||||
@ -186,6 +187,7 @@
|
|||||||
<Compile Include="TargetPlatform.cs" />
|
<Compile Include="TargetPlatform.cs" />
|
||||||
<Compile Include="Tasks\BuildContent.cs" />
|
<Compile Include="Tasks\BuildContent.cs" />
|
||||||
<Compile Include="Tasks\BuildItem.cs" />
|
<Compile Include="Tasks\BuildItem.cs" />
|
||||||
|
<Compile Include="Tasks\BuildModeConverter.cs" />
|
||||||
<Compile Include="Tasks\ContentProject.cs" />
|
<Compile Include="Tasks\ContentProject.cs" />
|
||||||
<Compile Include="Tasks\ImporterConverter.cs" />
|
<Compile Include="Tasks\ImporterConverter.cs" />
|
||||||
<Compile Include="Tasks\ImporterManager.cs" />
|
<Compile Include="Tasks\ImporterManager.cs" />
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
<Compile Include="Graphics\VertexContent.cs" />
|
<Compile Include="Graphics\VertexContent.cs" />
|
||||||
<Compile Include="IContentImporter.cs" />
|
<Compile Include="IContentImporter.cs" />
|
||||||
<Compile Include="IContentProcessor.cs" />
|
<Compile Include="IContentProcessor.cs" />
|
||||||
|
<Compile Include="Importer\FontDescriptionImporter.cs" />
|
||||||
<Compile Include="Importer\TextureImporter.cs" />
|
<Compile Include="Importer\TextureImporter.cs" />
|
||||||
<Compile Include="Importer\WavImporter.cs" />
|
<Compile Include="Importer\WavImporter.cs" />
|
||||||
<Compile Include="Importer\XmlImporter.cs" />
|
<Compile Include="Importer\XmlImporter.cs" />
|
||||||
@ -187,6 +188,7 @@
|
|||||||
<Compile Include="TargetPlatform.cs" />
|
<Compile Include="TargetPlatform.cs" />
|
||||||
<Compile Include="Tasks\BuildContent.cs" />
|
<Compile Include="Tasks\BuildContent.cs" />
|
||||||
<Compile Include="Tasks\BuildItem.cs" />
|
<Compile Include="Tasks\BuildItem.cs" />
|
||||||
|
<Compile Include="Tasks\BuildModeConverter.cs" />
|
||||||
<Compile Include="Tasks\ContentProject.cs" />
|
<Compile Include="Tasks\ContentProject.cs" />
|
||||||
<Compile Include="Tasks\ImporterConverter.cs" />
|
<Compile Include="Tasks\ImporterConverter.cs" />
|
||||||
<Compile Include="Tasks\ImporterManager.cs" />
|
<Compile Include="Tasks\ImporterManager.cs" />
|
||||||
|
@ -70,6 +70,17 @@
|
|||||||
<Compile Include="Strukturen\EventArgsTest.cs" />
|
<Compile Include="Strukturen\EventArgsTest.cs" />
|
||||||
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\DisplayModeCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectAnnotationCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectParameterCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectPassCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectTechniqueCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelEffectCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshPartCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\SamplerStateCollectionTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
||||||
|
@ -70,6 +70,17 @@
|
|||||||
<Compile Include="Strukturen\EventArgsTest.cs" />
|
<Compile Include="Strukturen\EventArgsTest.cs" />
|
||||||
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\DisplayModeCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectAnnotationCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectParameterCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectPassCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectTechniqueCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelEffectCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshPartCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\SamplerStateCollectionTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
||||||
|
@ -71,6 +71,17 @@
|
|||||||
<Compile Include="Strukturen\EventArgsTest.cs" />
|
<Compile Include="Strukturen\EventArgsTest.cs" />
|
||||||
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\DisplayModeCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectAnnotationCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectParameterCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectPassCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectTechniqueCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelEffectCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshPartCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\SamplerStateCollectionTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
||||||
|
@ -72,6 +72,17 @@
|
|||||||
<Compile Include="Strukturen\EventArgsTest.cs" />
|
<Compile Include="Strukturen\EventArgsTest.cs" />
|
||||||
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
<Compile Include="Strukturen\GameServiceContainerTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
<Compile Include="Strukturen\Graphics\DisplayModeTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\DisplayModeCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectAnnotationCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectParameterCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectPassCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\EffectTechniqueCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelBoneTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelEffectCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\ModelMeshPartCollectionTest.cs" />
|
||||||
|
<Compile Include="Strukturen\Graphics\SamplerStateCollectionTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionNormalTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionColorTextureTest.cs" />
|
||||||
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
<Compile Include="Strukturen\Graphics\VertexPositionTextureTest.cs" />
|
||||||
|
@ -3,6 +3,7 @@ using ANX.Framework.Audio;
|
|||||||
using ANX.Framework.GamerServices;
|
using ANX.Framework.GamerServices;
|
||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
using ANX.Framework.Input;
|
using ANX.Framework.Input;
|
||||||
|
using ANX.Framework.Input.Touch;
|
||||||
using ANX.Framework.Media;
|
using ANX.Framework.Media;
|
||||||
using ANX.Framework.Net;
|
using ANX.Framework.Net;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -65,6 +66,9 @@ namespace ANX.Framework.TestCenter.Strukturen
|
|||||||
new object[] { typeof(Microsoft.Xna.Framework.Media.MediaSourceType), typeof(MediaSourceType) },
|
new object[] { typeof(Microsoft.Xna.Framework.Media.MediaSourceType), typeof(MediaSourceType) },
|
||||||
new object[] { typeof(Microsoft.Xna.Framework.Media.MediaState), typeof(MediaState) },
|
new object[] { typeof(Microsoft.Xna.Framework.Media.MediaState), typeof(MediaState) },
|
||||||
|
|
||||||
|
new object[] { typeof(Microsoft.Xna.Framework.Input.Touch.GestureType), typeof(GestureType) },
|
||||||
|
new object[] { typeof(Microsoft.Xna.Framework.Input.Touch.TouchLocationState), typeof(TouchLocationState) },
|
||||||
|
|
||||||
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionEndReason), typeof(NetworkSessionEndReason) },
|
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionEndReason), typeof(NetworkSessionEndReason) },
|
||||||
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionJoinError), typeof(NetworkSessionJoinError) },
|
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionJoinError), typeof(NetworkSessionJoinError) },
|
||||||
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionState), typeof(NetworkSessionState) },
|
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionState), typeof(NetworkSessionState) },
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Reflection;
|
||||||
|
using ANX.Framework.Graphics;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using XNADisplayMode = Microsoft.Xna.Framework.Graphics.DisplayMode;
|
||||||
|
using XNADisplayModeCollection = Microsoft.Xna.Framework.Graphics.DisplayModeCollection;
|
||||||
|
using XNASurfaceFormat = Microsoft.Xna.Framework.Graphics.SurfaceFormat;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class DisplayModeCollectionTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Accessor()
|
||||||
|
{
|
||||||
|
var xnaModeParameters = new object[] { 800, 600, XNASurfaceFormat.Color };
|
||||||
|
var xnaMode = (XNADisplayMode)Activator.CreateInstance(typeof(XNADisplayMode),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, xnaModeParameters, CultureInfo.InvariantCulture);
|
||||||
|
var anxModeParameters = new object[] { 800, 600, SurfaceFormat.Color };
|
||||||
|
var anxMode = (DisplayMode)Activator.CreateInstance(typeof(DisplayMode),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, anxModeParameters, CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
var xnaModeList = new List<XNADisplayMode> {xnaMode};
|
||||||
|
var anxModeList = new List<DisplayMode> {anxMode};
|
||||||
|
var xnaCollectionParameters = new object[] { xnaModeList };
|
||||||
|
var xna = (XNADisplayModeCollection)Activator.CreateInstance(typeof(XNADisplayModeCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, xnaCollectionParameters, CultureInfo.InvariantCulture);
|
||||||
|
var anxCollectionParameters = new object[] { anxModeList };
|
||||||
|
var anx = (DisplayModeCollection)Activator.CreateInstance(typeof(DisplayModeCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, anxCollectionParameters, CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
Assert.AreEqual((xna[XNASurfaceFormat.Color] as List<XNADisplayMode>).Count,
|
||||||
|
(anx[SurfaceFormat.Color] as List<DisplayMode>).Count);
|
||||||
|
|
||||||
|
Assert.AreEqual((xna[XNASurfaceFormat.Bgra5551] as List<XNADisplayMode>).Count,
|
||||||
|
(anx[SurfaceFormat.Bgra5551] as List<DisplayMode>).Count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class EffectAnnotationCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class EffectParameterCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class EffectPassCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class EffectTechniqueCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Reflection;
|
||||||
|
using ANX.Framework.Graphics;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using XNAModelBone = Microsoft.Xna.Framework.Graphics.ModelBone;
|
||||||
|
using XNAModelBoneCollection = Microsoft.Xna.Framework.Graphics.ModelBoneCollection;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class ModelBoneCollectionTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Constructor()
|
||||||
|
{
|
||||||
|
XNAModelBoneCollection xna;
|
||||||
|
ModelBoneCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
Assert.AreEqual(xna.Count, anx.Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AccessorArgumentNull()
|
||||||
|
{
|
||||||
|
XNAModelBoneCollection xna;
|
||||||
|
ModelBoneCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
TestDelegate xnaDeleg = delegate { XNAModelBone xnaBone = xna[""]; };
|
||||||
|
TestDelegate anxDeleg = delegate { ModelBone anxBone = anx[""]; };
|
||||||
|
|
||||||
|
AssertHelper.ConvertEquals(Assert.Throws<ArgumentNullException>(xnaDeleg),
|
||||||
|
Assert.Throws<ArgumentNullException>(anxDeleg), "AccessorArgumentNull");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AccessorKeyNotFound()
|
||||||
|
{
|
||||||
|
XNAModelBoneCollection xna;
|
||||||
|
ModelBoneCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
TestDelegate xnaDeleg = delegate { XNAModelBone xnaBone = xna["test"]; };
|
||||||
|
TestDelegate anxDeleg = delegate { ModelBone anxBone = anx["test"]; };
|
||||||
|
|
||||||
|
AssertHelper.ConvertEquals(Assert.Throws<KeyNotFoundException>(xnaDeleg),
|
||||||
|
Assert.Throws<KeyNotFoundException>(anxDeleg), "AccessorKeyNotFound");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Accessor()
|
||||||
|
{
|
||||||
|
XNAModelBoneCollection xna;
|
||||||
|
ModelBoneCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
XNAModelBone xnaBone = xna["bone1"];
|
||||||
|
ModelBone anxBone = anx["bone1"];
|
||||||
|
|
||||||
|
Assert.AreEqual(xnaBone.Index, anxBone.Index);
|
||||||
|
AssertHelper.ConvertEquals(xnaBone.Transform, anxBone.Transform, "Accessor");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CreateCollections(out XNAModelBoneCollection xna, out ModelBoneCollection anx)
|
||||||
|
{
|
||||||
|
XNAModelBone xnaBone;
|
||||||
|
ModelBone anxBone;
|
||||||
|
ModelBoneTest.CreateBones(out xnaBone, out anxBone);
|
||||||
|
var xnaParameters = new object[] { new[] { xnaBone } };
|
||||||
|
xna = (XNAModelBoneCollection)Activator.CreateInstance(typeof(XNAModelBoneCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
var anxParameters = new object[] { new[] { anxBone } };
|
||||||
|
anx = (ModelBoneCollection)Activator.CreateInstance(typeof(ModelBoneCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Reflection;
|
||||||
|
using ANX.Framework.Graphics;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using XNAModelBone = Microsoft.Xna.Framework.Graphics.ModelBone;
|
||||||
|
using XNAMatrix = Microsoft.Xna.Framework.Matrix;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class ModelBoneTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Constructor()
|
||||||
|
{
|
||||||
|
XNAModelBone xna;
|
||||||
|
ModelBone anx;
|
||||||
|
CreateBones(out xna, out anx);
|
||||||
|
|
||||||
|
Assert.AreEqual(xna.Name, anx.Name);
|
||||||
|
Assert.AreEqual(xna.Index, anx.Index);
|
||||||
|
Assert.AreEqual(xna.Parent, anx.Parent);
|
||||||
|
Assert.AreEqual(xna.Children, anx.Children);
|
||||||
|
AssertHelper.ConvertEquals(xna.Transform, anx.Transform, "Constructor");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CreateBones(out XNAModelBone xna, out ModelBone anx)
|
||||||
|
{
|
||||||
|
var xnaParameters = new object[] { "bone1", XNAMatrix.Identity, 15 };
|
||||||
|
xna = (XNAModelBone)Activator.CreateInstance(typeof(XNAModelBone),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
var anxParameters = new object[] { "bone1", Matrix.Identity, 15 };
|
||||||
|
anx = (ModelBone)Activator.CreateInstance(typeof(ModelBone),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class ModelEffectCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class ModelMeshCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class ModelMeshPartCollectionTest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Reflection;
|
||||||
|
using ANX.Framework.Graphics;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
using XNASamplerStateCollection = Microsoft.Xna.Framework.Graphics.SamplerStateCollection;
|
||||||
|
using XNASamplerState = Microsoft.Xna.Framework.Graphics.SamplerState;
|
||||||
|
|
||||||
|
// 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.TestCenter.Strukturen.Graphics
|
||||||
|
{
|
||||||
|
class SamplerStateCollectionTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Constructor()
|
||||||
|
{
|
||||||
|
XNASamplerStateCollection xna;
|
||||||
|
SamplerStateCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
Assert.Null(xna[0]);
|
||||||
|
Assert.Null(anx[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AccessorOutOfRangeLowerBound()
|
||||||
|
{
|
||||||
|
XNASamplerStateCollection xna;
|
||||||
|
SamplerStateCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
TestDelegate xnaOutOfRangeDeleg = () => xna[-1] = null;
|
||||||
|
TestDelegate anxOutOfRangeDeleg = () => anx[-1] = null;
|
||||||
|
|
||||||
|
AssertHelper.ConvertEquals(Assert.Throws<ArgumentOutOfRangeException>(xnaOutOfRangeDeleg),
|
||||||
|
Assert.Throws<ArgumentOutOfRangeException>(anxOutOfRangeDeleg), "AccessorOutOfRangeLowerBound");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AccessorOutOfRangeUpperBound()
|
||||||
|
{
|
||||||
|
XNASamplerStateCollection xna;
|
||||||
|
SamplerStateCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
TestDelegate xnaOutOfRangeDeleg = () => xna[20] = null;
|
||||||
|
TestDelegate anxOutOfRangeDeleg = () => anx[20] = null;
|
||||||
|
|
||||||
|
AssertHelper.ConvertEquals(Assert.Throws<ArgumentOutOfRangeException>(xnaOutOfRangeDeleg),
|
||||||
|
Assert.Throws<ArgumentOutOfRangeException>(anxOutOfRangeDeleg), "AccessorOutOfRangeUpperBound");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void AccessorNullException()
|
||||||
|
{
|
||||||
|
XNASamplerStateCollection xna;
|
||||||
|
SamplerStateCollection anx;
|
||||||
|
CreateCollections(out xna, out anx);
|
||||||
|
|
||||||
|
TestDelegate xnaOutOfRangeDeleg = () => xna[2] = null;
|
||||||
|
TestDelegate anxOutOfRangeDeleg = () => anx[2] = null;
|
||||||
|
|
||||||
|
AssertHelper.ConvertEquals(Assert.Throws<ArgumentNullException>(xnaOutOfRangeDeleg),
|
||||||
|
Assert.Throws<ArgumentNullException>(anxOutOfRangeDeleg), "AccessorNullException");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CreateCollections(out XNASamplerStateCollection xna, out SamplerStateCollection anx)
|
||||||
|
{
|
||||||
|
var xnaParameters = new object[] { null, 0, 8 };
|
||||||
|
xna = (XNASamplerStateCollection)Activator.CreateInstance(typeof(XNASamplerStateCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, xnaParameters, CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
var anxParameters = new object[] { null, 8 };
|
||||||
|
anx = (SamplerStateCollection)Activator.CreateInstance(typeof(SamplerStateCollection),
|
||||||
|
BindingFlags.NonPublic | BindingFlags.Instance, null, anxParameters, CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2012
|
# Visual Studio 2010
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
|
||||||
|
@ -15,17 +15,14 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("AstrorEnales")]
|
[Developer("AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public class DisplayModeCollection : IEnumerable<DisplayMode>, IEnumerable
|
public class DisplayModeCollection : IEnumerable<DisplayMode>, IEnumerable
|
||||||
{
|
{
|
||||||
private readonly List<DisplayMode> displayModes;
|
private readonly List<DisplayMode> displayModes;
|
||||||
|
|
||||||
public IEnumerable<DisplayMode> this[SurfaceFormat format]
|
public IEnumerable<DisplayMode> this[SurfaceFormat format]
|
||||||
{
|
{
|
||||||
get
|
get { return displayModes.Where(current => current.Format == format).ToList(); }
|
||||||
{
|
|
||||||
return displayModes.Where(current => current.Format == format).ToList();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal DisplayModeCollection(List<DisplayMode> displayModes)
|
internal DisplayModeCollection(List<DisplayMode> displayModes)
|
||||||
@ -37,6 +34,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
return displayModes.GetEnumerator();
|
return displayModes.GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
return GetEnumerator();
|
return GetEnumerator();
|
||||||
|
@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("AstrorEnales")]
|
[Developer("AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class EffectAnnotationCollection : IEnumerable<EffectAnnotation>
|
public sealed class EffectAnnotationCollection : IEnumerable<EffectAnnotation>
|
||||||
{
|
{
|
||||||
private readonly List<EffectAnnotation> annotations;
|
private readonly List<EffectAnnotation> annotations;
|
||||||
|
@ -15,8 +15,8 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework.Graphics
|
namespace ANX.Framework.Graphics
|
||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class EffectParameterCollection : IEnumerable<EffectParameter>
|
public sealed class EffectParameterCollection : IEnumerable<EffectParameter>
|
||||||
{
|
{
|
||||||
#region Private Members
|
#region Private Members
|
||||||
|
@ -16,7 +16,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann, AstrorEnales")]
|
[Developer("Glatzemann, AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class EffectPassCollection : IEnumerable<EffectPass>
|
public sealed class EffectPassCollection : IEnumerable<EffectPass>
|
||||||
{
|
{
|
||||||
#region Private Members
|
#region Private Members
|
||||||
@ -50,9 +50,7 @@ namespace ANX.Framework.Graphics
|
|||||||
this.passes = new List<EffectPass>();
|
this.passes = new List<EffectPass>();
|
||||||
|
|
||||||
foreach (EffectPass pass in parentTechnique.Passes)
|
foreach (EffectPass pass in parentTechnique.Passes)
|
||||||
{
|
|
||||||
this.passes.Add(pass);
|
this.passes.Add(pass);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator<EffectPass> IEnumerable<EffectPass>.GetEnumerator()
|
IEnumerator<EffectPass> IEnumerable<EffectPass>.GetEnumerator()
|
||||||
|
@ -17,7 +17,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann, AstrorEnales")]
|
[Developer("Glatzemann, AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class EffectTechniqueCollection : IEnumerable<EffectTechnique>, IEnumerable
|
public sealed class EffectTechniqueCollection : IEnumerable<EffectTechnique>, IEnumerable
|
||||||
{
|
{
|
||||||
#region Private Members
|
#region Private Members
|
||||||
|
@ -59,6 +59,7 @@ namespace ANX.Framework.Graphics
|
|||||||
this.textureCollection = new TextureCollection(16);
|
this.textureCollection = new TextureCollection(16);
|
||||||
this.vertexTextureCollection = new TextureCollection(16);
|
this.vertexTextureCollection = new TextureCollection(16);
|
||||||
|
|
||||||
|
samplerStateCollection.InitializeDeviceState();
|
||||||
this.BlendState = BlendState.Opaque;
|
this.BlendState = BlendState.Opaque;
|
||||||
this.DepthStencilState = DepthStencilState.Default;
|
this.DepthStencilState = DepthStencilState.Default;
|
||||||
this.RasterizerState = RasterizerState.CullCounterClockwise;
|
this.RasterizerState = RasterizerState.CullCounterClockwise;
|
||||||
@ -366,6 +367,8 @@ namespace ANX.Framework.Graphics
|
|||||||
this.viewport = new Graphics.Viewport(0, 0, presentationParameters.BackBufferWidth,
|
this.viewport = new Graphics.Viewport(0, 0, presentationParameters.BackBufferWidth,
|
||||||
presentationParameters.BackBufferHeight);
|
presentationParameters.BackBufferHeight);
|
||||||
|
|
||||||
|
samplerStateCollection.InitializeDeviceState();
|
||||||
|
|
||||||
raise_DeviceReset(this, EventArgs.Empty);
|
raise_DeviceReset(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public sealed class ModelBone
|
public sealed class ModelBone
|
||||||
{
|
{
|
||||||
public ModelBoneCollection Children { get; internal set; }
|
public ModelBoneCollection Children { get; internal set; }
|
||||||
@ -21,7 +21,7 @@ namespace ANX.Framework.Graphics
|
|||||||
public ModelBone Parent { get; internal set; }
|
public ModelBone Parent { get; internal set; }
|
||||||
public Matrix Transform { get; set; }
|
public Matrix Transform { get; set; }
|
||||||
|
|
||||||
public ModelBone(string name, Matrix transform, int index)
|
internal ModelBone(string name, Matrix transform, int index)
|
||||||
{
|
{
|
||||||
this.Name = name;
|
this.Name = name;
|
||||||
this.Transform = transform;
|
this.Transform = transform;
|
||||||
|
@ -15,17 +15,48 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("???, AstrorEnales")]
|
[Developer("???, AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public sealed class ModelBoneCollection : ReadOnlyCollection<ModelBone>
|
public sealed class ModelBoneCollection : ReadOnlyCollection<ModelBone>
|
||||||
{
|
{
|
||||||
private readonly ModelBone[] modelBones;
|
private readonly ModelBone[] modelBones;
|
||||||
|
|
||||||
|
public ModelBone this[string boneName]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
ModelBone result;
|
||||||
|
if (TryGetValue(boneName, out result) == false)
|
||||||
|
throw new KeyNotFoundException();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal ModelBoneCollection(ModelBone[] modelBones)
|
internal ModelBoneCollection(ModelBone[] modelBones)
|
||||||
: base(modelBones)
|
: base(modelBones)
|
||||||
{
|
{
|
||||||
this.modelBones = modelBones;
|
this.modelBones = modelBones;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool TryGetValue(string boneName, out ModelBone value)
|
||||||
|
{
|
||||||
|
if (String.IsNullOrEmpty(boneName))
|
||||||
|
throw new ArgumentNullException("boneName");
|
||||||
|
|
||||||
|
for (int index = 0; index < Items.Count; index++)
|
||||||
|
{
|
||||||
|
ModelBone modelBone = Items[index];
|
||||||
|
if (String.Compare(modelBone.Name, boneName, StringComparison.Ordinal) == 0)
|
||||||
|
{
|
||||||
|
value = modelBone;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
value = null;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public new Enumerator GetEnumerator()
|
public new Enumerator GetEnumerator()
|
||||||
{
|
{
|
||||||
return new Enumerator(this.modelBones);
|
return new Enumerator(this.modelBones);
|
||||||
@ -72,37 +103,5 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryGetValue(string boneName, out ModelBone value)
|
|
||||||
{
|
|
||||||
if (String.IsNullOrEmpty(boneName))
|
|
||||||
throw new ArgumentNullException("boneName");
|
|
||||||
|
|
||||||
for (int index = 0; index < Items.Count; index++)
|
|
||||||
{
|
|
||||||
ModelBone modelBone = Items[index];
|
|
||||||
if (String.Compare(modelBone.Name, boneName, StringComparison.Ordinal) == 0)
|
|
||||||
{
|
|
||||||
value = modelBone;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
value = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ModelBone this[string boneName]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
ModelBone result;
|
|
||||||
if (TryGetValue(boneName, out result) == false)
|
|
||||||
throw new KeyNotFoundException();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class ModelEffectCollection : ReadOnlyCollection<Effect>
|
public sealed class ModelEffectCollection : ReadOnlyCollection<Effect>
|
||||||
{
|
{
|
||||||
private readonly List<Effect> effects;
|
private readonly List<Effect> effects;
|
||||||
@ -46,20 +46,22 @@ namespace ANX.Framework.Graphics
|
|||||||
private readonly List<Effect> wrappedArray;
|
private readonly List<Effect> wrappedArray;
|
||||||
private int position;
|
private int position;
|
||||||
|
|
||||||
|
public Effect Current
|
||||||
|
{
|
||||||
|
get { return this.wrappedArray[this.position]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
object IEnumerator.Current
|
||||||
|
{
|
||||||
|
get { return this.Current; }
|
||||||
|
}
|
||||||
|
|
||||||
internal Enumerator(List<Effect> wrappedArray)
|
internal Enumerator(List<Effect> wrappedArray)
|
||||||
{
|
{
|
||||||
this.wrappedArray = wrappedArray;
|
this.wrappedArray = wrappedArray;
|
||||||
this.position = -1;
|
this.position = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Effect Current
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.wrappedArray[this.position];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool MoveNext()
|
public bool MoveNext()
|
||||||
{
|
{
|
||||||
this.position++;
|
this.position++;
|
||||||
@ -79,14 +81,6 @@ namespace ANX.Framework.Graphics
|
|||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
object IEnumerator.Current
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.Current;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann, AstrorEnales")]
|
[Developer("Glatzemann, AstrorEnales")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class ModelMeshCollection : ReadOnlyCollection<ModelMesh>
|
public sealed class ModelMeshCollection : ReadOnlyCollection<ModelMesh>
|
||||||
{
|
{
|
||||||
private readonly ModelMesh[] modelMeshes;
|
private readonly ModelMesh[] modelMeshes;
|
||||||
|
@ -12,7 +12,7 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("GinieDP, Glatzemann")]
|
[Developer("GinieDP, Glatzemann")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public sealed class ModelMeshPartCollection : ReadOnlyCollection<ModelMeshPart>
|
public sealed class ModelMeshPartCollection : ReadOnlyCollection<ModelMeshPart>
|
||||||
{
|
{
|
||||||
private readonly ModelMeshPart[] modelMeshParts;
|
private readonly ModelMeshPart[] modelMeshParts;
|
||||||
|
@ -12,19 +12,16 @@ namespace ANX.Framework.Graphics
|
|||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public sealed class SamplerStateCollection
|
public sealed class SamplerStateCollection
|
||||||
{
|
{
|
||||||
private readonly SamplerState[] samplerStates;
|
private readonly SamplerState[] samplerStates;
|
||||||
private readonly GraphicsDevice graphics;
|
private readonly GraphicsDevice graphics;
|
||||||
|
|
||||||
public SamplerStateCollection(GraphicsDevice graphics, int maxSamplers)
|
internal SamplerStateCollection(GraphicsDevice graphics, int maxSamplers)
|
||||||
{
|
{
|
||||||
this.graphics = graphics;
|
this.graphics = graphics;
|
||||||
this.samplerStates = new SamplerState[maxSamplers];
|
samplerStates = new SamplerState[maxSamplers];
|
||||||
|
|
||||||
for (int i = 0; i < samplerStates.Length; i++)
|
|
||||||
samplerStates[i] = SamplerState.LinearWrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SamplerState this[int index]
|
public SamplerState this[int index]
|
||||||
@ -38,6 +35,12 @@ namespace ANX.Framework.Graphics
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (index < 0 || index >= samplerStates.Length)
|
||||||
|
throw new ArgumentOutOfRangeException("index");
|
||||||
|
|
||||||
|
if (value == null)
|
||||||
|
throw new ArgumentNullException("value");
|
||||||
|
|
||||||
if (samplerStates[index] != value)
|
if (samplerStates[index] != value)
|
||||||
{
|
{
|
||||||
samplerStates[index] = value;
|
samplerStates[index] = value;
|
||||||
@ -45,5 +48,11 @@ namespace ANX.Framework.Graphics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void InitializeDeviceState()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < samplerStates.Length; i++)
|
||||||
|
samplerStates[i] = SamplerState.LinearWrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,14 @@ namespace ANX.Framework.NonXNA.Reflection
|
|||||||
"Sce.PlayStation.Core.dll",
|
"Sce.PlayStation.Core.dll",
|
||||||
"wrap_oal.dll",
|
"wrap_oal.dll",
|
||||||
"OpenAL32.dll",
|
"OpenAL32.dll",
|
||||||
|
"nunit.framework.dll",
|
||||||
|
"OggUtils.dll",
|
||||||
|
"Microsoft.Research.Kinect.dll",
|
||||||
|
"Microsoft.Xna.Framework.Graphics.dll",
|
||||||
|
"Microsoft.Xna.Framework.Game.dll",
|
||||||
|
"Microsoft.Xna.Framework.Content.Pipeline.dll",
|
||||||
|
"OggUtils.dll",
|
||||||
|
"OggUtils.dll",
|
||||||
};
|
};
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -248,17 +248,21 @@ Global
|
|||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
||||||
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
@ -248,17 +248,21 @@ Global
|
|||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
||||||
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
@ -248,17 +248,21 @@ Global
|
|||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Any CPU.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|ARM.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.ActiveCfg = Debug|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x64.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Debug|x86.Build.0 = Debug|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Any CPU.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|ARM.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.ActiveCfg = Release|x86
|
||||||
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x64.Build.0 = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.ActiveCfg = Release|x86
|
||||||
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
{ECBF60CB-1CF0-4F92-8963-E73115B04B43}.Release|x86.Build.0 = Release|x86
|
||||||
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{9D8DC781-2E0D-4348-BAD9-745F91428A3F}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
Loading…
x
Reference in New Issue
Block a user