コード例 #1
0
 public void SetColor(FbxColor pColor)
 {
     FbxWrapperNativePINVOKE.FbxMediaClip_SetColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #2
0
 public void SetDefaultColor(FbxColor pColor)
 {
     fbx_wrapperPINVOKE.FbxMarker_SetDefaultColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #3
0
 public void SetLast(FbxColor pItem)
 {
     FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_SetLast(swigCPtr, FbxColor.getCPtr(pItem));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #4
0
 public void SetAt(int pIndex, FbxColor pItem)
 {
     NativeMethods.FbxLayerElementArray_SetAt__SWIG_2(swigCPtr, pIndex, pItem);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
コード例 #5
0
 public void SetColor(FbxColor value)
 {
     NativeMethods.FbxProperty_SetColor(swigCPtr, value);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
コード例 #6
0
 public void SetFogColor(FbxColor pColor)
 {
     fbx_wrapperPINVOKE.FbxGlobalLightSettings_SetFogColor(swigCPtr, FbxColor.getCPtr(pColor));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #7
0
 public void SetAmbientColor(FbxColor pAmbientColor)
 {
     NativeMethods.FbxGlobalSettings_SetAmbientColor(swigCPtr, pAmbientColor);
     if (NativeMethods.SWIGPendingException.Pending)
     {
         throw NativeMethods.SWIGPendingException.Retrieve();
     }
 }
コード例 #8
0
 public void SetAmbientColor(FbxColor pAmbientColor)
 {
     FbxWrapperNativePINVOKE.FbxGlobalSettings_SetAmbientColor(swigCPtr, FbxColor.getCPtr(pAmbientColor));
     if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
     {
         throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #9
0
 public void SetLast(FbxColor pItem)
 {
     fbx_wrapperPINVOKE.DirectArrayFbxColor_SetLast(swigCPtr, FbxColor.getCPtr(pItem));
     if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
     {
         throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #10
0
        public int Find(FbxColor pItem)
        {
            int ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_Find(swigCPtr, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #11
0
        public bool SetLimbNodeColor(FbxColor pColor)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxSkeleton_SetLimbNodeColor(swigCPtr, FbxColor.getCPtr(pColor));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #12
0
ファイル: FbxColor.cs プロジェクト: zwiglm/NeoAxisEngine
        public bool ne(FbxColor pColor)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxColor_ne(swigCPtr, FbxColor.getCPtr(pColor));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #13
0
ファイル: FbxColor.cs プロジェクト: zwiglm/NeoAxisEngine
        public FbxColor assign(FbxDouble4 pColor)
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxColor_assign__SWIG_2(swigCPtr, FbxDouble4.getCPtr(pColor)), false);

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #14
0
        public int Add(FbxColor pItem)
        {
            int ret = NativeMethods.FbxLayerElementArray_Add__SWIG_2(swigCPtr, pItem);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #15
0
        public bool eq(FbxColor pColor)
        {
            bool ret = fbx_wrapperPINVOKE.FbxColor_eq(swigCPtr, FbxColor.getCPtr(pColor));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #16
0
        public FbxColor assign(FbxDouble3 pColor)
        {
            FbxColor ret = new FbxColor(fbx_wrapperPINVOKE.FbxColor_assign__SWIG_1(swigCPtr, FbxDouble3.getCPtr(pColor)), false);

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #17
0
        public int InsertAt(int pIndex, FbxColor pItem)
        {
            int ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_InsertAt(swigCPtr, pIndex, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #18
0
        public bool Set(FbxColor pValue)
        {
            bool ret = NativeMethods.FbxProperty_Set__SWIG_1(swigCPtr, pValue);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #19
0
ファイル: FbxSkeleton.cs プロジェクト: mikeage/open-brush
        public bool SetLimbNodeColor(FbxColor pColor)
        {
            bool ret = NativeMethods.FbxSkeleton_SetLimbNodeColor(swigCPtr, pColor);

            if (NativeMethods.SWIGPendingException.Pending)
            {
                throw NativeMethods.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #20
0
        public bool RemoveIt(FbxColor pItem)
        {
            bool ret = fbx_wrapperPINVOKE.DirectArrayFbxColor_RemoveIt(swigCPtr, FbxColor.getCPtr(pItem));

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #21
0
        public int InsertAt(int pIndex, FbxColor pItem)
        {
            int ret = FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_InsertAt(swigCPtr, pIndex, FbxColor.getCPtr(pItem));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #22
0
        public bool RemoveIt(FbxColor pItem)
        {
            bool ret = FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_RemoveIt(swigCPtr, FbxColor.getCPtr(pItem));

            if (FbxWrapperNativePINVOKE.SWIGPendingException.Pending)
            {
                throw FbxWrapperNativePINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #23
0
        public FbxColor GetDefaultColor(FbxColor pColor)
        {
            FbxColor ret = new FbxColor(fbx_wrapperPINVOKE.FbxMarker_GetDefaultColor(swigCPtr, FbxColor.getCPtr(pColor)), false);

            if (fbx_wrapperPINVOKE.SWIGPendingException.Pending)
            {
                throw fbx_wrapperPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
コード例 #24
0
        public void TestBasics()
        {
            FbxColor c;

            c = new FbxColor(0.1, 0.2, 0.3, 0.5);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            c = new FbxColor(0.1, 0.2, 0.3);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(1.0, c.mAlpha);

            c = new FbxColor(new FbxDouble3(0.1, 0.2, 0.3), 0.5);
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            c = new FbxColor(new FbxDouble4(0.1, 0.2, 0.3, 0.5));
            Assert.AreEqual(0.1, c.mRed);
            Assert.AreEqual(0.2, c.mGreen);
            Assert.AreEqual(0.3, c.mBlue);
            Assert.AreEqual(0.5, c.mAlpha);

            Assert.IsTrue(c.IsValid());
            c.mRed   = -1;
            c.mGreen = 1e6;
            Assert.IsFalse(c.IsValid());

            c.Set(1, 2, 3, 5);
            Assert.AreEqual(1, c.mRed);
            Assert.AreEqual(2, c.mGreen);
            Assert.AreEqual(3, c.mBlue);
            Assert.AreEqual(5, c.mAlpha);
            Assert.AreEqual(1, c[0]);
            Assert.AreEqual(2, c[1]);
            Assert.AreEqual(3, c[2]);
            Assert.AreEqual(5, c[3]);
            Assert.IsFalse(c.IsValid());

            c[0] = 0.1;
            Assert.AreEqual(0.1, c[0]);
            c[1] = 0.2;
            Assert.AreEqual(0.2, c[1]);
            c[2] = 0.3;
            Assert.AreEqual(0.3, c[2]);
            c[3] = 0.5;
            Assert.AreEqual(0.5, c[3]);
        }
コード例 #25
0
            /// <summary>
            /// Export Component's color property
            /// </summary>
            FbxProperty ExportColorProperty(FbxObject fbxObject, Color value, string name, string label)
            {
                // create a custom property for component value
                var fbxProperty = FbxProperty.Create(fbxObject, Globals.FbxColor4DT, name, label);

                if (!fbxProperty.IsValid())
                {
                    throw new System.NullReferenceException();
                }

                FbxColor fbxColor = new FbxColor(value.r, value.g, value.b, value.a);

                fbxProperty.Set(fbxColor);

                // Must be marked user-defined or it won't be shown in most DCCs
                fbxProperty.ModifyFlag(FbxPropertyFlags.EFlags.eUserDefined, true);
                fbxProperty.ModifyFlag(FbxPropertyFlags.EFlags.eAnimatable, true);

                return(fbxProperty);
            }
コード例 #26
0
ファイル: ProcessMesh.cs プロジェクト: zwiglm/NeoAxisEngine
        static void ReadColor(MeshData data)
        {
            FbxLayerElementVertexColor pVertexColors = data.Mesh.GetElementVertexColor();

            if (pVertexColors == null)
            {
                for (int i = 0; i < data.Vertices.Length; i++)
                {
                    data.Vertices[i].Vertex.Color = new ColorValue(1, 1, 1);
                }
                return;
            }

            var mappingMode = pVertexColors.GetMappingMode();

            if (!CheckPolygonVertexOrControlPoint(mappingMode))
            {
                FbxImportLog.LogWarning(data.Node, $"has unsupported VertexColors mapping mode: {pVertexColors.GetMappingMode()}");
                return;
            }
            data.VertexComponents |= StandardVertex.Components.Color;
            var indexArray  = pVertexColors.GetReferenceMode() != FbxLayerElement.EReferenceMode.eDirect ? pVertexColors.GetIndexArray() : null;
            var directArray = pVertexColors.GetDirectArray();

            for (int i = 0; i < data.Vertices.Length; i++)
            {
                ref VertexInfo vertex = ref data.Vertices[i];
                FbxColor       color  = null;
                switch (pVertexColors.GetMappingMode())
                {
                case FbxLayerElement.EMappingMode.eByPolygonVertex:
                    color = directArray.GetAt(indexArray?.GetAt(vertex.PolygonVertexIndex) ?? vertex.PolygonVertexIndex);
                    break;

                case FbxLayerElement.EMappingMode.eByControlPoint:
                    color = directArray.GetAt(indexArray?.GetAt(vertex.ControlPointIndex) ?? vertex.ControlPointIndex);
                    break;
                }
                data.Vertices[i].Vertex.Color = color?.ToColorValue() ?? new ColorValue(1, 1, 1);
            }
コード例 #27
0
        public FbxColor GetAmbientColor()
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxGlobalSettings_GetAmbientColor(swigCPtr), true);

            return(ret);
        }
コード例 #28
0
        public FbxColor RemoveLast()
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_RemoveLast(swigCPtr), true);

            return(ret);
        }
コード例 #29
0
        public FbxColor at(int pIndex)
        {
            FbxColor ret = new FbxColor(FbxWrapperNativePINVOKE.FbxLayerElementArrayTemplateFbxColor_at(swigCPtr, pIndex), true);

            return(ret);
        }
コード例 #30
0
        internal static bool IsValidColor(FbxColor c)
        {
            bool ret = NativeMethods.IsValidColor(c);

            return(ret);
        }