- Fixed the Curve class Oscillate mode and all Curve tests are now passing!
- Added the missing Serializable attribute to the Curve class - Added some more Development attributes
This commit is contained in:
parent
4fdad340d3
commit
646c2e5b79
@ -32,8 +32,6 @@ namespace ANX.Framework.TestCenter.Strukturen
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class CurveKeyTest
|
public class CurveKeyTest
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#region Testdata
|
#region Testdata
|
||||||
static object[] sixteenfloats =
|
static object[] sixteenfloats =
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -10,6 +11,9 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct BoundingBox : IEquatable<BoundingBox>
|
public struct BoundingBox : IEquatable<BoundingBox>
|
||||||
{
|
{
|
||||||
#region public fields
|
#region public fields
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -11,6 +12,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct BoundingSphere : IEquatable<BoundingSphere>
|
public struct BoundingSphere : IEquatable<BoundingSphere>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using ANX.Framework.Graphics.PackedVector;
|
using ANX.Framework.Graphics.PackedVector;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -7,6 +8,9 @@ using ANX.Framework.Graphics.PackedVector;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Color : IPackedVector<uint>, IPackedVector, IEquatable<Color>
|
public struct Color : IPackedVector<uint>, IPackedVector, IEquatable<Color>
|
||||||
{
|
{
|
||||||
#region Private Members
|
#region Private Members
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
|
[Developer("Glatzemann")]
|
||||||
[TestState(TestStateAttribute.TestState.Tested)]
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public enum ContainmentType
|
public enum ContainmentType
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -6,64 +7,45 @@ using System;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
#if !WINDOWSMETRO // TODO: find replacement for Win8!
|
||||||
|
[Serializable]
|
||||||
|
#endif
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("floAr")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public class Curve
|
public class Curve
|
||||||
{
|
{
|
||||||
private CurveKeyCollection keys;
|
public CurveLoopType PreLoop { get; set; }
|
||||||
private CurveLoopType preLoop;
|
public CurveLoopType PostLoop { get; set; }
|
||||||
private CurveLoopType postLoop;
|
public CurveKeyCollection Keys { get; private set; }
|
||||||
|
|
||||||
public CurveLoopType PreLoop
|
public bool IsConstant
|
||||||
{
|
{
|
||||||
get { return preLoop; }
|
get { return Keys.Count <= 1; }
|
||||||
set { preLoop = value; }
|
|
||||||
}
|
|
||||||
public CurveLoopType PostLoop
|
|
||||||
{
|
|
||||||
get { return postLoop; }
|
|
||||||
set { postLoop = value; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CurveKeyCollection Keys
|
public Curve()
|
||||||
{
|
{
|
||||||
get
|
Keys = new CurveKeyCollection();
|
||||||
{
|
|
||||||
return keys;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean IsConstant
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.keys.Count <= 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Curve Clone()
|
public Curve Clone()
|
||||||
{
|
{
|
||||||
Curve result = new Curve();
|
return new Curve { Keys = Keys.Clone(), PreLoop = PreLoop, PostLoop = PostLoop };
|
||||||
result.keys = this.keys.Clone();
|
|
||||||
result.preLoop = this.preLoop;
|
|
||||||
result.postLoop = this.postLoop;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
public Curve()
|
|
||||||
{
|
|
||||||
this.keys = new CurveKeyCollection();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region tangent calculation
|
#region ComputeTangent
|
||||||
//formulas from: http://msdn.microsoft.com/de-de/library/microsoft.xna.framework.curvetangent%28v=xnagamestudio.40%29.aspx
|
//formulas from: http://msdn.microsoft.com/de-de/library/microsoft.xna.framework.curvetangent%28v=xnagamestudio.40%29.aspx
|
||||||
public void ComputeTangent(Int32 index, CurveTangent tangentInOutType)
|
public void ComputeTangent(int index, CurveTangent tangentInOutType)
|
||||||
{
|
{
|
||||||
if (index < 0 || index >= keys.Count)
|
if (index < 0 || index >= Keys.Count)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
CurveKey prev = index > 0 ? this.keys[index - 1] : this.keys[index];
|
CurveKey prev = index > 0 ? this.Keys[index - 1] : this.Keys[index];
|
||||||
CurveKey current = this.keys[index];
|
CurveKey current = this.Keys[index];
|
||||||
current.TangentIn = 0;
|
current.TangentIn = 0;
|
||||||
CurveKey next = index < this.keys.Count - 1 ? this.keys[index + 1] : this.keys[index];
|
CurveKey next = index < this.Keys.Count - 1 ? this.Keys[index + 1] : this.Keys[index];
|
||||||
|
|
||||||
|
|
||||||
switch (tangentInOutType)
|
switch (tangentInOutType)
|
||||||
@ -82,17 +64,18 @@ namespace ANX.Framework
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void ComputeTangent(Int32 index, CurveTangent tangentInType, CurveTangent tangentOutType)
|
|
||||||
|
public void ComputeTangent(int index, CurveTangent tangentInType, CurveTangent tangentOutType)
|
||||||
{
|
{
|
||||||
if (index < 0 || index >= keys.Count)
|
if (index < 0 || index >= Keys.Count)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
CurveKey prev = index > 0 ? this.keys[index - 1] : this.keys[index];
|
CurveKey prev = index > 0 ? this.Keys[index - 1] : this.Keys[index];
|
||||||
CurveKey current = this.keys[index];
|
CurveKey current = this.Keys[index];
|
||||||
current.TangentIn = 0;
|
current.TangentIn = 0;
|
||||||
CurveKey next = index < this.keys.Count - 1 ? this.keys[index + 1] : this.keys[index];
|
CurveKey next = index < this.Keys.Count - 1 ? this.Keys[index + 1] : this.Keys[index];
|
||||||
|
|
||||||
|
|
||||||
switch (tangentInType)
|
switch (tangentInType)
|
||||||
@ -121,165 +104,169 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ComputeTangents(CurveTangent tangentInOutType)
|
public void ComputeTangents(CurveTangent tangentInOutType)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < this.keys.Count; ++i)
|
for (int i = 0; i < this.Keys.Count; ++i)
|
||||||
{
|
{
|
||||||
this.ComputeTangent(i, tangentInOutType);
|
this.ComputeTangent(i, tangentInOutType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ComputeTangents(CurveTangent tangentInType, CurveTangent tangentOutType)
|
public void ComputeTangents(CurveTangent tangentInType, CurveTangent tangentOutType)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < this.keys.Count; ++i)
|
for (int i = 0; i < this.Keys.Count; ++i)
|
||||||
{
|
{
|
||||||
this.ComputeTangent(i, tangentInType, tangentOutType);
|
this.ComputeTangent(i, tangentInType, tangentOutType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Single Evaluate(Single position)
|
public float Evaluate(float position)
|
||||||
|
{
|
||||||
|
if (Keys.Count == 0)
|
||||||
|
return 0f;
|
||||||
|
|
||||||
|
if (Keys.Count == 1)
|
||||||
|
return Keys[0].Value;
|
||||||
|
|
||||||
|
CurveKey firstPointOfCurve = Keys[0];
|
||||||
|
CurveKey lastPointOfCurve = Keys[Keys.Count - 1];
|
||||||
|
|
||||||
|
if (position < firstPointOfCurve.Position)
|
||||||
|
return EvalualtePreLoop(firstPointOfCurve, lastPointOfCurve, position);
|
||||||
|
|
||||||
|
if (position > lastPointOfCurve.Position)
|
||||||
|
return EvalualtePostLoop(firstPointOfCurve, lastPointOfCurve, position);
|
||||||
|
|
||||||
|
return Interpolate(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region EvalualtePreLoop
|
||||||
|
private float EvalualtePreLoop(CurveKey first, CurveKey last, float position)
|
||||||
|
{
|
||||||
|
int wraps;
|
||||||
|
float firstPosition = first.Position;
|
||||||
|
float lastPosition = last.Position;
|
||||||
|
// tspan is min 1 to avoid deadlock at constant curves
|
||||||
|
float timeSpan = Math.Max(1, lastPosition - firstPosition);
|
||||||
|
|
||||||
|
// Description from : http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.curvelooptype.aspx
|
||||||
|
switch (PreLoop)
|
||||||
|
{
|
||||||
|
case CurveLoopType.Constant:
|
||||||
|
// The Curve will evaluate to its first key for positions before the first point in the Curve and to
|
||||||
|
// the last key for positions after the last point.
|
||||||
|
return first.Value;
|
||||||
|
|
||||||
|
case CurveLoopType.Linear:
|
||||||
|
// Linear interpolation will be performed to determine the value.
|
||||||
|
return first.Value - first.TangentIn * (first.Position - position);
|
||||||
|
|
||||||
|
case CurveLoopType.Cycle:
|
||||||
|
// Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
||||||
|
position -= timeSpan * CountWraps(position);
|
||||||
|
return Interpolate(position);
|
||||||
|
|
||||||
|
case CurveLoopType.CycleOffset:
|
||||||
|
// Positions specified past the ends of the curv will wrap around to the opposite side of the Curve.
|
||||||
|
// The value will be offset by the difference between the values of the first and last CurveKey
|
||||||
|
// multiplied by the number of times the position wraps around. If the position is before the first
|
||||||
|
// point in the Curve, the difference will be subtracted from its value; otherwise, the difference
|
||||||
|
// will be added
|
||||||
|
wraps = CountWraps(position);
|
||||||
|
float difference = (last.Value - first.Value) * wraps;
|
||||||
|
position -= timeSpan * CountWraps(position);
|
||||||
|
return Interpolate(position) + difference;
|
||||||
|
|
||||||
|
case CurveLoopType.Oscillate:
|
||||||
|
// Positions specified past the ends of the Curve act as an offset from the same side of the Curve
|
||||||
|
// toward the opposite side.
|
||||||
|
wraps = CountWraps(position);
|
||||||
|
float offset = position - (first.Position + wraps * timeSpan);
|
||||||
|
float wrappedPosition = (wraps & 1) != 0 ? (last.Position - offset) : (first.Position + offset);
|
||||||
|
return Interpolate(wrappedPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Interpolate(position);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region EvalualtePostLoop
|
||||||
|
private float EvalualtePostLoop(CurveKey first, CurveKey last, float position)
|
||||||
{
|
{
|
||||||
int wraps;
|
int wraps;
|
||||||
//Get first and last Point
|
|
||||||
CurveKey first = keys[0];
|
|
||||||
float firstPosition = first.Position;
|
float firstPosition = first.Position;
|
||||||
CurveKey last = keys[keys.Count - 1];
|
|
||||||
float lastPosition = last.Position;
|
float lastPosition = last.Position;
|
||||||
//tspan is min 1 to avoid deadlock at constant curves
|
//tspan is min 1 to avoid deadlock at constant curves
|
||||||
float timeSpan = Math.Max(1, lastPosition - firstPosition);
|
float timeSpan = Math.Max(1, lastPosition - firstPosition);
|
||||||
//wanted point before first point
|
|
||||||
if (position < first.Position)
|
switch (PostLoop)
|
||||||
{
|
{
|
||||||
// Description from : http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.curvelooptype.aspx
|
case CurveLoopType.Constant:
|
||||||
switch (this.PreLoop)
|
// The Curve will evaluate to its first key for positions before the first point in the Curve and to
|
||||||
{
|
// the last key for positions after the last point.
|
||||||
case CurveLoopType.Constant:
|
return last.Value;
|
||||||
//The Curve will evaluate to its first key for positions before the first point in the Curve and to the last key for positions after the last point.
|
|
||||||
return first.Value;
|
|
||||||
|
|
||||||
case CurveLoopType.Linear:
|
case CurveLoopType.Linear:
|
||||||
// Linear interpolation will be performed to determine the value.
|
// Linear interpolation will be performed to determine the value.
|
||||||
return first.Value - first.TangentIn * (first.Position - position);
|
return last.Value - last.TangentOut * (last.Position - position);
|
||||||
|
|
||||||
case CurveLoopType.Cycle:
|
case CurveLoopType.Cycle:
|
||||||
// Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
// Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
||||||
|
position -= timeSpan * CountWraps(position);
|
||||||
|
return Interpolate(position);
|
||||||
|
|
||||||
|
case CurveLoopType.CycleOffset:
|
||||||
|
// Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
||||||
|
// The value will be offset by the difference between the values of the first and last CurveKey
|
||||||
|
// multiplied by the number of times the position wraps around. If the position is before the first
|
||||||
|
// point in the Curve, the difference will be subtracted from its value; otherwise, the difference
|
||||||
|
// will be added.
|
||||||
|
wraps = CountWraps(position);
|
||||||
|
float difference = (last.Value - first.Value) * wraps;
|
||||||
|
position -= timeSpan * CountWraps(position);
|
||||||
|
return Interpolate(position) + difference;
|
||||||
|
|
||||||
position -= timeSpan * countWraps(position);
|
case CurveLoopType.Oscillate:
|
||||||
|
// Positions specified past the ends of the Curve act as an offset from the same side of the Curve
|
||||||
return this.interpolate((position));
|
// toward the opposite side.
|
||||||
|
wraps = CountWraps(position);
|
||||||
|
float offset = position - (first.Position + wraps * timeSpan);
|
||||||
|
float wrappedPosition = (wraps & 1) != 0 ? (last.Position - offset) : (first.Position + offset);
|
||||||
case CurveLoopType.CycleOffset:
|
return Interpolate(wrappedPosition);
|
||||||
//Positions specified past the ends of the curv will wrap around to the opposite side of the Curve.
|
|
||||||
//The value will be offset by the difference between the values of the first and last CurveKey
|
|
||||||
//multiplied by the number of times the position wraps around. If the position is before the first
|
|
||||||
//point in the Curve, the difference will be subtracted from its value; otherwise, the difference
|
|
||||||
//will be added
|
|
||||||
wraps = countWraps(position);
|
|
||||||
float difference = (this.keys[this.keys.Count - 1].Value - this.keys[0].Value) * wraps;
|
|
||||||
|
|
||||||
position -= timeSpan * countWraps(position);
|
|
||||||
|
|
||||||
return this.interpolate(position) + difference;
|
|
||||||
|
|
||||||
case CurveLoopType.Oscillate:
|
|
||||||
//Positions specified past the ends of the Curve act as an offset from the same side of the Curve
|
|
||||||
//toward the opposite side.
|
|
||||||
wraps = -countWraps(position);
|
|
||||||
|
|
||||||
if (wraps % 2 == 1)
|
|
||||||
{
|
|
||||||
return this.interpolate(lastPosition - position + firstPosition - (wraps * timeSpan));
|
|
||||||
}
|
|
||||||
return this.interpolate(position + (wraps * timeSpan));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//wanted point behind last point
|
|
||||||
else if (position > last.Position)
|
|
||||||
{
|
|
||||||
switch (this.PostLoop)
|
|
||||||
{
|
|
||||||
case CurveLoopType.Constant:
|
|
||||||
//The Curve will evaluate to its first key for positions before the first point in the Curve and to
|
|
||||||
//the last key for positions after the last point.
|
|
||||||
return last.Value;
|
|
||||||
|
|
||||||
case CurveLoopType.Linear:
|
|
||||||
//Linear interpolation will be performed to determine the value.
|
|
||||||
return last.Value + last.TangentOut * (position - last.Position);
|
|
||||||
|
|
||||||
case CurveLoopType.Cycle:
|
|
||||||
// Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
|
||||||
position -= timeSpan * countWraps(position);
|
|
||||||
|
|
||||||
return this.interpolate((position));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case CurveLoopType.CycleOffset:
|
|
||||||
//Positions specified past the ends of the curve will wrap around to the opposite side of the Curve.
|
|
||||||
//The value will be offset by the difference between the values of the first and last CurveKey
|
|
||||||
//multiplied by the number of times the position wraps around. If the position is before the first
|
|
||||||
//point in the Curve, the difference will be subtracted from its value; otherwise, the difference
|
|
||||||
//will be added.
|
|
||||||
wraps = countWraps(position);
|
|
||||||
float difference = (this.keys[this.keys.Count - 1].Value - this.keys[0].Value) * wraps;
|
|
||||||
|
|
||||||
position -= timeSpan * countWraps(position);
|
|
||||||
|
|
||||||
return this.interpolate(position) + difference;
|
|
||||||
|
|
||||||
case CurveLoopType.Oscillate:
|
|
||||||
//Positions specified past the ends of the Curve act as an offset from the same side of the Curve
|
|
||||||
//toward the opposite side.
|
|
||||||
wraps = -countWraps(position);
|
|
||||||
position += timeSpan * wraps;
|
|
||||||
if (wraps % 2 == 1)
|
|
||||||
{
|
|
||||||
return this.interpolate(lastPosition - position + firstPosition - (wraps * timeSpan));
|
|
||||||
}
|
|
||||||
return this.interpolate(position + (wraps * timeSpan));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//in curve
|
return Interpolate(position);
|
||||||
return interpolate(position);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private int countWraps(float position)
|
#endregion
|
||||||
|
|
||||||
|
private int CountWraps(float position)
|
||||||
{
|
{
|
||||||
float wraps = (position - keys[0].Position) / (keys[keys.Count - 1].Position - keys[0].Position);
|
float timeRange = Keys[Keys.Count - 1].Position - Keys[0].Position;
|
||||||
if (wraps < 0) wraps--;
|
float wraps = (position - Keys[0].Position) / timeRange;
|
||||||
|
if (wraps < 0)
|
||||||
|
wraps--;
|
||||||
|
|
||||||
return (int)wraps;
|
return (int)wraps;
|
||||||
}
|
}
|
||||||
|
|
||||||
private float interpolate(float position)
|
private float Interpolate(float position)
|
||||||
{
|
{
|
||||||
//interpolate inside the curve with cubic hermite:
|
//interpolate inside the curve with cubic hermite: http://forums.create.msdn.com/forums/p/53392/323814.aspx
|
||||||
http://forums.create.msdn.com/forums/p/53392/323814.aspx
|
|
||||||
|
|
||||||
|
|
||||||
//assume position is inside curve
|
//assume position is inside curve
|
||||||
CurveKey a = this.keys[0];
|
CurveKey a = Keys[0];
|
||||||
CurveKey b;
|
CurveKey b;
|
||||||
for (int i = 1; i < this.keys.Count; ++i)
|
for (int nextKeyIndex = 1; nextKeyIndex < Keys.Count; nextKeyIndex++)
|
||||||
{
|
{
|
||||||
b = this.Keys[i];
|
b = Keys[nextKeyIndex];
|
||||||
if (b.Position >= position)
|
if (b.Position >= position)
|
||||||
{
|
{
|
||||||
//stepping
|
//stepping
|
||||||
if (a.Continuity == CurveContinuity.Step)
|
if (a.Continuity == CurveContinuity.Step)
|
||||||
{
|
return position == b.Position ? b.Value : a.Value;
|
||||||
if (position == b.Position)
|
|
||||||
{
|
|
||||||
return b.Position;
|
|
||||||
}
|
|
||||||
return a.Value;
|
|
||||||
|
|
||||||
}
|
|
||||||
//smooth
|
//smooth
|
||||||
//get the location between a and b in [0,1]
|
//get the location between a and b in [0,1]
|
||||||
float moment = (position - a.Position) / (b.Position - a.Position);
|
float moment = (position - a.Position) / (b.Position - a.Position);
|
||||||
@ -291,6 +278,5 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -8,8 +9,10 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
public class CurveKeyCollection : ICollection<CurveKey>,
|
[PercentageComplete(100)]
|
||||||
IEnumerable<CurveKey>, IEnumerable
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
|
public class CurveKeyCollection : ICollection<CurveKey>, IEnumerable<CurveKey>, IEnumerable
|
||||||
{
|
{
|
||||||
#region Private
|
#region Private
|
||||||
private List<CurveKey> keys;
|
private List<CurveKey> keys;
|
||||||
|
@ -11,6 +11,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public abstract class GameHost
|
public abstract class GameHost
|
||||||
{
|
{
|
||||||
internal event EventHandler<EventArgs> Activated;
|
internal event EventHandler<EventArgs> Activated;
|
||||||
|
@ -11,6 +11,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public abstract class GameWindow
|
public abstract class GameWindow
|
||||||
{
|
{
|
||||||
#region Private
|
#region Private
|
||||||
|
@ -15,6 +15,7 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
[Developer("Glatzemann")]
|
[Developer("Glatzemann")]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService
|
public class GraphicsDeviceManager : IGraphicsDeviceManager, IDisposable, IGraphicsDeviceService
|
||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using ANX.Framework.NonXNA;
|
using ANX.Framework.NonXNA;
|
||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -13,7 +14,9 @@ using ANX.Framework.Graphics;
|
|||||||
|
|
||||||
namespace ANX.Framework.Input.MotionSensing
|
namespace ANX.Framework.Input.MotionSensing
|
||||||
{
|
{
|
||||||
public class MotionSensingDevice
|
[PercentageComplete(100)]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
|
public static class MotionSensingDevice
|
||||||
{
|
{
|
||||||
private static readonly IMotionSensingDevice motionSensingDevice;
|
private static readonly IMotionSensingDevice motionSensingDevice;
|
||||||
|
|
||||||
@ -30,7 +33,8 @@ namespace ANX.Framework.Input.MotionSensing
|
|||||||
|
|
||||||
static MotionSensingDevice()
|
static MotionSensingDevice()
|
||||||
{
|
{
|
||||||
motionSensingDevice = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>().MotionSensingDevice;
|
var creator = AddInSystemFactory.Instance.GetDefaultCreator<IInputSystemCreator>();
|
||||||
|
motionSensingDevice = creator.MotionSensingDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MotionSensingDeviceState GetState()
|
public static MotionSensingDeviceState GetState()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using ANX.Framework.Graphics;
|
using ANX.Framework.Graphics;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -11,41 +12,40 @@ using ANX.Framework.Graphics;
|
|||||||
#if XNAEXT
|
#if XNAEXT
|
||||||
namespace ANX.Framework.Input.MotionSensing
|
namespace ANX.Framework.Input.MotionSensing
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[TestState(TestStateAttribute.TestState.Untested)]
|
||||||
public struct MotionSensingDeviceState
|
public struct MotionSensingDeviceState
|
||||||
{
|
{
|
||||||
private bool connected;
|
private readonly bool connected;
|
||||||
|
|
||||||
private Texture2D pRGB;
|
private readonly Texture2D pRGB;
|
||||||
private Texture2D pDepth;
|
private readonly Texture2D pDepth;
|
||||||
|
|
||||||
private Vector3 pHipCenter;
|
private readonly Vector3 pHipCenter;
|
||||||
private Vector3 pSpine;
|
private readonly Vector3 pSpine;
|
||||||
private Vector3 pShoulderCenter;
|
private readonly Vector3 pShoulderCenter;
|
||||||
private Vector3 pHead;
|
private readonly Vector3 pHead;
|
||||||
private Vector3 pShoulderLeft;
|
private readonly Vector3 pShoulderLeft;
|
||||||
private Vector3 pElbowLeft;
|
private readonly Vector3 pElbowLeft;
|
||||||
private Vector3 pWristLeft;
|
private readonly Vector3 pWristLeft;
|
||||||
private Vector3 pHandLeft;
|
private readonly Vector3 pHandLeft;
|
||||||
private Vector3 pShoulderRight;
|
private readonly Vector3 pShoulderRight;
|
||||||
private Vector3 pElbowRight;
|
private readonly Vector3 pElbowRight;
|
||||||
private Vector3 pWristRight;
|
private readonly Vector3 pWristRight;
|
||||||
private Vector3 pHandRight;
|
private readonly Vector3 pHandRight;
|
||||||
private Vector3 pHipLeft;
|
private readonly Vector3 pHipLeft;
|
||||||
private Vector3 pKneeLeft;
|
private readonly Vector3 pKneeLeft;
|
||||||
private Vector3 pAnkleLeft;
|
private readonly Vector3 pAnkleLeft;
|
||||||
private Vector3 pFootLeft;
|
private readonly Vector3 pFootLeft;
|
||||||
private Vector3 pHipRight;
|
private readonly Vector3 pHipRight;
|
||||||
private Vector3 pKneeRight;
|
private readonly Vector3 pKneeRight;
|
||||||
private Vector3 pAnkleRight;
|
private readonly Vector3 pAnkleRight;
|
||||||
private Vector3 pFootRight;
|
private readonly Vector3 pFootRight;
|
||||||
private Vector3 pCount;
|
private readonly Vector3 pCount;
|
||||||
|
|
||||||
public bool Connected
|
public bool Connected
|
||||||
{
|
{
|
||||||
get
|
get { return this.connected; }
|
||||||
{
|
|
||||||
return this.connected;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Texture2D RGB { get { return this.pRGB; } }
|
public Texture2D RGB { get { return this.pRGB; } }
|
||||||
@ -73,37 +73,39 @@ namespace ANX.Framework.Input.MotionSensing
|
|||||||
public Vector3 FootRight { get { return this.pFootRight; } }
|
public Vector3 FootRight { get { return this.pFootRight; } }
|
||||||
public Vector3 Count { get { return this.pCount; } }
|
public Vector3 Count { get { return this.pCount; } }
|
||||||
|
|
||||||
public MotionSensingDeviceState(bool connected, Texture2D _RGB, Texture2D _Depth, Vector3 _HipCenter, Vector3 _Spine, Vector3 _ShoulderCenter, Vector3 _Head, Vector3 _ShoulderLeft,
|
public MotionSensingDeviceState(bool connected, Texture2D rgbTexture, Texture2D depthTe, Vector3 hipCenter,
|
||||||
Vector3 _ElbowLeft, Vector3 _WristLeft, Vector3 _HandLeft, Vector3 _ShoulderRight, Vector3 _ElbowRight, Vector3 _WristRight, Vector3 _HandRight, Vector3 _HipLeft, Vector3 _KneeLeft, Vector3 _AnkleLeft, Vector3 _FootLeft, Vector3 _HipRight, Vector3 _KneeRight, Vector3 _AnkleRight, Vector3 _FootRight, Vector3 _Count)
|
Vector3 spine, Vector3 shoulderCenter, Vector3 head, Vector3 shoulderLeft, Vector3 elbowLeft, Vector3 wristLeft,
|
||||||
|
Vector3 handLeft, Vector3 shoulderRight, Vector3 elbowRight, Vector3 wristRight, Vector3 handRight,
|
||||||
|
Vector3 hipLeft, Vector3 kneeLeft, Vector3 ankleLeft, Vector3 footLeft, Vector3 hipRight, Vector3 kneeRight,
|
||||||
|
Vector3 ankleRight, Vector3 footRight, Vector3 count)
|
||||||
{
|
{
|
||||||
this.connected = connected;
|
this.connected = connected;
|
||||||
|
|
||||||
pRGB = _RGB;
|
pRGB = rgbTexture;
|
||||||
pDepth = _Depth;
|
pDepth = depthTe;
|
||||||
|
|
||||||
pHipCenter = _HipCenter;
|
pHipCenter = hipCenter;
|
||||||
pSpine = _Spine;
|
pSpine = spine;
|
||||||
pShoulderCenter = _ShoulderCenter;
|
pShoulderCenter = shoulderCenter;
|
||||||
pHead = _Head;
|
pHead = head;
|
||||||
pShoulderLeft = _ShoulderLeft;
|
pShoulderLeft = shoulderLeft;
|
||||||
pElbowLeft=_ElbowLeft;
|
pElbowLeft = elbowLeft;
|
||||||
pWristLeft=_WristLeft;
|
pWristLeft = wristLeft;
|
||||||
pHandLeft=_HandLeft;
|
pHandLeft = handLeft;
|
||||||
pShoulderRight=_ShoulderRight;
|
pShoulderRight = shoulderRight;
|
||||||
pElbowRight=_ElbowRight;
|
pElbowRight = elbowRight;
|
||||||
pWristRight=_WristRight;
|
pWristRight = wristRight;
|
||||||
pHandRight=_HandRight;
|
pHandRight = handRight;
|
||||||
pHipLeft=_HipLeft;
|
pHipLeft = hipLeft;
|
||||||
pKneeLeft=_KneeLeft;
|
pKneeLeft = kneeLeft;
|
||||||
pAnkleLeft=_AnkleLeft;
|
pAnkleLeft = ankleLeft;
|
||||||
pFootLeft=_FootLeft;
|
pFootLeft = footLeft;
|
||||||
pHipRight=_HipRight;
|
pHipRight = hipRight;
|
||||||
pKneeRight=_KneeRight;
|
pKneeRight = kneeRight;
|
||||||
pAnkleRight=_AnkleRight;
|
pAnkleRight = ankleRight;
|
||||||
pFootRight=_FootRight;
|
pFootRight = footRight;
|
||||||
pCount=_Count;
|
pCount = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
// For details see: http://anxframework.codeplex.com/license
|
// For details see: http://anxframework.codeplex.com/license
|
||||||
@ -5,6 +7,8 @@
|
|||||||
#if XNAEXT
|
#if XNAEXT
|
||||||
namespace ANX.Framework.Input.MotionSensing
|
namespace ANX.Framework.Input.MotionSensing
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[TestState(TestStateAttribute.TestState.Tested)]
|
||||||
public enum MotionSensingDeviceType
|
public enum MotionSensingDeviceType
|
||||||
{
|
{
|
||||||
Kinect,
|
Kinect,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -10,6 +11,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(70)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Matrix : IEquatable<Matrix>
|
public struct Matrix : IEquatable<Matrix>
|
||||||
{
|
{
|
||||||
#region Public Fields
|
#region Public Fields
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -10,6 +11,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Plane : IEquatable<Plane>
|
public struct Plane : IEquatable<Plane>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
@ -17,7 +21,6 @@ namespace ANX.Framework
|
|||||||
public Vector3 Normal;
|
public Vector3 Normal;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region constructors
|
#region constructors
|
||||||
public Plane(float a, float b, float c, float d)
|
public Plane(float a, float b, float c, float d)
|
||||||
{
|
{
|
||||||
@ -43,7 +46,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region public methods
|
#region public methods
|
||||||
public float Dot(Vector4 value)
|
public float Dot(Vector4 value)
|
||||||
{
|
{
|
||||||
@ -343,7 +345,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region IEquatable implementation
|
#region IEquatable implementation
|
||||||
public override bool Equals(Object obj)
|
public override bool Equals(Object obj)
|
||||||
{
|
{
|
||||||
@ -356,7 +357,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region operator overloading
|
#region operator overloading
|
||||||
public static bool operator ==(Plane lhs, Plane rhs)
|
public static bool operator ==(Plane lhs, Plane rhs)
|
||||||
{
|
{
|
||||||
|
@ -8,9 +8,9 @@ using ANX.Framework.NonXNA.Development;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
[PercentageComplete(100)]
|
[PercentageComplete(100)]
|
||||||
[TestState(TestStateAttribute.TestState.Untested)]
|
|
||||||
[Developer("???")]
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Point : IEquatable<Point>
|
public struct Point : IEquatable<Point>
|
||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
// This file is part of the ANX.Framework created by the
|
// This file is part of the ANX.Framework created by the
|
||||||
@ -9,6 +11,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Quaternion : IEquatable<Quaternion>
|
public struct Quaternion : IEquatable<Quaternion>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
@ -418,7 +423,7 @@ namespace ANX.Framework
|
|||||||
#region IEquatable implementation
|
#region IEquatable implementation
|
||||||
public override bool Equals(Object obj)
|
public override bool Equals(Object obj)
|
||||||
{
|
{
|
||||||
return (obj is Quaternion) ? this.Equals((Quaternion)obj) : false;
|
return (obj is Quaternion) && this.Equals((Quaternion)obj);
|
||||||
}
|
}
|
||||||
public bool Equals(Quaternion other)
|
public bool Equals(Quaternion other)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -6,6 +7,9 @@ using System;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Ray : IEquatable<Ray>
|
public struct Ray : IEquatable<Ray>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
@ -20,7 +24,6 @@ namespace ANX.Framework
|
|||||||
public Vector3 Position;
|
public Vector3 Position;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region constructors
|
#region constructors
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Ray"/> struct.
|
/// Initializes a new instance of the <see cref="Ray"/> struct.
|
||||||
@ -34,7 +37,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region public methods
|
#region public methods
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a hash code for this instance.
|
/// Returns a hash code for this instance.
|
||||||
@ -179,7 +181,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region operator overloading
|
#region operator overloading
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implements the operator ==.
|
/// Implements the operator ==.
|
||||||
@ -207,7 +208,6 @@ namespace ANX.Framework
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region IEquatable implementation
|
#region IEquatable implementation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
|
/// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -7,6 +8,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Rectangle : IEquatable<Rectangle>
|
public struct Rectangle : IEquatable<Rectangle>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
// 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.
|
||||||
@ -7,6 +8,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Vector2 : IEquatable<Vector2>
|
public struct Vector2 : IEquatable<Vector2>
|
||||||
{
|
{
|
||||||
#region fields
|
#region fields
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -10,6 +11,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Vector3 : IEquatable<Vector3>
|
public struct Vector3 : IEquatable<Vector3>
|
||||||
{
|
{
|
||||||
#region Private Static Fields
|
#region Private Static Fields
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#region Using Statements
|
#region Using Statements
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using ANX.Framework.NonXNA.Development;
|
||||||
|
|
||||||
#endregion // Using Statements
|
#endregion // Using Statements
|
||||||
|
|
||||||
@ -10,6 +11,9 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace ANX.Framework
|
namespace ANX.Framework
|
||||||
{
|
{
|
||||||
|
[PercentageComplete(100)]
|
||||||
|
[Developer("???")]
|
||||||
|
[TestState(TestStateAttribute.TestState.InProgress)]
|
||||||
public struct Vector4 : IEquatable<Vector4>
|
public struct Vector4 : IEquatable<Vector4>
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
@ -625,7 +629,7 @@ namespace ANX.Framework
|
|||||||
|
|
||||||
public override bool Equals(Object obj)
|
public override bool Equals(Object obj)
|
||||||
{
|
{
|
||||||
return (obj is Vector4) ? this.Equals((Vector4)obj) : false;
|
return (obj is Vector4) && this.Equals((Vector4)obj);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user