Exemple #1
0
        public new static FbxShape Create(FbxManager pManager, string pName)
        {
            global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxShape_Create__SWIG_0(FbxManager.getCPtr(pManager), pName);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
        public FbxShape GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex)
        {
            global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxGeometry_GetShape__SWIG_1(swigCPtr, pBlendShapeIndex, pBlendShapeChannelIndex, pShapeIndex);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
        public FbxShape RemoveTargetShape(FbxShape pShape)
        {
            global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_RemoveTargetShape(swigCPtr, FbxShape.getCPtr(pShape));
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
        public FbxShape GetTargetShape(int pIndex)
        {
            global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_GetTargetShape__SWIG_0(swigCPtr, pIndex);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
Exemple #5
0
        public FbxShape GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus pStatus)
        {
            global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxGeometry_GetShape__SWIG_0(swigCPtr, pBlendShapeIndex, pBlendShapeChannelIndex, pShapeIndex, FbxStatus.getCPtr(pStatus));
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
Exemple #6
0
        public new static FbxShape Create(FbxObject pContainer, string pName)
        {
            global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxShape_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            return(ret);
        }
Exemple #7
0
 public bool Equals(FbxShape other)
 {
     if (object.ReferenceEquals(other, null))
     {
         return(false);
     }
     return(this.swigCPtr.Handle.Equals(other.swigCPtr.Handle));
 }
        public bool AddTargetShape(FbxShape pShape)
        {
            bool ret = NativeMethods.FbxBlendShapeChannel_AddTargetShape__SWIG_1(swigCPtr, FbxShape.getCPtr(pShape));

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public int GetTargetShapeIndex(FbxShape pShape)
        {
            int ret = NativeMethods.FbxBlendShapeChannel_GetTargetShapeIndex(swigCPtr, FbxShape.getCPtr(pShape));

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public FbxShape RemoveTargetShape(FbxShape pShape)
        {
            global::System.IntPtr cPtr = NativeMethods.FbxBlendShapeChannel_RemoveTargetShape(swigCPtr, FbxShape.getCPtr(pShape));
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #11
0
        public new static FbxShape Create(FbxObject pContainer, string pName)
        {
            global::System.IntPtr cPtr = NativeMethods.FbxShape_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public FbxShape GetTargetShape(int pIndex)
        {
            global::System.IntPtr cPtr = NativeMethods.FbxBlendShapeChannel_GetTargetShape(swigCPtr, pIndex);
            FbxShape ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxShape(cPtr, false);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public void TestBasics()
        {
            using (var blendShapeChannel = CreateObject()) {
                int origCount = blendShapeChannel.GetTargetShapeCount();

                FbxShape shape = FbxShape.Create(Manager, "shape");
                Assert.IsTrue(blendShapeChannel.AddTargetShape(shape));

                Assert.AreEqual(origCount + 1, blendShapeChannel.GetTargetShapeCount());
                Assert.AreEqual(shape, blendShapeChannel.GetTargetShape(origCount));
                Assert.AreEqual(origCount, blendShapeChannel.GetTargetShapeIndex(shape));

                // test RemoveTargetShape
                Assert.AreEqual(shape, blendShapeChannel.RemoveTargetShape(shape));
                Assert.IsNull(blendShapeChannel.GetTargetShape(origCount));

                // test AddTargetShape with double doesn't crash
                blendShapeChannel.AddTargetShape(shape, 45);

                // test null
                Assert.That(() => { blendShapeChannel.AddTargetShape(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>());
                Assert.That(() => { blendShapeChannel.RemoveTargetShape(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>());

                // test destroyed
                shape.Destroy();
                Assert.That(() => { blendShapeChannel.AddTargetShape(shape); }, Throws.Exception.TypeOf <System.ArgumentNullException>());
                Assert.That(() => { blendShapeChannel.RemoveTargetShape(shape); }, Throws.Exception.TypeOf <System.ArgumentNullException>());

                // test GetDeformPercent
                TestGetter(blendShapeChannel.DeformPercent);

                // test SetBlendShapeDeformer()
                FbxBlendShape blendShape = FbxBlendShape.Create(Manager, "blendShape");
                Assert.IsTrue(blendShapeChannel.SetBlendShapeDeformer(blendShape));
                Assert.AreEqual(blendShape, blendShapeChannel.GetBlendShapeDeformer());

                // test null
                Assert.That(() => { blendShapeChannel.SetBlendShapeDeformer(null); }, Throws.Exception.TypeOf <System.ArgumentNullException>());

                // test destroyed
                blendShape = FbxBlendShape.Create(Manager, "blendShape2");
                blendShape.Destroy();
                Assert.That(() => { blendShapeChannel.SetBlendShapeDeformer(blendShape); }, Throws.Exception.TypeOf <System.ArgumentNullException>());
            }
        }
        public int GetTargetShapeIndex(FbxShape pShape)
        {
            int ret = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_GetTargetShapeIndex(swigCPtr, FbxShape.getCPtr(pShape));

            return(ret);
        }
        public bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape pShape, double pPercent, FbxStatus pStatus)
        {
            bool ret = fbx_wrapperPINVOKE.FbxGeometry_AddShape__SWIG_0(swigCPtr, pBlendShapeIndex, pBlendShapeChannelIndex, FbxShape.getCPtr(pShape), pPercent, FbxStatus.getCPtr(pStatus));

            return(ret);
        }
        public bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape pShape)
        {
            bool ret = fbx_wrapperPINVOKE.FbxGeometry_AddShape__SWIG_2(swigCPtr, pBlendShapeIndex, pBlendShapeChannelIndex, FbxShape.getCPtr(pShape));

            return(ret);
        }
        public bool AddTargetShape(FbxShape pShape)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_AddTargetShape__SWIG_1(swigCPtr, FbxShape.getCPtr(pShape));

            return(ret);
        }
Exemple #18
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FbxShape obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
        public bool AddTargetShape(FbxShape pShape, double pFullDeformPercent)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxBlendShapeChannel_AddTargetShape__SWIG_0(swigCPtr, FbxShape.getCPtr(pShape), pFullDeformPercent);

            return(ret);
        }
Exemple #20
0
        public bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape pShape, double pPercent)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxGeometry_AddShape__SWIG_1(swigCPtr, pBlendShapeIndex, pBlendShapeChannelIndex, FbxShape.getCPtr(pShape), pPercent);

            return(ret);
        }