Inheritance: IDisposable
Example #1
0
        public bool op_not_equal(aiVertexWeight rhs)
        {
            bool ret = assimp_swigPINVOKE.aiVertexWeight_op_not_equal(swigCPtr, aiVertexWeight.getCPtr(rhs));

            if (assimp_swigPINVOKE.SWIGPendingException.Pending)
            {
                throw assimp_swigPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        private NodeContent extractNo(aiNode node)
        {
            NodeContent nodeContent = new NodeContent();

            nodeContent.Name      = node.mName.Data;
            nodeContent.Transform = tomatrix(node.mTransformation);
            ainodetocontent.Add(node.mName.Data, nodeContent);

            wbone.Clear();
            for (int i = 0; i < node.mNumMeshes; i++)
            {
                for (int j = 0; j < scene.mMeshes[(int)node.mMeshes[i]].mNumBones; j++)
                {
                    aiBone b = scene.mMeshes[(int)node.mMeshes[i]].mBones[j];
                    for (int w = 0; w < b.mNumWeights; w++)
                    {
                        aiVertexWeight vw = b.GetmWeights()[w];
                        if (!wbone.ContainsKey((int)vw.mVertexId))
                        {
                            wbone[(int)vw.mVertexId] = new List <KeyValuePair <string, float> >();
                        }
                        wbone[(int)vw.mVertexId].Add(new KeyValuePair <string, float>(b.mName.Data, vw.mWeight));
                    }
                    bones.Add(b);
                }

                log("model " + node.mMeshes[i].ToString());
                MeshContent MeshContent = ExtractMesh(scene.mMeshes[(int)node.mMeshes[i]]);
                MeshHelper.SwapWindingOrder(MeshContent);
                MeshHelper.OptimizeForCache(MeshContent);
                nodeContent.Children.Add(MeshContent);
            }

            foreach (var item in node.mChildren)
            {
                nodeContent.Children.Add(extractNo(item));
            }
            return(nodeContent);
        }
Example #3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(aiVertexWeight obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Example #4
0
 internal static HandleRef getCPtr(aiVertexWeight obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Example #5
0
 internal static HandleRef getCPtr(aiVertexWeight obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }