+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-namespace SlimDX\r
-{\r
- namespace Direct3D9\r
- {\r
- ref class MeshContainer;\r
- ref class Frame;\r
- ref class MeshData;\r
-\r
- /// <summary>\r
- /// Defines an interface for allocating and freeing frame and mesh container objects. Methods on this interface are called during\r
- /// loading and destroying of frame hierarchies.\r
- /// </summary>\r
- /// <unmanaged>ID3DXAllocateHierarchy</unmanaged>\r
- public interface struct IAllocateHierarchy\r
- {\r
- /// <summary>\r
- /// Requests the allocation of a mesh container object.\r
- /// </summary>\r
- /// <param name="name">Name of the mesh.</param>\r
- /// <param name="meshData">The actual mesh data.</param>\r
- /// <param name="materials">Set of materials used in the mesh.</param>\r
- /// <param name="effectInstances">Set of effects used in the mesh.</param>\r
- /// <param name="adjacency">Adjancey array used in the mesh.</param>\r
- /// <param name="skinInfo">Skin mesh object containing skin data.</param>\r
- /// <returns>The created mesh container.</returns>\r
- virtual MeshContainer^ CreateMeshContainer( System::String^ name, MeshData^ meshData, array<ExtendedMaterial>^ materials, array<EffectInstance>^ effectInstances, array<int>^ adjacency, SkinInfo^ skinInfo ) = 0;\r
- \r
- /// <summary>\r
- /// Requests the allocation of a frame object.\r
- /// </summary>\r
- /// <param name="name">Name of the frame to be created.</param>\r
- /// <returns>The created frame object.</returns>\r
- virtual Frame^ CreateFrame( System::String^ name ) = 0;\r
- \r
- /// <summary>\r
- /// Requests deallocation of a frame object.\r
- /// </summary>\r
- /// <param name="frame">The frame to be deallocated.</param>\r
- virtual void DestroyFrame( Frame^ frame ) = 0;\r
- \r
- /// <summary>\r
- /// Requests deallocation of a mesh container object.\r
- /// </summary>\r
- /// <param name="container">The mesh container to be deallocated.</param>\r
- virtual void DestroyMeshContainer( MeshContainer^ container ) = 0;\r
- };\r
-\r
- class IAllocateHierarchyShim : public ID3DXAllocateHierarchy\r
- {\r
- private:\r
- gcroot<IAllocateHierarchy^> m_WrappedInterface;\r
-\r
- public:\r
- IAllocateHierarchyShim( IAllocateHierarchy^ wrappedInterface );\r
-\r
- HRESULT WINAPI CreateFrame( LPCSTR Name, LPD3DXFRAME *ppNewFrame );\r
- HRESULT WINAPI CreateMeshContainer( LPCSTR Name, const D3DXMESHDATA *pMeshData, const D3DXMATERIAL *pMaterials, const D3DXEFFECTINSTANCE *pEffectInstances, DWORD NumMaterials, const DWORD *pAdjacency, LPD3DXSKININFO pSkinInfo, LPD3DXMESHCONTAINER *ppNewMeshContainer );\r
- HRESULT WINAPI DestroyFrame( LPD3DXFRAME pFrameToFree );\r
- HRESULT WINAPI DestroyMeshContainer( LPD3DXMESHCONTAINER pMeshContainerToFree );\r
- };\r
- }\r
-}
\ No newline at end of file