コード例 #1
0
                    /// <summary>
                    /// 创建meshdata
                    /// </summary>
                    /// <param name="modelMetaData">模型源数据</param>
                    /// <returns>返回meshdata</returns>
                    public EarthView.World.Spatial3D.DataExchange.MeshData CreateMeshData(EarthView.World.Spatial3D.DataExchange.EntityMetaData modelMetaData)
                    {
                        IntPtr __ptr = EarthView_World_Spatial3D_DataExchange_CMeshDataCreator_createMeshData_CMeshData_CEntityMetaData(this.NativeObject, object.Equals(modelMetaData, null) ? IntPtr.Zero : modelMetaData.NativeObject);

                        if (__ptr == IntPtr.Zero)
                        {
                            return(null);
                        }
                        EarthView.World.Spatial3D.DataExchange.MeshData csObj = new EarthView.World.Spatial3D.DataExchange.MeshData(CreatedWhenConstruct.CWC_NotToCreate);
                        csObj.BindNativeObject(__ptr, "CMeshData");
                        IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                        if (csObjClassFactory != null)
                        {
                            csObj.Delegate = true;
                            csObj          = csObjClassFactory.Create() as EarthView.World.Spatial3D.DataExchange.MeshData;
                            csObj.BindNativeObject(__ptr, "CMeshData");
                        }
                        return(csObj);
                    }
コード例 #2
0
                    /// <summary>
                    /// 创建meshdata
                    /// </summary>
                    /// <param name="modelcomponet">自定义模型组件</param>
                    /// <returns>返回meshdata</returns>
                    //CMeshData createMeshData(const CModelComponent& modelcomponet);
                    /// <summary>
                    /// 创建meshdata
                    /// </summary>
                    /// <param name="meshPath">本地的.mesh文件</param>
                    /// <returns>返回meshdata</returns>
                    public EarthView.World.Spatial3D.DataExchange.MeshData CreateMeshData(string meshPath)
                    {
                        IntPtr __ptr = EarthView_World_Spatial3D_DataExchange_CMeshDataCreator_createMeshData_CMeshData_EVString(this.NativeObject, meshPath);

                        if (__ptr == IntPtr.Zero)
                        {
                            return(null);
                        }
                        EarthView.World.Spatial3D.DataExchange.MeshData csObj = new EarthView.World.Spatial3D.DataExchange.MeshData(CreatedWhenConstruct.CWC_NotToCreate);
                        csObj.BindNativeObject(__ptr, "CMeshData");
                        IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                        if (csObjClassFactory != null)
                        {
                            csObj.Delegate = true;
                            csObj          = csObjClassFactory.Create() as EarthView.World.Spatial3D.DataExchange.MeshData;
                            csObj.BindNativeObject(__ptr, "CMeshData");
                        }
                        return(csObj);
                    }