+++ /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
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
- namespace Direct3D9\r
- {\r
- ref class BaseMesh;\r
- ref class Mesh;\r
- ref class VertexBuffer;\r
- ref class IndexBuffer;\r
-\r
- ref class StreamShim : System::Runtime::InteropServices::ComTypes::IStream\r
- {\r
- private:\r
- System::IO::Stream^ m_WrappedStream;\r
-\r
- long long position;\r
- void SetSizeToPosition();\r
-\r
- public:\r
- StreamShim( System::IO::Stream^ stream );\r
-\r
- virtual void Clone( [Out] System::Runtime::InteropServices::ComTypes::IStream^% ppstm );\r
- virtual void Commit( int grfCommitFlags );\r
- virtual void CopyTo( System::Runtime::InteropServices::ComTypes::IStream^ pstm, long long cb, System::IntPtr pcbRead, System::IntPtr pcbWritten );\r
- virtual void LockRegion( long long libOffset, long long cb, int dwLockType );\r
- virtual void Read( [Out] array<unsigned char>^ pv, int cb, System::IntPtr pcbRead );\r
- virtual void Revert();\r
- virtual void Seek( long long dlibMove, int dwOrigin, System::IntPtr plibNewPosition );\r
- virtual void SetSize( long long libNewSize );\r
- virtual void Stat( [Out] System::Runtime::InteropServices::ComTypes::STATSTG% pstatstg, int grfStatFlag );\r
- virtual void UnlockRegion( long long libOffset, long long cb, int dwLockType );\r
- virtual void Write( array<unsigned char>^ pv, int cb, System::IntPtr pcbWritten );\r
- };\r
-\r
- public ref class ProgressiveMesh : public BaseMesh\r
- {\r
- COMOBJECT(ID3DXPMesh, ProgressiveMesh);\r
-\r
- private:\r
- array<ExtendedMaterial>^ materials;\r
- array<EffectInstance>^ effects;\r
-\r
- public:\r
- ProgressiveMesh( Mesh^ mesh, array<AttributeWeights>^ attributeWeights, array<float>^ vertexWeights, int minimumValue, MeshSimplification options );\r
- ProgressiveMesh( Mesh^ mesh, array<AttributeWeights>^ attributeWeights, int minimumValue, MeshSimplification options );\r
- ProgressiveMesh( Mesh^ mesh, int minimumValue, MeshSimplification options );\r
- virtual ~ProgressiveMesh() { }\r
-\r
- static ProgressiveMesh^ FromStream( SlimDX::Direct3D9::Device^ device, System::IO::Stream^ stream, MeshFlags flags );\r
- static Result ToStream( ProgressiveMesh^ mesh, System::IO::Stream^ stream );\r
-\r
- ProgressiveMesh^ CloneProgressive( SlimDX::Direct3D9::Device^ device, MeshFlags flags, array<VertexElement>^ vertexDeclaration );\r
- ProgressiveMesh^ CloneProgressive( SlimDX::Direct3D9::Device^ device, MeshFlags flags, SlimDX::Direct3D9::VertexFormat format );\r
-\r
- Result GenerateVertexHistory( array<int>^ vertexHistory );\r
- array<int>^ GetAdjacency();\r
- \r
- Mesh^ Optimize( MeshOptimizeFlags flags );\r
- Mesh^ Optimize( MeshOptimizeFlags flags, [Out] array<int>^% faceRemap, [Out] array<int>^% vertexRemap );\r
-\r
- Result OptimizeBaseLevelOfDetail( MeshOptimizeFlags flags );\r
- Result OptimizeBaseLevelOfDetail( MeshOptimizeFlags flags, [Out] array<int>^% faceRemap );\r
-\r
- Result SetFaceCount( int faceCount );\r
- Result SetVertexCount( int vertexCount );\r
-\r
- Result TrimFaces( int newFaceMinimum, int newFaceMaximum );\r
- Result TrimFaces( int newFaceMinimum, int newFaceMaximum, [Out] array<int>^% faceRemap, [Out] array<int>^% vertexRemap );\r
- Result TrimVertices( int newVertexMinimum, int newVertexMaximum );\r
- Result TrimVertices( int newVertexMinimum, int newVertexMaximum, [Out] array<int>^% faceRemap, [Out] array<int>^% vertexRemap );\r
-\r
- array<ExtendedMaterial>^ GetMaterials() { return materials; }\r
- void SetMaterials( array<ExtendedMaterial>^ value ) { materials = value; }\r
-\r
- array<EffectInstance>^ GetEffects() { return effects; }\r
- void SetEffects( array<EffectInstance>^ value ) { effects = value; }\r
-\r
- property int MaximumFaceCount { int get(); }\r
- property int MaximumVertexCount { int get(); }\r
- property int MinimumFaceCount { int get(); }\r
- property int MinimumVertexCount { int get(); }\r
- };\r
- }\r
-}
\ No newline at end of file