public void TestEquality() { EqualityTester <FbxDouble4> .TestEquality( new FbxDouble4(0, 1, 2, 3), new FbxDouble4(3, 2, 1, 0), new FbxDouble4(0, 1, 2, 3)); }
public void TestEquality() { EqualityTester <FbxDouble2> .TestEquality( new FbxDouble2(0, 1), new FbxDouble2(1, 0), new FbxDouble2(0, 1)); }
public void TestEquality() { EqualityTester <FbxDouble3> .TestEquality( new FbxDouble3(0, 1, 2), new FbxDouble3(2, 1, 0), new FbxDouble3(0, 1, 2)); }
public void TestEquality() { EqualityTester <FbxVector4> .TestEquality( new FbxVector4(0, 1, 2, 3), new FbxVector4(3, 2, 1, 0), new FbxVector4(0, 1, 2, 3)); }
public void TestEquality() { EqualityTester <FbxColor> .TestEquality( new FbxColor(0.0, 0.1, 0.2, 0.3), new FbxColor(0.3, 0.2, 0.1, 0.0), new FbxColor(0.0, 0.1, 0.2, 0.3)); }
public void TestEquality() { EqualityTester <FbxQuaternion> .TestEquality( new FbxQuaternion(0.0, 0.1, 0.2, 0.3), new FbxQuaternion(0.3, 0.2, 0.1, 0.0), new FbxQuaternion(0.0, 0.1, 0.2, 0.3)); }
public void TestEquality() { EqualityTester <FbxVector2> .TestEquality( new FbxVector2(0, 1), new FbxVector2(3, 2), new FbxVector2(0, 1)); }
public void TestBasics() { // test constructor FbxStatus status = new FbxStatus(); Assert.IsNotNull(status); // test dispose status.Dispose(); using (new FbxStatus()) {} // test comparing code and status status = new FbxStatus(FbxStatus.EStatusCode.eIndexOutOfRange); Assert.AreEqual(FbxStatus.EStatusCode.eIndexOutOfRange, status.GetCode()); Assert.IsTrue(FbxStatus.EStatusCode.eIndexOutOfRange == status); Assert.IsTrue(status == FbxStatus.EStatusCode.eIndexOutOfRange); Assert.IsTrue(FbxStatus.EStatusCode.eInvalidParameter != status); Assert.IsTrue(status != FbxStatus.EStatusCode.eInvalidParameter); // test copy ctor and clear (it only modifies status2, not status) var status2 = new FbxStatus(status); status2.Clear(); Assert.IsTrue(status.Error()); Assert.IsFalse(status2.Error()); // test SetCode status2.SetCode(FbxStatus.EStatusCode.eIndexOutOfRange); Assert.AreEqual(status, status2); status2.SetCode(FbxStatus.EStatusCode.eInvalidParameter, "wrong"); Assert.AreEqual("wrong", status2.GetErrorString()); // test equality EqualityTester <FbxStatus> .TestEquality(status, status2, new FbxStatus(status)); }
public virtual void TestEquality() { var a = CreateObject("a"); var b = CreateObject("b"); var acopy = a; // TODO: copy the proxy EqualityTester <T> .TestEquality(a, b, acopy); }
public virtual void TestEquality() { var a = CreateObject("a"); var b = CreateObject("b"); var acopy = a; // TODO: get a different proxy to the same underlying object EqualityTester <T> .TestEquality(a, b, acopy); }
public void TestEquality() { var a = FbxAxisSystem.MayaZUp; var b = FbxAxisSystem.MayaYUp; var acopy = new FbxAxisSystem(FbxAxisSystem.EPreDefinedAxisSystem.eMayaZUp); EqualityTester <FbxAxisSystem> .TestEquality(a, b, acopy); }
public void TestEquality() { var aIndex = m_fbxMesh.CreateLayer(); var bIndex = m_fbxMesh.CreateLayer(); var a = m_fbxMesh.GetLayer(aIndex); var b = m_fbxMesh.GetLayer(bIndex); var acopy = m_fbxMesh.GetLayer(aIndex); EqualityTester <FbxLayer> .TestEquality(a, b, acopy); }
public void TestEquality() { var zero = new FbxVector4(); var one = new FbxVector4(1, 1, 1); var mx1 = new FbxAMatrix(zero, zero, one); var mx2 = new FbxAMatrix(one, zero, one); var mx1copy = new FbxAMatrix(zero, zero, one); EqualityTester <FbxAMatrix> .TestEquality(mx1, mx2, mx1copy); }
public void TestEquality() { var a = new FbxDouble4(1, 2, 3, 4); var b = new FbxDouble4(5, 6, 7, 8); var c = new FbxDouble4(9, 8, 7, 6); var d = new FbxDouble4(5, 4, 3, 2); EqualityTester <FbxDouble4x4> .TestEquality( new FbxDouble4x4(a, b, c, d), new FbxDouble4x4(d, c, b, a), new FbxDouble4x4(a, b, c, d)); }
public void TestEquality() { var zero = new FbxVector4(); var one = new FbxVector4(1, 1, 1); var mx1 = new FbxMatrix(zero, zero, one); var mx2 = new FbxMatrix(one, zero, one); // Check that equality is value equality, not reference equality. var mx1copy = new FbxMatrix(zero, zero, one); EqualityTester <FbxMatrix> .TestEquality(mx1, mx2, mx1copy); // Check that we can compare with an affine matrix. mx1 = new FbxMatrix(new FbxVector4(1, 2, 3), new FbxVector4(0, -90, 0), one); var affine = new FbxAMatrix(new FbxVector4(1, 2, 3), new FbxVector4(0, -90, 0), one); Assert.IsTrue(mx1 == affine); }
public void TestComparison() { var a = FbxTime.FromSecondDouble(5); var b = FbxTime.FromSecondDouble(6); var acopy = FbxTime.FromSecondDouble(5); // Test equality. EqualityTester <FbxTime> .TestEquality(a, b, acopy); // Test inequality. Assert.IsTrue(a.CompareTo(b) < 0); Assert.IsTrue(b.CompareTo(a) > 0); Assert.IsTrue(a.CompareTo(acopy) == 0); Assert.IsTrue(a.CompareTo((object)null) > 0); Assert.That(() => a.CompareTo("a string"), Throws.Exception.TypeOf <System.ArgumentException>()); Assert.IsTrue(a < b); Assert.IsTrue(a <= b); Assert.IsFalse(a >= b); Assert.IsFalse(a > b); Assert.IsTrue((FbxTime)null < b); Assert.IsFalse(a < (FbxTime)null); Assert.IsFalse((FbxTime)null < (FbxTime)null); }
public void TestEquality() { using (var manager = FbxManager.Create()) { // FbxProperty var node = FbxNode.Create(manager, "node"); var prop1 = FbxProperty.Create(node, Globals.FbxBoolDT, "bool1"); var prop2 = FbxProperty.Create(node, Globals.FbxBoolDT, "bool2"); var prop1copy = node.FindProperty("bool1"); EqualityTester <FbxProperty> .TestEquality(prop1, prop2, prop1copy); // FbxPropertyT<bool> var vis1 = node.VisibilityInheritance; var vis2 = FbxNode.Create(manager, "node2").VisibilityInheritance; var vis1copy = vis1; // TODO: node.FindProperty("Visibility Inheritance"); -- but that has a different proxy type EqualityTester <FbxPropertyBool> .TestEquality(vis1, vis2, vis1copy); // FbxPropertyT<EInheritType> var inhType1 = node.InheritType; var inhType2 = FbxNode.Create(manager, "node3").InheritType; var inhType1Copy = inhType1; // TODO: node.FindProperty("InheritType"); EqualityTester <FbxPropertyEInheritType> .TestEquality(inhType1, inhType2, inhType1Copy); // FbxPropertyT<double> var lambert = FbxSurfaceLambert.Create(manager, "lambert"); var emissiveCopy = lambert.EmissiveFactor; // TODO: lambert.FindProperty("EmissiveFactor"); EqualityTester <FbxPropertyDouble> .TestEquality(lambert.EmissiveFactor, lambert.AmbientFactor, emissiveCopy); // FbxPropertyT<FbxDouble3> var lclTranslationCopy = node.LclTranslation; // TODO: node.FindProperty("Lcl Translation"); EqualityTester <FbxPropertyDouble3> .TestEquality(node.LclTranslation, node.LclRotation, lclTranslationCopy); // FbxPropertyT<float> var light = FbxLight.Create(manager, "light"); EqualityTester <FbxPropertyFloat> .TestEquality(light.LeftBarnDoor, light.RightBarnDoor, light.LeftBarnDoor); // FbxPropertyT<int> var constraint = FbxConstraintAim.Create(manager, "constraint"); var constraint2 = FbxConstraintAim.Create(manager, "constraint2"); var worldUpTypeCopy = constraint.WorldUpType; // TODO: constraint.FindProperty("WorldUpType"); EqualityTester <FbxPropertyInt> .TestEquality(constraint.WorldUpType, constraint2.WorldUpType, worldUpTypeCopy); // FbxPropertyT<> for FbxTexture enums var tex1 = FbxTexture.Create(manager, "tex1"); var tex2 = FbxTexture.Create(manager, "tex2"); var blendCopy = tex1.CurrentTextureBlendMode; // TODO: tex1.FindProperty(...) EqualityTester <FbxPropertyEBlendMode> .TestEquality(tex1.CurrentTextureBlendMode, tex2.CurrentTextureBlendMode, blendCopy); var wrapCopy = tex1.WrapModeU; // TODO: tex1.FindProperty(...) EqualityTester <FbxPropertyEWrapMode> .TestEquality(tex1.WrapModeU, tex2.WrapModeU, wrapCopy); // FbxPropertyT<FbxNull.ELook> var null1 = FbxNull.Create(manager, "null1"); var null2 = FbxNull.Create(manager, "null2"); EqualityTester <FbxPropertyNullELook> .TestEquality(null1.Look, null2.Look, null1.Look); // FbxPropertyT<FbxMarker.ELook> var marker1 = FbxMarker.Create(manager, "marker1"); var marker2 = FbxMarker.Create(manager, "marker2"); EqualityTester <FbxPropertyMarkerELook> .TestEquality(marker1.Look, marker2.Look, marker1.Look); // FbxPropertyT<string> var impl = FbxImplementation.Create(manager, "impl"); var renderAPIcopy = impl.RenderAPI; // TODO: impl.FindProperty("RenderAPI"); EqualityTester <FbxPropertyString> .TestEquality(impl.RenderAPI, impl.RenderAPIVersion, renderAPIcopy); // FbxPropertyT<> for FbxCamera enum EProjectionType var cam1 = FbxCamera.Create(manager, "cam1"); var cam2 = FbxCamera.Create(manager, "cam2"); var projectionCopy = cam1.ProjectionType; EqualityTester <FbxPropertyEProjectionType> .TestEquality(cam1.ProjectionType, cam2.ProjectionType, projectionCopy); // FbxPropertyT<> for FbxLight enum EType var light1 = FbxLight.Create(manager, "light1"); var light2 = FbxLight.Create(manager, "light2"); var typeCopy = light1.LightType; EqualityTester <FbxPropertyELightType> .TestEquality(light1.LightType, light2.LightType, typeCopy); var lightShapeCopy = light1.AreaLightShape; EqualityTester <FbxPropertyEAreaLightShape> .TestEquality(light1.AreaLightShape, light2.AreaLightShape, lightShapeCopy); var decayCopy = light1.DecayType; EqualityTester <FbxPropertyEDecayType> .TestEquality(light1.DecayType, light2.DecayType, decayCopy); var floatCopy = light1.LeftBarnDoor; EqualityTester <FbxPropertyFloat> .TestEquality(light1.LeftBarnDoor, light2.LeftBarnDoor, floatCopy); } }
public void TestEquality() { // Left here in case we add equality operations back in. // For now, equality is just reference equality. EqualityTester <FbxDataType> .TestEquality(Globals.FbxBoolDT, Globals.FbxFloatDT, Globals.FbxBoolDT); }
public void TestEquality() { EqualityTester <FbxSystemUnit> .TestEquality(FbxSystemUnit.mm, FbxSystemUnit.Yard, new FbxSystemUnit(0.1)); }