/// <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); }
/// <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); }
/// <summary> /// 销毁meshdata /// </summary> /// <param name="meshData">销毁对象</param> /// <returns></returns> public void DestroyMeshData(ref EarthView.World.Spatial3D.DataExchange.MeshData meshData) { EarthView_World_Spatial3D_DataExchange_CMeshDataCreator_destroyMeshData_void_CMeshData(this.NativeObject, object.Equals(meshData, null) ? IntPtr.Zero : meshData.NativeObject); }