- Added a new Sample to test all AlphaTestEffect behaviours

- Working on some tests
This commit is contained in:
SND\AstrorEnales_cp 2012-10-14 16:40:10 +00:00 committed by Konstantin Koch
parent 7c88884f63
commit 663dff347d
41 changed files with 1128 additions and 196 deletions

View File

@ -38,6 +38,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />

View File

@ -38,6 +38,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />

View File

@ -38,6 +38,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />

View File

@ -40,6 +40,7 @@
</Reference> </Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" /> <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL" />

View File

@ -1,8 +1,6 @@
#region Using Statements #region Using Statements
using System; using System;
using System.Collections.Generic; using NUnit.Framework;
using System.Linq;
using System.Text;
#endregion // Using Statements #endregion // Using Statements
@ -16,8 +14,6 @@ using ANXColor = ANX.Framework.Color;
using XNAVector3 = Microsoft.Xna.Framework.Vector3; using XNAVector3 = Microsoft.Xna.Framework.Vector3;
using ANXVector3 = ANX.Framework.Vector3; using ANXVector3 = ANX.Framework.Vector3;
using NUnit.Framework;
namespace ANX.Framework.TestCenter.Strukturen namespace ANX.Framework.TestCenter.Strukturen
{ {
[TestFixture] [TestFixture]
@ -129,75 +125,75 @@ namespace ANX.Framework.TestCenter.Strukturen
new Object[] { XNAColor.LightSteelBlue, ANXColor.LightSteelBlue, "Color.LightSteelBlue" }, new Object[] { XNAColor.LightSteelBlue, ANXColor.LightSteelBlue, "Color.LightSteelBlue" },
new Object[] { XNAColor.LightYellow, ANXColor.LightYellow, "Color.LightYellow" }, new Object[] { XNAColor.LightYellow, ANXColor.LightYellow, "Color.LightYellow" },
new Object[] { XNAColor.Lime, ANXColor.Lime, "Color.Lime" }, new Object[] { XNAColor.Lime, ANXColor.Lime, "Color.Lime" },
new Object[] { XNAColor.LimeGreen, ANXColor.LimeGreen, "" }, new Object[] { XNAColor.LimeGreen, ANXColor.LimeGreen, "Color.LimeGreen" },
new Object[] { XNAColor.Linen, ANXColor.Linen, "" }, new Object[] { XNAColor.Linen, ANXColor.Linen, "Color.Linen" },
new Object[] { XNAColor.Magenta, ANXColor.Magenta, "" }, new Object[] { XNAColor.Magenta, ANXColor.Magenta, "Color.Magenta" },
new Object[] { XNAColor.Maroon, ANXColor.Maroon, "" }, new Object[] { XNAColor.Maroon, ANXColor.Maroon, "Color.Maroon" },
new Object[] { XNAColor.MediumAquamarine, ANXColor.MediumAquamarine, "" }, new Object[] { XNAColor.MediumAquamarine, ANXColor.MediumAquamarine, "Color.MediumAquamarine" },
new Object[] { XNAColor.MediumBlue, ANXColor.MediumBlue, "" }, new Object[] { XNAColor.MediumBlue, ANXColor.MediumBlue, "Color.MediumBlue" },
new Object[] { XNAColor.MediumOrchid, ANXColor.MediumOrchid, "" }, new Object[] { XNAColor.MediumOrchid, ANXColor.MediumOrchid, "Color.MediumOrchid" },
new Object[] { XNAColor.MediumPurple, ANXColor.MediumPurple, "" }, new Object[] { XNAColor.MediumPurple, ANXColor.MediumPurple, "Color.MediumPurple" },
new Object[] { XNAColor.MediumSeaGreen, ANXColor.MediumSeaGreen, "" }, new Object[] { XNAColor.MediumSeaGreen, ANXColor.MediumSeaGreen, "Color.MediumSeaGreen" },
new Object[] { XNAColor.MediumSlateBlue, ANXColor.MediumSlateBlue, "" }, new Object[] { XNAColor.MediumSlateBlue, ANXColor.MediumSlateBlue, "Color.MediumSlateBlue" },
new Object[] { XNAColor.MediumSpringGreen, ANXColor.MediumSpringGreen, "" }, new Object[] { XNAColor.MediumSpringGreen, ANXColor.MediumSpringGreen, "Color.MediumSpringGreen" },
new Object[] { XNAColor.MediumTurquoise, ANXColor.MediumTurquoise, "" }, new Object[] { XNAColor.MediumTurquoise, ANXColor.MediumTurquoise, "Color.MediumTurquoise" },
new Object[] { XNAColor.MediumVioletRed, ANXColor.MediumVioletRed, "" }, new Object[] { XNAColor.MediumVioletRed, ANXColor.MediumVioletRed, "Color.MediumVioletRed" },
new Object[] { XNAColor.MidnightBlue, ANXColor.MidnightBlue, "" }, new Object[] { XNAColor.MidnightBlue, ANXColor.MidnightBlue, "Color.MidnightBlue" },
new Object[] { XNAColor.MintCream, ANXColor.MintCream, "" }, new Object[] { XNAColor.MintCream, ANXColor.MintCream, "Color.MintCream" },
new Object[] { XNAColor.MistyRose, ANXColor.MistyRose, "" }, new Object[] { XNAColor.MistyRose, ANXColor.MistyRose, "Color.MistyRose" },
new Object[] { XNAColor.Moccasin, ANXColor.Moccasin, "" }, new Object[] { XNAColor.Moccasin, ANXColor.Moccasin, "Color.Moccasin" },
new Object[] { XNAColor.NavajoWhite, ANXColor.NavajoWhite, "" }, new Object[] { XNAColor.NavajoWhite, ANXColor.NavajoWhite, "Color.NavajoWhite" },
new Object[] { XNAColor.Navy, ANXColor.Navy, "" }, new Object[] { XNAColor.Navy, ANXColor.Navy, "Color.Navy" },
new Object[] { XNAColor.OldLace, ANXColor.OldLace, "" }, new Object[] { XNAColor.OldLace, ANXColor.OldLace, "Color.OldLace" },
new Object[] { XNAColor.Olive, ANXColor.Olive, "" }, new Object[] { XNAColor.Olive, ANXColor.Olive, "Color.Olive" },
new Object[] { XNAColor.OliveDrab, ANXColor.OliveDrab, "" }, new Object[] { XNAColor.OliveDrab, ANXColor.OliveDrab, "Color.OliveDrab" },
new Object[] { XNAColor.Orange, ANXColor.Orange, "" }, new Object[] { XNAColor.Orange, ANXColor.Orange, "Color.Orange" },
new Object[] { XNAColor.OrangeRed, ANXColor.OrangeRed, "" }, new Object[] { XNAColor.OrangeRed, ANXColor.OrangeRed, "Color.OrangeRed" },
new Object[] { XNAColor.Orchid, ANXColor.Orchid, "" }, new Object[] { XNAColor.Orchid, ANXColor.Orchid, "Color.Orchid" },
new Object[] { XNAColor.PaleGoldenrod, ANXColor.PaleGoldenrod, "" }, new Object[] { XNAColor.PaleGoldenrod, ANXColor.PaleGoldenrod, "Color.PaleGoldenrod" },
new Object[] { XNAColor.PaleGreen, ANXColor.PaleGreen, "" }, new Object[] { XNAColor.PaleGreen, ANXColor.PaleGreen, "Color.PaleGreen" },
new Object[] { XNAColor.PaleTurquoise, ANXColor.PaleTurquoise, "" }, new Object[] { XNAColor.PaleTurquoise, ANXColor.PaleTurquoise, "Color.PaleTurquoise" },
new Object[] { XNAColor.PaleVioletRed, ANXColor.PaleVioletRed, "" }, new Object[] { XNAColor.PaleVioletRed, ANXColor.PaleVioletRed, "Color.PaleVioletRed" },
new Object[] { XNAColor.PapayaWhip, ANXColor.PapayaWhip, "" }, new Object[] { XNAColor.PapayaWhip, ANXColor.PapayaWhip, "Color.PapayaWhip" },
new Object[] { XNAColor.PeachPuff, ANXColor.PeachPuff, "" }, new Object[] { XNAColor.PeachPuff, ANXColor.PeachPuff, "Color.PeachPuff" },
new Object[] { XNAColor.Peru, ANXColor.Peru, "" }, new Object[] { XNAColor.Peru, ANXColor.Peru, "Color.Peru" },
new Object[] { XNAColor.Pink, ANXColor.Pink, "" }, new Object[] { XNAColor.Pink, ANXColor.Pink, "Color.Pink" },
new Object[] { XNAColor.Plum, ANXColor.Plum, "" }, new Object[] { XNAColor.Plum, ANXColor.Plum, "Color.Plum" },
new Object[] { XNAColor.PowderBlue, ANXColor.PowderBlue, "" }, new Object[] { XNAColor.PowderBlue, ANXColor.PowderBlue, "Color.PowderBlue" },
new Object[] { XNAColor.Purple, ANXColor.Purple, "" }, new Object[] { XNAColor.Purple, ANXColor.Purple, "Color.Purple" },
new Object[] { XNAColor.Red, ANXColor.Red, "" }, new Object[] { XNAColor.Red, ANXColor.Red, "Color.Red" },
new Object[] { XNAColor.RosyBrown, ANXColor.RosyBrown, "" }, new Object[] { XNAColor.RosyBrown, ANXColor.RosyBrown, "Color.RosyBrown" },
new Object[] { XNAColor.RoyalBlue, ANXColor.RoyalBlue, "" }, new Object[] { XNAColor.RoyalBlue, ANXColor.RoyalBlue, "Color.RoyalBlue" },
new Object[] { XNAColor.SaddleBrown, ANXColor.SaddleBrown, "" }, new Object[] { XNAColor.SaddleBrown, ANXColor.SaddleBrown, "Color.SaddleBrown" },
new Object[] { XNAColor.Salmon, ANXColor.Salmon, "" }, new Object[] { XNAColor.Salmon, ANXColor.Salmon, "Color.Salmon" },
new Object[] { XNAColor.SandyBrown, ANXColor.SandyBrown, "" }, new Object[] { XNAColor.SandyBrown, ANXColor.SandyBrown, "Color.SandyBrown" },
new Object[] { XNAColor.SeaGreen, ANXColor.SeaGreen, "" }, new Object[] { XNAColor.SeaGreen, ANXColor.SeaGreen, "Color.SeaGreen" },
new Object[] { XNAColor.SeaShell, ANXColor.SeaShell, "" }, new Object[] { XNAColor.SeaShell, ANXColor.SeaShell, "Color.SeaShell" },
new Object[] { XNAColor.Sienna, ANXColor.Sienna, "" }, new Object[] { XNAColor.Sienna, ANXColor.Sienna, "Color.Sienna" },
new Object[] { XNAColor.Silver, ANXColor.Silver, "" }, new Object[] { XNAColor.Silver, ANXColor.Silver, "Color.Silver" },
new Object[] { XNAColor.SkyBlue, ANXColor.SkyBlue, "" }, new Object[] { XNAColor.SkyBlue, ANXColor.SkyBlue, "Color.SkyBlue" },
new Object[] { XNAColor.SlateBlue, ANXColor.SlateBlue, "" }, new Object[] { XNAColor.SlateBlue, ANXColor.SlateBlue, "Color.SlateBlue" },
new Object[] { XNAColor.SlateGray, ANXColor.SlateGray, "" }, new Object[] { XNAColor.SlateGray, ANXColor.SlateGray, "Color.SlateGray" },
new Object[] { XNAColor.Snow, ANXColor.Snow, "" }, new Object[] { XNAColor.Snow, ANXColor.Snow, "Color.Snow" },
new Object[] { XNAColor.SpringGreen, ANXColor.SpringGreen, "" }, new Object[] { XNAColor.SpringGreen, ANXColor.SpringGreen, "Color.SpringGreen" },
new Object[] { XNAColor.SteelBlue, ANXColor.SteelBlue, "" }, new Object[] { XNAColor.SteelBlue, ANXColor.SteelBlue, "Color.SteelBlue" },
new Object[] { XNAColor.Tan, ANXColor.Tan, "" }, new Object[] { XNAColor.Tan, ANXColor.Tan, "Color.Tan" },
new Object[] { XNAColor.Teal, ANXColor.Teal, "" }, new Object[] { XNAColor.Teal, ANXColor.Teal, "Color.Teal" },
new Object[] { XNAColor.Thistle, ANXColor.Thistle, "" }, new Object[] { XNAColor.Thistle, ANXColor.Thistle, "Color.Thistle" },
new Object[] { XNAColor.Tomato, ANXColor.Tomato, "" }, new Object[] { XNAColor.Tomato, ANXColor.Tomato, "Color.Tomato" },
new Object[] { XNAColor.Transparent, ANXColor.Transparent, "" }, new Object[] { XNAColor.Transparent, ANXColor.Transparent, "Color.Transparent" },
new Object[] { XNAColor.Turquoise, ANXColor.Turquoise, "" }, new Object[] { XNAColor.Turquoise, ANXColor.Turquoise, "Color.Turquoise" },
new Object[] { XNAColor.Violet, ANXColor.Violet, "" }, new Object[] { XNAColor.Violet, ANXColor.Violet, "Color.Violet" },
new Object[] { XNAColor.Wheat, ANXColor.Wheat, "" }, new Object[] { XNAColor.Wheat, ANXColor.Wheat, "Color.Wheat" },
new Object[] { XNAColor.White, ANXColor.White, "" }, new Object[] { XNAColor.White, ANXColor.White, "Color.White" },
new Object[] { XNAColor.WhiteSmoke, ANXColor.WhiteSmoke, "" }, new Object[] { XNAColor.WhiteSmoke, ANXColor.WhiteSmoke, "Color.WhiteSmoke" },
new Object[] { XNAColor.Yellow, ANXColor.Yellow, "" }, new Object[] { XNAColor.Yellow, ANXColor.Yellow, "Color.Yellow" },
new Object[] { XNAColor.YellowGreen, ANXColor.YellowGreen, "" }, new Object[] { XNAColor.YellowGreen, ANXColor.YellowGreen, "Color.YellowGreen" },
}; };
#region Constructors #region Constructors
[Test] [Test]
public void constructor0() public void Constructor0()
{ {
XNAColor xna = new XNAColor(); XNAColor xna = new XNAColor();
ANXColor anx = new ANXColor(); ANXColor anx = new ANXColor();
@ -206,7 +202,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor1(float r, float g, float b, float a) public void Constructor1(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor(new Microsoft.Xna.Framework.Vector3(r, g, b)); XNAColor xna = new XNAColor(new Microsoft.Xna.Framework.Vector3(r, g, b));
ANXColor anx = new ANXColor(new ANX.Framework.Vector3(r, g, b)); ANXColor anx = new ANXColor(new ANX.Framework.Vector3(r, g, b));
@ -215,7 +211,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor2(float r, float g, float b, float a) public void Constructor2(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor(new Microsoft.Xna.Framework.Vector4(r, g, b, a)); XNAColor xna = new XNAColor(new Microsoft.Xna.Framework.Vector4(r, g, b, a));
ANXColor anx = new ANXColor(new ANX.Framework.Vector4(r, g, b, a)); ANXColor anx = new ANXColor(new ANX.Framework.Vector4(r, g, b, a));
@ -224,7 +220,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor3(float r, float g, float b, float a) public void Constructor3(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor(r, g, b); XNAColor xna = new XNAColor(r, g, b);
ANXColor anx = new ANXColor(r, g, b); ANXColor anx = new ANXColor(r, g, b);
@ -233,7 +229,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor4(float r, float g, float b, float a) public void Constructor4(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor((int)(r * 255), (int)(g * 255), (int)(b * 255)); XNAColor xna = new XNAColor((int)(r * 255), (int)(g * 255), (int)(b * 255));
ANXColor anx = new ANXColor((int)(r * 255), (int)(g * 255), (int)(b * 255)); ANXColor anx = new ANXColor((int)(r * 255), (int)(g * 255), (int)(b * 255));
@ -242,7 +238,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor5(float r, float g, float b, float a) public void Constructor5(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor(r, g, b) * a; XNAColor xna = new XNAColor(r, g, b) * a;
ANXColor anx = new ANXColor(r, g, b) * a; ANXColor anx = new ANXColor(r, g, b) * a;
@ -251,7 +247,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor6(float r, float g, float b, float a) public void Constructor6(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor((int)(r * 255), (int)(g * 255), (int)(b * 255), (int)(a * 255)); XNAColor xna = new XNAColor((int)(r * 255), (int)(g * 255), (int)(b * 255), (int)(a * 255));
ANXColor anx = new ANXColor((int)(r * 255), (int)(g * 255), (int)(b * 255), (int)(a * 255)); ANXColor anx = new ANXColor((int)(r * 255), (int)(g * 255), (int)(b * 255), (int)(a * 255));
@ -260,7 +256,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test] [Test]
public void constructor7() public void Constructor7()
{ {
XNAColor xna = new XNAColor(512, 512, 512); XNAColor xna = new XNAColor(512, 512, 512);
ANXColor anx = new ANXColor(512, 512, 512); ANXColor anx = new ANXColor(512, 512, 512);
@ -269,7 +265,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test, TestCaseSource("fourfloats")] [Test, TestCaseSource("fourfloats")]
public void constructor8(float r, float g, float b, float a) public void Constructor8(float r, float g, float b, float a)
{ {
XNAColor xna = new XNAColor(r, g, b, a); XNAColor xna = new XNAColor(r, g, b, a);
ANXColor anx = new ANXColor(r, g, b, a); ANXColor anx = new ANXColor(r, g, b, a);
@ -278,7 +274,7 @@ namespace ANX.Framework.TestCenter.Strukturen
} }
[Test] [Test]
public void constructor9() public void Constructor9()
{ {
XNAColor xna = new XNAColor(512, 512, 512, 512); XNAColor xna = new XNAColor(512, 512, 512, 512);
ANXColor anx = new ANXColor(512, 512, 512, 512); ANXColor anx = new ANXColor(512, 512, 512, 512);
@ -533,6 +529,24 @@ namespace ANX.Framework.TestCenter.Strukturen
AssertHelper.ConvertEquals(xna, anx, "ToVector4"); AssertHelper.ConvertEquals(xna, anx, "ToVector4");
} }
[Test, TestCaseSource("fourfloats")]
public void ToString(float r, float g, float b, float a)
{
XNAColor xnaColor = new XNAColor(r, g, b) * a;
ANXColor anxColor = new ANXColor(r, g, b) * a;
AssertHelper.ConvertEquals(xnaColor.ToString(), anxColor.ToString(), "ToString");
}
[Test, TestCaseSource("fourfloats")]
public void GetHashCode(float r, float g, float b, float a)
{
XNAColor xnaColor = new XNAColor(r, g, b) * a;
ANXColor anxColor = new ANXColor(r, g, b) * a;
AssertHelper.ConvertEquals(xnaColor.GetHashCode(), anxColor.GetHashCode(), "GetHashCode");
}
#endregion // Methods #endregion // Methods
#region Properties #region Properties

View File

@ -1,10 +1,11 @@
using System; using System;
using ANX.Framework.Audio; using ANX.Framework.Audio;
using ANX.Framework.GamerServices;
using ANX.Framework.Graphics; using ANX.Framework.Graphics;
using ANX.Framework.Net;
using NUnit.Framework;
using ANX.Framework.Input; using ANX.Framework.Input;
using ANX.Framework.Media; using ANX.Framework.Media;
using ANX.Framework.Net;
using NUnit.Framework;
// This file is part of the ANX.Framework created by the // This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
@ -69,6 +70,17 @@ namespace ANX.Framework.TestCenter.Strukturen
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionState), typeof(NetworkSessionState) }, new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionState), typeof(NetworkSessionState) },
new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionType), typeof(NetworkSessionType) }, new object[] { typeof(Microsoft.Xna.Framework.Net.NetworkSessionType), typeof(NetworkSessionType) },
new object[] { typeof(Microsoft.Xna.Framework.Net.SendDataOptions), typeof(SendDataOptions) }, new object[] { typeof(Microsoft.Xna.Framework.Net.SendDataOptions), typeof(SendDataOptions) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.ControllerSensitivity), typeof(ControllerSensitivity) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.GameDifficulty), typeof(GameDifficulty) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.GamerPresenceMode), typeof(GamerPresenceMode) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.GamerPrivilegeSetting), typeof(GamerPrivilegeSetting) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.GamerZone), typeof(GamerZone) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.LeaderboardKey), typeof(LeaderboardKey) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.LeaderboardOutcome), typeof(LeaderboardOutcome) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.MessageBoxIcon), typeof(MessageBoxIcon) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.NotificationPosition), typeof(NotificationPosition) },
new object[] { typeof(Microsoft.Xna.Framework.GamerServices.RacingCameraAngle), typeof(RacingCameraAngle) },
}; };
[TestCaseSource("EnumPairs")] [TestCaseSource("EnumPairs")]

