+++ /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
-#include "../math/Vector3.h"\r
-\r
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
- namespace Direct3D9\r
- {\r
- value class VertexElement;\r
- enum class VertexFormat;\r
- enum class Format;\r
-\r
- /// <summary>\r
- /// Contains miscellaneous constants and methods for use with D3DX.\r
- /// </summary>\r
- /// <unmanaged>None</unmanaged>\r
- public ref class D3DX sealed\r
- {\r
- private:\r
- D3DX() { }\r
-\r
- public:\r
- /// <summary>\r
- /// The value used to signify that the default value for a parameter should be used.\r
- /// </summary>\r
- /// <unmanaged>D3DX_DEFAULT</unmanaged>\r
- literal int Default = D3DX_DEFAULT;\r
-\r
- /// <summary>\r
- /// The default value for non power-of-two textures.\r
- /// </summary>\r
- /// <unmanaged>D3DX_DEFAULT_NONPOW2</unmanaged>\r
- literal int DefaultNonPowerOf2 = D3DX_DEFAULT_NONPOW2;\r
-\r
- /// <summary>\r
- /// Indicates that the method should load from file.\r
- /// </summary>\r
- /// <unmanaged>D3DX_FROM_FILE</unmanaged>\r
- literal int FromFile = D3DX_FROM_FILE;\r
-\r
- /// <summary>\r
- /// Indicates that the method should format from file.\r
- /// </summary>\r
- /// <unmanaged>D3DFMT_FROM_FILE</unmanaged>\r
- literal int FormatFromFile = D3DFMT_FROM_FILE;\r
-\r
- /// <summary>\r
- /// \r
- /// </summary>\r
- /// <unmanaged>D3DXGetDeclVertexSize</unmanaged>\r
- static int GetDeclarationVertexSize( array<VertexElement>^ elements, int stream );\r
-\r
- /// <unmanaged>D3DXGetFVFVertexSize</unmanaged>\r
- static int GetFVFVertexSize( VertexFormat fvf );\r
-\r
- /// <summary>\r
- /// Retrieves a declarator from a Flexible Vertex Format (FVF) code.\r
- /// </summary>\r
- /// <unmanaged>D3DXDeclaratorFromFVF</unmanaged>\r
- static array<VertexElement>^ DeclaratorFromFVF( VertexFormat fvf );\r
-\r
- /// <summary>\r
- /// Retrieves a Flexible Vertex Format (FVF) code from a declarator.\r
- /// </summary>\r
- /// <unmanaged>D3DXFVFFromDeclarator</unmanaged>\r
- static VertexFormat FVFFromDeclarator( array<VertexElement>^ declarator );\r
-\r
- /// <summary>\r
- /// Generates an output vertex declaration from the input declaration.\r
- /// The output declaration is intended for use by the mesh tessellation functions.\r
- /// </summary>\r
- /// <unmanaged>D3DXGenerateOutputDecl</unmanaged>\r
- static array<VertexElement>^ GenerateOutputDeclaration( array<VertexElement>^ declaration );\r
-\r
- /// <summary>Returns the number of elements in the vertex declaration.</summary>\r
- /// <unmanaged>D3DXGetDeclLength</unmanaged>\r
- static int GetDeclarationLength( array<VertexElement>^ declaration );\r
-\r
- /// <summary>Gets the size of the rectangle patch.</summary>\r
- /// <unmanaged>D3DXRectPatchSize</unmanaged>\r
- static Result GetRectanglePatchSize( float segmentCount, [Out] int% triangleCount, [Out] int% vertexCount );\r
-\r
- /// <summary>Gets the size of the triangle patch.</summary>\r
- /// <unmanaged>D3DXTriPatchSize</unmanaged>\r
- static Result GetTrianglePatchSize( float segmentCount, [Out] int% triangleCount, [Out] int% vertexCount );\r
-\r
- /// <summary>Generates a FOURCC Format code from the provided bytes.</summary>\r
- /// <unmanaged>MAKEFOURCC</unmanaged>\r
- static Format MakeFourCC( System::Byte c1, System::Byte c2, System::Byte c3, System::Byte c4 );\r
-\r
- /// <summary>Turns on or off all D3DX debug output.</summary>\r
- /// <unmanaged>D3DXDebugMute</unmanaged>\r
- static bool DebugMute( bool mute );\r
-\r
- /// <summary>Generates an optimized face remapping for a triangle list.</summary>\r
- /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
- static array<int>^ OptimizeFaces( array<int>^ indices, int faceCount, int vertexCount );\r
-\r
- /// <summary>Generates an optimized face remapping for a triangle list.</summary>\r
- /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
- static array<int>^ OptimizeFaces( array<System::Int16>^ indices, int faceCount, int vertexCount );\r
-\r
- /// <summary>Generates an optimized vertex remapping for a triangle list. </summary>\r
- /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
- static array<int>^ OptimizeVertices( array<int>^ indices, int faceCount, int vertexCount );\r
-\r
- /// <summary>Generates an optimized vertex remapping for a triangle list. </summary>\r
- /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
- static array<int>^ OptimizeVertices( array<System::Int16>^ indices, int faceCount, int vertexCount );\r
-\r
- /// <summary>\r
- /// Verifies that the compiled version of D3DX matches the runtime version of D3DX.\r
- /// </summary>\r
- /// <returns><c>true</c> if the versions match; otherwise, <c>false</c>.</returns>\r
- /// <unmanaged>D3DXCheckVersion</unmanaged>\r
- static bool CheckVersion();\r
-\r
- /// <unmanaged>D3DXFresnelTerm</unmanaged>\r
- static float FresnelTerm( float cosTheta, float refractionIndex );\r
-\r
- static array<Vector3>^ GetVectors( DataStream^ stream, int vertexCount, VertexFormat format );\r
-\r
- static array<Vector3>^ GetVectors( DataStream^ stream, int vertexCount, int stride );\r
- };\r
- }\r
-}\r