Example #1
0
        public bool ne(FbxDouble2 pVector)
        {
            bool ret = fbx_wrapperPINVOKE.FbxDouble2_ne(swigCPtr, FbxDouble2.getCPtr(pVector));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #2
0
        public FbxDouble3 assign(FbxDouble2 pVector)
        {
            FbxDouble3 ret = new FbxDouble3(FbxWrapperNativePINVOKE.FbxDouble3_assign__SWIG_1(swigCPtr, FbxDouble2.getCPtr(pVector)), false);

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #3
0
        public FbxDouble2 assign(FbxDouble2 pVector)
        {
            FbxDouble2 ret = new FbxDouble2(fbx_wrapperPINVOKE.FbxDouble2_assign__SWIG_1(swigCPtr, FbxDouble2.getCPtr(pVector)), false);

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Example #4
0
        public bool eq(FbxDouble2 pVector)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxDouble2_eq(swigCPtr, FbxDouble2.getCPtr(pVector));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public void BasicTests()
        {
            FbxVector2 v;

            // make sure the no-arg constructor doesn't crash
            new FbxVector2();

            // Test other constructors
            v = new FbxVector2(5);
            Assert.AreEqual(5, v.X);
            Assert.AreEqual(5, v.Y);

            v = new FbxVector2(1, 2);
            var u = new FbxVector2(v);

            Assert.AreEqual(v, u);
            u[0] = 5;
            Assert.AreEqual(5, u[0]);
            Assert.AreEqual(1, v[0]); // check that setting u doesn't set v
            Assert.AreEqual(1, v.X);
            Assert.AreEqual(2, v.Y);

            var d2 = new FbxDouble2(5, 6);

            v = new FbxVector2(d2);
            Assert.AreEqual(5, v.X);
            Assert.AreEqual(6, v.Y);

            // Test operator[]
            v    = new FbxVector2();
            v[0] = 1;
            Assert.AreEqual(1, v[0]);
            v[1] = 2;
            Assert.AreEqual(2, v[1]);
            Assert.That(() => v[-1], Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[2], Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[-1] = 5, Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[2]  = 5, Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());

            // Test that we can scale by a scalar.
            // This isn't covered below because this isn't legal in C++
            // (at least in FBX SDK 2017.1)
            u = 5 * v;
            Assert.AreEqual(5 * v.X, u.X);
            Assert.AreEqual(5 * v.Y, u.Y);
        }
Example #6
0
        public void TestBasics()
        {
            FbxDouble2 v;

            // make sure the no-arg constructor doesn't crash
            new FbxDouble2();

            // Test other constructors
            v = new FbxDouble2(1, 2);
            var u = new FbxDouble2(v);

            Assert.AreEqual(v, u);
            u[0] = 5;
            Assert.AreEqual(5, u[0]);
            Assert.AreEqual(1, v[0]); // check that setting u doesn't set v
            var w = new FbxDouble2(3);

            Assert.AreEqual(3, w[0]);
            Assert.AreEqual(3, w[1]);

            // Test operator[]
            v    = new FbxDouble2();
            v[0] = 1;
            Assert.AreEqual(1, v[0]);
            v[1] = 2;
            Assert.AreEqual(2, v[1]);
            Assert.That(() => v[-1], Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[2], Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[-1] = 5, Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());
            Assert.That(() => v[2]  = 5, Throws.Exception.TypeOf <System.ArgumentOutOfRangeException>());

            // Test 2-argument constructor and members X/Y
            v = new FbxDouble2(1, 2);
            Assert.AreEqual(1, v.X);
            Assert.AreEqual(2, v.Y);
            v.X = 3;
            v.Y = 4;
            Assert.AreEqual(3, v.X);
            Assert.AreEqual(4, v.Y);
        }
Example #7
0
        public FbxDouble2 ToDouble2()
        {
            FbxDouble2 ret = new FbxDouble2(FbxWrapperNativePINVOKE.FbxDouble3_ToDouble2(swigCPtr), false);

            return(ret);
        }
Example #8
0
 public FbxVector2(FbxDouble2 other)
 {
     this.X = other.X; this.Y = other.Y;
 }
Example #9
0
        public FbxDouble2 assign(double pValue)
        {
            FbxDouble2 ret = new FbxDouble2(fbx_wrapperPINVOKE.FbxDouble2_assign__SWIG_0(swigCPtr, pValue), false);

            return(ret);
        }
Example #10
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxDouble2 obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }