示例#1
0
        /// <summary>	
        /// <p>Add child data to the mesh.</p>	
        /// </summary>	
        /// <param name="meshContainerRef"><dd>  <p>Pointer to a mesh container. See <strong><see cref="SharpDX.Direct3D9.MeshContainer"/></strong>.</p> </dd></param>	
        /// <param name="xofSaveRef"><dd>  <p>Pointer to a .x file save object. Use the reference to call <strong><see cref="SharpDX.Direct3D9.XFileSaveObject.AddDataObject"/></strong> to add a child data object. Do not save the data with <strong><see cref="SharpDX.Direct3D9.XFileSaveObject.Save"/></strong>.</p> </dd></param>	
        /// <param name="xofMeshDataRef"><dd>  <p>Pointer to a .x file data node. Use the reference to call <strong><see cref="SharpDX.Direct3D9.XFileSaveData.AddDataObject"/></strong> to add a child data object.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message from D3DERR or <strong>D3DXERR</strong>, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXSaveUserData::AddMeshChildData']/*"/>	
        /// <msdn-id>bb174201</msdn-id>	
        /// <unmanaged>HRESULT ID3DXSaveUserData::AddMeshChildData([In] const D3DXMESHCONTAINER* pMeshContainer,[In] ID3DXFileSaveObject* pXofSave,[In] ID3DXFileSaveData* pXofMeshData)</unmanaged>	
        /// <unmanaged-short>ID3DXSaveUserData::AddMeshChildData</unmanaged-short>	
        public void AddMeshChildData(SharpDX.Direct3D9.MeshContainer meshContainerRef, SharpDX.Direct3D9.XFileSaveObject xofSaveRef, SharpDX.Direct3D9.XFileSaveData xofMeshDataRef) {
            unsafe {
                var meshContainerRef_ = new SharpDX.Direct3D9.MeshContainer.__Native();
                meshContainerRef.__MarshalTo(ref meshContainerRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, &meshContainerRef_, (void*)((xofSaveRef == null)?IntPtr.Zero:xofSaveRef.NativePointer), (void*)((xofMeshDataRef == null)?IntPtr.Zero:xofMeshDataRef.NativePointer),((void**)(*(void**)_nativePointer))[1]);		
                meshContainerRef.__MarshalFree(ref meshContainerRef_);
                __result__.CheckError();
            }
        }
示例#2
0
        /// <summary>	
        /// <p>Requests allocation of a mesh container object.</p>	
        /// </summary>	
        /// <param name="name"><dd>  <p>Name of the mesh.</p> </dd></param>	
        /// <param name="meshDataRef"><dd>  <p>Pointer to the mesh data structure. See <strong><see cref="SharpDX.Direct3D9.MeshData"/></strong>.</p> </dd></param>	
        /// <param name="materialsRef"><dd>  <p>Array of materials used in the mesh.</p> </dd></param>	
        /// <param name="effectInstancesRef"><dd>  <p>Array of effect instances used in the mesh. See <strong><see cref="SharpDX.Direct3D9.EffectInstance"/></strong>.</p> </dd></param>	
        /// <param name="numMaterials"><dd>  <p>Number of materials in the materials array.</p> </dd></param>	
        /// <param name="adjacencyRef"><dd>  <p>Adjacency array for the mesh.</p> </dd></param>	
        /// <param name="skinInfoRef"><dd>  <p>Pointer to the skin mesh object if skin data is found. See <strong><see cref="SharpDX.Direct3D9.SkinInfo"/></strong>.</p> </dd></param>	
        /// <param name="newMeshContainerOut"><dd>  <p>Returns the created mesh container. See <strong><see cref="SharpDX.Direct3D9.MeshContainer"/></strong>.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message  from D3DERR or D3DXERR, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXAllocateHierarchy::CreateMeshContainer']/*"/>	
        /// <msdn-id>bb205621</msdn-id>	
        /// <unmanaged>HRESULT ID3DXAllocateHierarchy::CreateMeshContainer([In] const char* Name,[In] const D3DXMESHDATA* pMeshData,[In] const D3DXMATERIAL* pMaterials,[In] const D3DXEFFECTINSTANCE* pEffectInstances,[In] unsigned int NumMaterials,[In] const unsigned int* pAdjacency,[In] ID3DXSkinInfo* pSkinInfo,[In] D3DXMESHCONTAINER** ppNewMeshContainer)</unmanaged>	
        /// <unmanaged-short>ID3DXAllocateHierarchy::CreateMeshContainer</unmanaged-short>	
        public void CreateMeshContainer(string name, SharpDX.Direct3D9.MeshData meshDataRef, ref SharpDX.Direct3D9.ExtendedMaterial materialsRef, SharpDX.Direct3D9.EffectInstance effectInstancesRef, int numMaterials, int adjacencyRef, SharpDX.Direct3D9.SkinInfo skinInfoRef, SharpDX.Direct3D9.MeshContainer newMeshContainerOut) {
            unsafe {
                IntPtr name_ = Utilities.StringToHGlobalAnsi(name);
                var materialsRef_ = new SharpDX.Direct3D9.ExtendedMaterial.__Native();
                materialsRef.__MarshalTo(ref materialsRef_);
                var effectInstancesRef_ = new SharpDX.Direct3D9.EffectInstance.__Native();
                effectInstancesRef.__MarshalTo(ref effectInstancesRef_);
                var newMeshContainerOut_ = new SharpDX.Direct3D9.MeshContainer.__Native();
                newMeshContainerOut.__MarshalTo(ref newMeshContainerOut_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)name_, &meshDataRef, &materialsRef_, &effectInstancesRef_, numMaterials, &adjacencyRef, (void*)((skinInfoRef == null)?IntPtr.Zero:skinInfoRef.NativePointer), &newMeshContainerOut_,((void**)(*(void**)_nativePointer))[1]);		
                Marshal.FreeHGlobal(name_ );
                materialsRef.__MarshalFree(ref materialsRef_);
                effectInstancesRef.__MarshalFree(ref effectInstancesRef_);
                newMeshContainerOut.__MarshalFree(ref newMeshContainerOut_);
                __result__.CheckError();
            }
        }
示例#3
0
        /// <summary>	
        /// <p>Requests deallocation of a mesh container object.</p>	
        /// </summary>	
        /// <param name="meshContainerToFreeRef"><dd>  <p>Pointer to the mesh container object to be deallocated.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message  from D3DERR or D3DXERR, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXAllocateHierarchy::DestroyMeshContainer']/*"/>	
        /// <msdn-id>bb205623</msdn-id>	
        /// <unmanaged>HRESULT ID3DXAllocateHierarchy::DestroyMeshContainer([In] D3DXMESHCONTAINER* pMeshContainerToFree)</unmanaged>	
        /// <unmanaged-short>ID3DXAllocateHierarchy::DestroyMeshContainer</unmanaged-short>	
        public void DestroyMeshContainer(SharpDX.Direct3D9.MeshContainer meshContainerToFreeRef) {
            unsafe {
                var meshContainerToFreeRef_ = new SharpDX.Direct3D9.MeshContainer.__Native();
                meshContainerToFreeRef.__MarshalTo(ref meshContainerToFreeRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, &meshContainerToFreeRef_,((void**)(*(void**)_nativePointer))[3]);		
                meshContainerToFreeRef.__MarshalFree(ref meshContainerToFreeRef_);
                __result__.CheckError();
            }
        }