View File

@ -29,7 +29,7 @@ namespace ANX.Framework.TestCenter.Strukturen
{ {
var xna = new XNAGameComponentCollectionEventArgs(null); var xna = new XNAGameComponentCollectionEventArgs(null);
var anx = new ANXGameComponentCollectionEventArgs(null); var anx = new ANXGameComponentCollectionEventArgs(null);
Assert.AreEqual(xna.GameComponent, anx.GameComponent); Assert.AreEqual(xna.GameComponent, anx.GameComponent);
} }
} }

View File

@ -1,8 +1,5 @@
#region Using Statements #region Using Statements
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework; using NUnit.Framework;
#endregion // Using Statements #endregion // Using Statements

View File

@ -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}"
@ -201,6 +201,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OggUtils", "Support\OggUtil
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "Samples\AlphaTestEffectSample\AlphaTestEffectSample.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1028,6 +1030,20 @@ Global
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Any CPU.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|ARM.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x64.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Any CPU.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|ARM.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.Build.0 = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x64.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1068,6 +1084,7 @@ Global
{9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}

View File

@ -10,7 +10,7 @@ namespace ANX.Framework
{ {
[PercentageComplete(100)] [PercentageComplete(100)]
[Developer("Glatzemann, SilentWarrior")] [Developer("Glatzemann, SilentWarrior")]
[TestState(TestStateAttribute.TestState.InProgress)] [TestState(TestStateAttribute.TestState.Tested)]
public struct Color : IPackedVector<uint>, IPackedVector, IEquatable<Color> public struct Color : IPackedVector<uint>, IPackedVector, IEquatable<Color>
{ {
#region Private Members #region Private Members
@ -791,24 +791,19 @@ namespace ANX.Framework
return this.packedValue.Equals(other.packedValue); return this.packedValue.Equals(other.packedValue);
} }
public override bool Equals(Object other) public override bool Equals(object obj)
{ {
if (other is Color) return obj is Color && Equals((Color)obj);
{
return this.Equals((Color)other);
}
return false;
} }
public static bool operator ==(Color a, Color b) public static bool operator ==(Color a, Color b)
{ {
return a.packedValue == b.packedValue; return a.packedValue == b.packedValue;
} }
public static bool operator !=(Color a, Color b) public static bool operator !=(Color a, Color b)
{ {
return a.packedValue != b.packedValue; return a.packedValue != b.packedValue;
} }
public static Color FromNonPremultiplied(int r, int g, int b, int a) public static Color FromNonPremultiplied(int r, int g, int b, int a)
@ -834,24 +829,6 @@ namespace ANX.Framework
return color; return color;
} }
private static int ClampValue64(long value)
{
if (value < 0L)
return 0;
if (value > 255L)
return 255;
return (int) value;
}
public static int ClampValue32(int value)
{
if (value < 0)
return 0;
if (value > 255)
return 255;
return value;
}
public static Color FromNonPremultiplied(Vector4 vector) public static Color FromNonPremultiplied(Vector4 vector)
{ {
Color color; Color color;
@ -866,7 +843,7 @@ namespace ANX.Framework
return this.packedValue.GetHashCode(); return this.packedValue.GetHashCode();
} }
#region Lerp #region Lerp
public static Color Lerp(Color value1, Color value2, float amount) public static Color Lerp(Color value1, Color value2, float amount)
{ {
Color color; Color color;
@ -892,7 +869,6 @@ namespace ANX.Framework
return color; return color;
} }
#endregion #endregion
#region Multiply #region Multiply
@ -930,12 +906,9 @@ namespace ANX.Framework
} }
public override string ToString() public override string ToString()
{ {
// This may look a bit more ugly, but String.Format should // This may look a bit more ugly, but String.Format should be avoided cause of it's bad performance!
// be avoided cause of it's bad performance! return "{R:" + R + " G:" + G + " B:" + B + " A:" + A + "}";
return "{R:" + R + " G:" + G + " B:" + B + " A:" + A + "}";
//return string.Format(CultureInfo.CurrentCulture, "{{R:{0} G:{1} B:{2} A:{3}}}", new object[] { this.R, this.G, this.B, this.A });
} }
public Vector3 ToVector3() public Vector3 ToVector3()
@ -1032,6 +1005,24 @@ namespace ANX.Framework
#endregion // Properties #endregion // Properties
#region Helper #region Helper
private static int ClampValue64(long value)
{
if (value < 0L)
return 0;
if (value > 255L)
return 255;
return (int)value;
}
private static int ClampValue32(int value)
{
if (value < 0)
return 0;
if (value > 255)
return 255;
return value;
}
private static uint ColorPack(float r, float g, float b, float a) private static uint ColorPack(float r, float g, float b, float a)
{ {
uint pr = PackUNormal(255f, r); uint pr = PackUNormal(255f, r);

View File

@ -10,6 +10,7 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework namespace ANX.Framework
{ {
[PercentageComplete(100)]
[Developer("Glatzemann")] [Developer("Glatzemann")]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public abstract class GameHost public abstract class GameHost

View File

@ -10,6 +10,7 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework namespace ANX.Framework
{ {
[PercentageComplete(100)]
[Developer("Glatzemann")] [Developer("Glatzemann")]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public abstract class GameWindow public abstract class GameWindow
@ -51,37 +52,13 @@ namespace ANX.Framework
} }
#endregion #endregion
public abstract bool AllowUserResizing public abstract bool AllowUserResizing { get; set; }
{ public abstract Rectangle ClientBounds { get; }
get; public abstract string ScreenDeviceName { get; }
set; public abstract DisplayOrientation CurrentOrientation { get; }
} public abstract IntPtr Handle { get; }
internal abstract bool IsMinimized { get; }
public abstract Rectangle ClientBounds #endregion
{
get;
}
public abstract string ScreenDeviceName
{
get;
}
public abstract DisplayOrientation CurrentOrientation
{
get;
}
public abstract IntPtr Handle
{
get;
}
public abstract bool IsMinimized
{
get;
}
#endregion
#region BeginScreenDeviceChange (abstract) #region BeginScreenDeviceChange (abstract)
public abstract void BeginScreenDeviceChange(bool willBeFullScreen); public abstract void BeginScreenDeviceChange(bool willBeFullScreen);

View File

@ -9,7 +9,7 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework.Graphics namespace ANX.Framework.Graphics
{ {
[PercentageComplete(100)] [PercentageComplete(100)]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Tested)]
[Developer("AstrorEnales")] [Developer("AstrorEnales")]
public class AlphaTestEffect : Effect, IEffectMatrices, IEffectFog, IGraphicsResource public class AlphaTestEffect : Effect, IEffectMatrices, IEffectFog, IGraphicsResource
{ {

View File

@ -14,6 +14,7 @@ using ANX.Framework.NonXNA.Development;
namespace ANX.Framework namespace ANX.Framework
{ {
[PercentageComplete(60)]
[Developer("Glatzemann")] [Developer("Glatzemann")]
[TestState(TestStateAttribute.TestState.Untested)] [TestState(TestStateAttribute.TestState.Untested)]
public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService

View File

@ -34,7 +34,7 @@ namespace ANX.Framework
} }
public Plane(Vector3 point1, Vector3 point2, Vector3 point3) public Plane(Vector3 point1, Vector3 point2, Vector3 point3)
{ {
// calculate 2 vectos spanning the plane and cross them to get the normal, then normalize // calculate 2 vectors spanning the plane and cross them to get the normal, then normalize
this.Normal = Vector3.Normalize(Vector3.Cross(Vector3.Subtract(point2, point1), Vector3.Subtract(point3, point1))); this.Normal = Vector3.Normalize(Vector3.Cross(Vector3.Subtract(point2, point1), Vector3.Subtract(point3, point1)));
// now calculate d // now calculate d
this.D = Vector3.Dot(point1, this.Normal); this.D = Vector3.Dot(point1, this.Normal);
@ -51,6 +51,7 @@ namespace ANX.Framework
{ {
return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D * value.W; return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D * value.W;
} }
public void Dot(ref Vector4 value, out float result) public void Dot(ref Vector4 value, out float result)
{ {
result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D * value.W; result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D * value.W;
@ -60,6 +61,7 @@ namespace ANX.Framework
{ {
return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D; return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D;
} }
public void DotCoordinate(ref Vector3 value, out float result) public void DotCoordinate(ref Vector3 value, out float result)
{ {
result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D; result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z + this.D;
@ -69,6 +71,7 @@ namespace ANX.Framework
{ {
return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z; return this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z;
} }
public void DotNormal(ref Vector3 value, out float result) public void DotNormal(ref Vector3 value, out float result)
{ {
result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z; result = this.Normal.X * value.X + this.Normal.Y * value.Y + this.Normal.Z * value.Z;
@ -123,9 +126,10 @@ namespace ANX.Framework
this.Intersects(ref frustum, out result); this.Intersects(ref frustum, out result);
return result; ; return result; ;
} }
public void Intersects(ref BoundingFrustum frustum, out PlaneIntersectionType result) public void Intersects(ref BoundingFrustum frustum, out PlaneIntersectionType result)
{ {
throw new Exception("method has not yet been implemented"); throw new NotImplementedException("method has not yet been implemented");
} }
public PlaneIntersectionType Intersects(BoundingSphere sphere) public PlaneIntersectionType Intersects(BoundingSphere sphere)
@ -134,6 +138,7 @@ namespace ANX.Framework
this.Intersects(ref sphere, out result); this.Intersects(ref sphere, out result);
return result; return result;
} }
public void Intersects(ref BoundingSphere sphere, out PlaneIntersectionType result) public void Intersects(ref BoundingSphere sphere, out PlaneIntersectionType result)
{ {
float distanceSquared_Sphere_Origin = Vector3.DistanceSquared(Vector3.Zero, sphere.Center); float distanceSquared_Sphere_Origin = Vector3.DistanceSquared(Vector3.Zero, sphere.Center);
@ -203,59 +208,60 @@ namespace ANX.Framework
public void Normalize() public void Normalize()
{ {
float l = Normal.X * Normal.X + Normal.Y * Normal.Y + Normal.Z * Normal.Z; float lengthSquare = Normal.X * Normal.X + Normal.Y * Normal.Y + Normal.Z * Normal.Z;
if (Math.Abs(1.0f - l) < float.Epsilon) if (Math.Abs(1.0f - lengthSquare) < float.Epsilon)
{ {
return; return;
} }
l = 1.0f / (float)Math.Sqrt(l);
Normal.X = Normal.X * l; float oneOverLength = 1.0f / (float)Math.Sqrt(lengthSquare);
Normal.Y = Normal.Y * l; Normal.X = Normal.X * oneOverLength;
Normal.Z = Normal.Z * l; Normal.Y = Normal.Y * oneOverLength;
this.D = this.D * l; Normal.Z = Normal.Z * oneOverLength;
this.D = this.D * oneOverLength;
} }
public static Plane Normalize(Plane value) public static Plane Normalize(Plane value)
{ {
Vector3 n = value.Normal; Vector3 normal = value.Normal;
float l = n.X * n.X + n.Y * n.Y + n.Z * n.Z; float lengthSquare = normal.X * normal.X + normal.Y * normal.Y + normal.Z * normal.Z;
if (Math.Abs(1.0f - l) < float.Epsilon) if (Math.Abs(1.0f - lengthSquare) < float.Epsilon)
{ {
return new Plane(n, value.D); return new Plane(normal, value.D);
} }
l = 1.0f / (float)Math.Sqrt(l);
float oneOverLength = 1.0f / (float)Math.Sqrt(lengthSquare);
Plane result; Plane result;
result.Normal.X = value.Normal.X * l; result.Normal.X = value.Normal.X * oneOverLength;
result.Normal.Y = value.Normal.Y * l; result.Normal.Y = value.Normal.Y * oneOverLength;
result.Normal.Z = value.Normal.Z * l; result.Normal.Z = value.Normal.Z * oneOverLength;
result.D = value.D * l; result.D = value.D * oneOverLength;
return result; return result;
} }
public static void Normalize(ref Plane value, out Plane result) public static void Normalize(ref Plane value, out Plane result)
{ {
Vector3 n = value.Normal; Vector3 normal = value.Normal;
float l = n.X * n.X + n.Y * n.Y + n.Z * n.Z; float lengthSquare = normal.X * normal.X + normal.Y * normal.Y + normal.Z * normal.Z;
if (Math.Abs(1.0f - l) < float.Epsilon) if (Math.Abs(1.0f - lengthSquare) < float.Epsilon)
{ {
result.Normal = n; result.Normal = normal;
result.D = value.D; result.D = value.D;
return; return;
} }
l = 1.0f / (float)Math.Sqrt(l);
result.Normal.X = value.Normal.X * l; float oneOverLength = 1.0f / (float)Math.Sqrt(lengthSquare);
result.Normal.Y = value.Normal.Y * l; result.Normal.X = value.Normal.X * oneOverLength;
result.Normal.Z = value.Normal.Z * l; result.Normal.Y = value.Normal.Y * oneOverLength;
result.D = value.D * l; result.Normal.Z = value.Normal.Z * oneOverLength;
result.D = value.D * oneOverLength;
} }
public override string ToString() public override string ToString()
{ {
var culture = CultureInfo.CurrentCulture; var culture = CultureInfo.CurrentCulture;
// This may look a bit more ugly, but String.Format should // This may look a bit more ugly, but String.Format should be avoided cause of it's bad performance!
// be avoided cause of it's bad performance! return "{Normal:" + Normal.ToString() + " D:" + D.ToString(culture) + "}";
return "{Normal:" + Normal.ToString() +
" D:" + D.ToString(culture) + "}";
} }
public static Plane Transform(Plane plane, Matrix matrix) public static Plane Transform(Plane plane, Matrix matrix)
@ -348,12 +354,12 @@ namespace ANX.Framework
#region IEquatable implementation #region IEquatable implementation
public override bool Equals(Object obj) public override bool Equals(Object obj)
{ {
return (obj is Plane) ? this.Equals((Plane)obj) : false; return obj is Plane && Equals((Plane)obj);
} }
public bool Equals(Plane other) public bool Equals(Plane other)
{ {
return this.D == other.D && Normal.Equals(other.Normal); return D == other.D && Normal.Equals(other.Normal);
} }
#endregion #endregion

View File

@ -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_Linux.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework_Linux.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_Linux.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_Linux.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
@ -201,6 +201,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OggUtils", "Support\OggUtil
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_Linux.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_Linux.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "Samples\AlphaTestEffectSample\AlphaTestEffectSample_Linux.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1028,6 +1030,20 @@ Global
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Any CPU.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|ARM.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x64.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Any CPU.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|ARM.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.Build.0 = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x64.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1068,6 +1084,7 @@ Global
{9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}

View File

@ -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_PSVita.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework_PSVita.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_PSVita.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_PSVita.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
@ -201,6 +201,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OggUtils", "Support\OggUtil
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_PSVita.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_PSVita.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "Samples\AlphaTestEffectSample\AlphaTestEffectSample_PSVita.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1028,6 +1030,20 @@ Global
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Any CPU.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|ARM.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x64.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Any CPU.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|ARM.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.Build.0 = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x64.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1068,6 +1084,7 @@ Global
{9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}

View File

@ -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_WindowsMetro.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework", "ANX.Framework\ANX.Framework_WindowsMetro.csproj", "{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_WindowsMetro.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANX.Framework.TestCenter", "ANX.Framework.TestCenter\ANX.Framework.TestCenter_WindowsMetro.csproj", "{7344BBEB-A1C7-43A8-B68E-D42B81973DA9}"
@ -201,6 +201,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OggUtils", "Support\OggUtil
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_WindowsMetro.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleNoContent", "Samples\SimpleNoContent\SimpleNoContent_WindowsMetro.csproj", "{AA3DF4D7-F072-47B5-B88C-20140B5F704A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlphaTestEffectSample", "Samples\AlphaTestEffectSample\AlphaTestEffectSample_WindowsMetro.csproj", "{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -1028,6 +1030,20 @@ Global
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x64.ActiveCfg = Release|Any CPU
{AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU {AA3DF4D7-F072-47B5-B88C-20140B5F704A}.Release|x86.ActiveCfg = Release|Any CPU
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Any CPU.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|ARM.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x64.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.ActiveCfg = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Debug|x86.Build.0 = Debug|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Any CPU.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|ARM.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|Mixed Platforms.Build.0 = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x64.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.ActiveCfg = Release|x86
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1068,6 +1084,7 @@ Global
{9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {9259CC4E-AE6B-403C-8FAB-2408448C3935} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {D810F12D-6CE9-4755-AC6A-5DFEC7D1C782} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9} {AA3DF4D7-F072-47B5-B88C-20140B5F704A} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{0005BDAA-F232-45C3-8D37-7E4FF7A1F605} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
{DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {DB88DDEB-7281-405D-8FCA-5681B6B2BD7A} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {49066074-3B7B-4A55-B122-6BD33AB73558} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64} {60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}

View File

@ -30,7 +30,7 @@ namespace ANX.PlatformSystem.Linux
#endregion #endregion
#region IsMinimized #region IsMinimized
public override bool IsMinimized internal override bool IsMinimized
{ {
get get
{ {

View File

@ -36,7 +36,7 @@ namespace ANX.PlatformSystem.Metro
} }
} }
public override bool IsMinimized internal override bool IsMinimized
{ {
get get
{ {

View File

@ -22,7 +22,7 @@ namespace ANX.PlatformSystem.PsVita
#endregion #endregion
#region IsMinimized #region IsMinimized
public override bool IsMinimized internal override bool IsMinimized
{ {
get get
{ {

View File

@ -30,7 +30,7 @@ namespace ANX.PlatformSystem.Windows
#endregion #endregion
#region IsMinimized #region IsMinimized
public override bool IsMinimized internal override bool IsMinimized
{ {
get get
{ {

View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}</ProjectGuid>
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AlphaTestEffectSample</RootNamespace>
<AssemblyName>AlphaTestEffectSample</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>307d58b8-3323-4e02-8fe4-e77d276cbaa0</XnaCrossPlatformGroupID>
<XnaOutputType>Game</XnaOutputType>
<ApplicationIcon>Game.ico</ApplicationIcon>
<Thumbnail>GameThumbnail.png</Thumbnail>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>false</XnaCompressContent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Program.cs" />
<Compile Include="Game1.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Game.ico" />
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputDevices.Windows.XInput\ANX.InputDevices.Windows.XInput.csproj">
<Project>{60D08399-244F-46A3-91F1-4CFD26D961A3}</Project>
<Name>ANX.InputDevices.Windows.XInput</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard.csproj">
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
<Name>ANX.InputSystem.Standard</Name>
</ProjectReference>
<ProjectReference Include="..\..\PlatformSystems\ANX.PlatformSystem.Windows\ANX.PlatformSystem.Windows.csproj">
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
<Name>ANX.PlatformSystem.Windows</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10.csproj">
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
<Name>ANX.RenderSystem.Windows.DX10</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11.csproj">
<Project>{B30DE9C2-0926-46B6-8351-9AF276C472D5}</Project>
<Name>ANX.RenderSystem.Windows.DX11</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio.csproj">
<Project>{6A582788-C4D2-410C-96CD-177F75712D65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>
</ProjectReference>
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
<Name>SampleContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 und x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
<Visible>False</Visible>
<ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AlphaTestEffectSample</RootNamespace>
<AssemblyName>AlphaTestEffectSample</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>307d58b8-3323-4e02-8fe4-e77d276cbaa0</XnaCrossPlatformGroupID>
<XnaOutputType>Game</XnaOutputType>
<ApplicationIcon>Game.ico</ApplicationIcon>
<Thumbnail>GameThumbnail.png</Thumbnail>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants>WINDOWS;TRACE;DEBUG;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>false</XnaCompressContent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>WINDOWS;TRACE;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Program.cs" />
<Compile Include="Game1.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Game.ico" />
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_Linux.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputDevices.Windows.XInput\ANX.InputDevices.Windows.XInput_Linux.csproj">
<Project>{60D08399-244F-46A3-91F1-4CFD26D961A3}</Project>
<Name>ANX.InputDevices.Windows.XInput</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard_Linux.csproj">
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
<Name>ANX.InputSystem.Standard</Name>
</ProjectReference>
<ProjectReference Include="..\..\PlatformSystems\ANX.PlatformSystem.Windows\ANX.PlatformSystem.Windows_Linux.csproj">
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
<Name>ANX.PlatformSystem.Windows</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_Linux.csproj">
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
<Name>ANX.RenderSystem.Windows.DX10</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11_Linux.csproj">
<Project>{B30DE9C2-0926-46B6-8351-9AF276C472D5}</Project>
<Name>ANX.RenderSystem.Windows.DX11</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio_Linux.csproj">
<Project>{6A582788-C4D2-410C-96CD-177F75712D65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>
</ProjectReference>
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
<Name>SampleContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 und x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
<Visible>False</Visible>
<ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}</ProjectGuid>
<ProjectTypeGuids>{69878862-DA7D-4DC6-B0A1-50D8FAB4242F};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AlphaTestEffectSample</RootNamespace>
<AssemblyName>AlphaTestEffectSample</AssemblyName>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>307d58b8-3323-4e02-8fe4-e77d276cbaa0</XnaCrossPlatformGroupID>
<XnaOutputType>Game</XnaOutputType>
<ApplicationIcon>Game.ico</ApplicationIcon>
<Thumbnail>GameThumbnail.png</Thumbnail>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants>WINDOWS;TRACE;DEBUG;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>false</XnaCompressContent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>WINDOWS;TRACE;PSVITA;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Program.cs" />
<Compile Include="Game1.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Game.ico" />
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_PSVita.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputDevices.Windows.XInput\ANX.InputDevices.Windows.XInput_PSVita.csproj">
<Project>{60D08399-244F-46A3-91F1-4CFD26D961A3}</Project>
<Name>ANX.InputDevices.Windows.XInput</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard_PSVita.csproj">
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
<Name>ANX.InputSystem.Standard</Name>
</ProjectReference>
<ProjectReference Include="..\..\PlatformSystems\ANX.PlatformSystem.Windows\ANX.PlatformSystem.Windows_PSVita.csproj">
<Project>{068EB2E9-963C-4E1B-8831-E25011F11FFE}</Project>
<Name>ANX.PlatformSystem.Windows</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX10\ANX.RenderSystem.Windows.DX10_PSVita.csproj">
<Project>{5BE49183-2F6F-4527-AC90-D816911FCF90}</Project>
<Name>ANX.RenderSystem.Windows.DX10</Name>
</ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.RenderSystem.Windows.DX11\ANX.RenderSystem.Windows.DX11_PSVita.csproj">
<Project>{B30DE9C2-0926-46B6-8351-9AF276C472D5}</Project>
<Name>ANX.RenderSystem.Windows.DX11</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio_PSVita.csproj">
<Project>{6A582788-C4D2-410C-96CD-177F75712D65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>
</ProjectReference>
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
<Name>SampleContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 und x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
<Visible>False</Visible>
<ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Sce\Sce.Psm.CSharp.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0005BDAA-F232-45C3-8D37-7E4FF7A1F605}</ProjectGuid>
<ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AlphaTestEffectSample</RootNamespace>
<AssemblyName>AlphaTestEffectSample</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug\ModernUI</OutputPath>
<DefineConstants>WINDOWS;TRACE;DEBUG;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release\ModernUI</OutputPath>
<DefineConstants>WINDOWS;TRACE;WINDOWSMETRO;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Program.cs" />
<Compile Include="Game1.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Game.ico" />
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ANX.Framework\ANX.Framework_WindowsMetro.csproj">
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\..\InputSystems\ANX.InputSystem.Standard\ANX.InputSystem.Standard_WindowsMetro.csproj">
<Project>{49066074-3B7B-4A55-B122-6BD33AB73558}</Project>
<Name>ANX.InputSystem.Standard</Name>
</ProjectReference>
<ProjectReference Include="..\..\SoundSystems\ANX.SoundSystem.Windows.XAudio\ANX.SoundSystem.Windows.XAudio_WindowsMetro.csproj">
<Project>{6A582788-C4D2-410C-96CD-177F75712D65}</Project>
<Name>ANX.SoundSystem.Windows.XAudio</Name>
</ProjectReference>
<ProjectReference Include="..\SampleContent\SampleContent.contentproj">
<Project>{FA6E229D-4504-47B1-8A23-2D3FCC13F778}</Project>
<Name>SampleContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<None Include="Test_TemporaryKey.pfx" />
<AppxManifest Include="Manifest.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="Assets\Logo.png" />
<Content Include="Assets\SmallLogo.png" />
<Content Include="Assets\SplashScreen.png" />
<Content Include="Assets\StoreLogo.png" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,174 @@
using System;
using ANX.Framework;
using ANX.Framework.Graphics;
using ANX.Framework.Input;
namespace AlphaTestEffectSample
{
public class Game1 : Game
{
private enum AlphaTestMode
{
Fog,
NoFog,
VertexColorFog,
VertexColorNoFog,
}
GraphicsDeviceManager graphics;
private AlphaTestEffect effect;
private Texture2D texture;
VertexBuffer vertices;
VertexBuffer verticesVertexColor;
IndexBuffer indices;
SpriteBatch spritebatch;
SpriteFont font;
AlphaTestMode mode = AlphaTestMode.Fog;
KeyboardState lastState;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "SampleContent";
}
protected override void LoadContent()
{
effect = new AlphaTestEffect(GraphicsDevice);
spritebatch = new SpriteBatch(GraphicsDevice);
font = Content.Load<SpriteFont>("Fonts/Debug");
texture = Content.Load<Texture2D>("Textures/alpha_test");
vertices = new VertexBuffer(GraphicsDevice, VertexPositionTexture.VertexDeclaration, 4, BufferUsage.WriteOnly);
vertices.SetData(new[]
{
new VertexPositionTexture(new Vector3(-5f, 0f, -5f), new Vector2(0f, 0f)),
new VertexPositionTexture(new Vector3(-5f, 0f, 5f), new Vector2(1f, 0f)),
new VertexPositionTexture(new Vector3(5f, 0f, 5f), new Vector2(1f, 1f)),
new VertexPositionTexture(new Vector3(5f, 0f, -5f), new Vector2(0f, 1f)),
});
verticesVertexColor = new VertexBuffer(GraphicsDevice, VertexPositionColorTexture.VertexDeclaration,
4, BufferUsage.WriteOnly);
verticesVertexColor.SetData(new[]
{
new VertexPositionColorTexture(new Vector3(-5f, 0f, -5f), Color.Green, new Vector2(0f, 0f)),
new VertexPositionColorTexture(new Vector3(-5f, 0f, 5f), Color.Green, new Vector2(1f, 0f)),
new VertexPositionColorTexture(new Vector3(5f, 0f, 5f), Color.Green, new Vector2(1f, 1f)),
new VertexPositionColorTexture(new Vector3(5f, 0f, -5f), Color.Green, new Vector2(0f, 1f)),
});
indices = new IndexBuffer(GraphicsDevice, IndexElementSize.ThirtyTwoBits, 6, BufferUsage.WriteOnly);
indices.SetData(new uint[] { 0, 2, 1, 0, 3, 2 });
}
protected override void UnloadContent()
{
}
protected override void Update(GameTime gameTime)
{
KeyboardState newState = Keyboard.GetState();
if (newState.IsKeyDown(Keys.Space) && lastState.IsKeyDown(Keys.Space) == false)
{
int currentIndex = (int)mode;
string[] names = Enum.GetNames(typeof(AlphaTestMode));
currentIndex++;
if (currentIndex == names.Length)
currentIndex = 0;
mode = (AlphaTestMode)Enum.Parse(typeof(AlphaTestMode), names[currentIndex]);
}
if (newState.IsKeyDown(Keys.F) && lastState.IsKeyDown(Keys.F) == false)
{
int currentIndex = (int)effect.AlphaFunction;
string[] names = Enum.GetNames(typeof(CompareFunction));
currentIndex++;
if (currentIndex == names.Length)
currentIndex = 0;
effect.AlphaFunction = (CompareFunction)Enum.Parse(typeof(CompareFunction), names[currentIndex]);
}
float alpha = effect.Alpha;
if(newState.IsKeyDown(Keys.Up))
{
alpha += (float)gameTime.ElapsedGameTime.TotalSeconds;
}
if (newState.IsKeyDown(Keys.Down))
{
alpha -= (float)gameTime.ElapsedGameTime.TotalSeconds;
}
effect.Alpha = MathHelper.Clamp(alpha, 0f, 1f);
int refAlpha = effect.ReferenceAlpha;
if (newState.IsKeyDown(Keys.Right))
{
refAlpha++;
}
if (newState.IsKeyDown(Keys.Left))
{
refAlpha--;
}
effect.ReferenceAlpha = (int)MathHelper.Clamp(refAlpha, 0, 255);
lastState = newState;
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
DrawText();
DrawMesh();
base.Draw(gameTime);
}
private void DrawText()
{
spritebatch.Begin();
spritebatch.DrawString(font, "AlphaTest sample - Current mode: " + mode + " -> Switch with Space\n" +
"AlphaFunction: " + effect.AlphaFunction + " -> Switch with F\n" +
"Alpha: " + effect.Alpha + " -> Change with Up/Down\n" +
"ReferenceAlpha: " + effect.ReferenceAlpha + " -> Change with Left/Right\n",
new Vector2(5, 5), Color.White);
spritebatch.End();
GraphicsDevice.BlendState = BlendState.Opaque;
GraphicsDevice.DepthStencilState = DepthStencilState.Default;
}
private void DrawMesh()
{
effect.VertexColorEnabled =
(mode == AlphaTestMode.VertexColorFog || mode == AlphaTestMode.VertexColorNoFog);
effect.DiffuseColor = Color.White.ToVector3();
effect.FogEnabled = (mode == AlphaTestMode.VertexColorFog || mode == AlphaTestMode.Fog);
effect.FogColor = Color.Gray.ToVector3();
effect.FogStart = 5f;
effect.FogEnd = 15f;
effect.Texture = texture;
effect.World = Matrix.Identity;
effect.View = Matrix.CreateLookAt(new Vector3(0f, 5f, -8f), Vector3.Zero, Vector3.Up);
effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
GraphicsDevice.Viewport.AspectRatio, 1f, 100f);
effect.CurrentTechnique.Passes[0].Apply();
GraphicsDevice.Indices = indices;
GraphicsDevice.SetVertexBuffer(effect.VertexColorEnabled ? verticesVertexColor : vertices);
GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 4, 0, 2);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name="AlphaTestEffectSample" Publisher="CN=ANX-Team" Version="1.0.0.0" />
<Properties>
<DisplayName>AlphaTestEffectSample</DisplayName>
<PublisherDisplayName>ANX Developer Team</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.2.0</OSMinVersion>
<OSMaxVersionTested>6.2.0</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="WindowsGame1.Program">
<VisualElements DisplayName="AlphaTestEffectSample" Logo="Assets\Logo.png" SmallLogo="Assets\SmallLogo.png" Description="AlphaTestEffectSample" ForegroundText="light" BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" ShortName="AlphaTestEffectSample" />
<SplashScreen Image="Assets\SplashScreen.png" />
</VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View File

@ -0,0 +1,25 @@
using System;
using ANX.Framework.NonXNA;
// 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 AlphaTestEffectSample
{
static class Program
{
static void Main(string[] args)
{
AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX10");
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "DirectX11");
//AddInSystemFactory.Instance.SetPreferredSystem(AddInType.RenderSystem, "OpenGL3");
using (Game1 game = new Game1())
{
game.Run();
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AlphaTestEffectSample")]
[assembly: AssemblyProduct("AlphaTestEffectSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("ANX Developer Team")]
[assembly: AssemblyCopyright("Copyright © ANX Developer Team 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. Only Windows
// assemblies support COM.
[assembly: ComVisible(false)]
// On Windows, the following GUID is for the ID of the typelib if this
// project is exposed to COM. On other platforms, it unique identifies the
// title storage container when deploying this assembly to the device.
[assembly: Guid("54ca10e1-a4e0-40b9-bf97-934b85b2887d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersionAttribute("1.0.0.0")]

View File

@ -8,8 +8,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("BasicEffectSample")] [assembly: AssemblyTitle("BasicEffectSample")]
[assembly: AssemblyProduct("BasicEffectSample")] [assembly: AssemblyProduct("BasicEffectSample")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("ANX Developer Team")]
[assembly: AssemblyCopyright("Copyright © 2012")] [assembly: AssemblyCopyright("Copyright © ANX Developer Team 2012")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -32,3 +32,4 @@ using System.Runtime.InteropServices;
// Revision // Revision
// //
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersionAttribute("1.0.0.0")]

View File

@ -176,6 +176,13 @@
<Processor>ModelProcessor</Processor> <Processor>ModelProcessor</Processor>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="Textures\alpha_test.png">
<Name>alpha_test</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
media/alpha_test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View File

@ -6,3 +6,4 @@ The following media is copyright by Roland "Glatzemann" Rosenkranz. You may not
1.) chest.png 1.) chest.png
2.) stone_tile.png 2.) stone_tile.png
3.) alpha_test.png