OSDN Git Service

フォーラム[#56172] SlimDX(改)のフォルダ内容が不完全だったので再UP。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d9 / D3DX.h
1 /*\r
2 * Copyright (c) 2007-2010 SlimDX Group\r
3\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy\r
5 * of this software and associated documentation files (the "Software"), to deal\r
6 * in the Software without restriction, including without limitation the rights\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
8 * copies of the Software, and to permit persons to whom the Software is\r
9 * furnished to do so, subject to the following conditions:\r
10\r
11 * The above copyright notice and this permission notice shall be included in\r
12 * all copies or substantial portions of the Software.\r
13\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 #include "../math/Vector3.h"\r
25 \r
26 using System::Runtime::InteropServices::OutAttribute;\r
27 \r
28 namespace SlimDX\r
29 {\r
30         namespace Direct3D9\r
31         {\r
32                 value class VertexElement;\r
33                 enum class VertexFormat;\r
34                 enum class Format;\r
35 \r
36                 /// <summary>\r
37                 /// Contains miscellaneous constants and methods for use with D3DX.\r
38                 /// </summary>\r
39                 /// <unmanaged>None</unmanaged>\r
40                 public ref class D3DX sealed\r
41                 {\r
42                 private:\r
43                         D3DX() { }\r
44 \r
45                 public:\r
46                         /// <summary>\r
47                         /// The value used to signify that the default value for a parameter should be used.\r
48                         /// </summary>\r
49                         /// <unmanaged>D3DX_DEFAULT</unmanaged>\r
50                         literal int Default = D3DX_DEFAULT;\r
51 \r
52                         /// <summary>\r
53                         /// The default value for non power-of-two textures.\r
54                         /// </summary>\r
55                         /// <unmanaged>D3DX_DEFAULT_NONPOW2</unmanaged>\r
56                         literal int DefaultNonPowerOf2 = D3DX_DEFAULT_NONPOW2;\r
57 \r
58                         /// <summary>\r
59                         /// Indicates that the method should load from file.\r
60                         /// </summary>\r
61                         /// <unmanaged>D3DX_FROM_FILE</unmanaged>\r
62                         literal int FromFile = D3DX_FROM_FILE;\r
63 \r
64                         /// <summary>\r
65                         /// Indicates that the method should format from file.\r
66                         /// </summary>\r
67                         /// <unmanaged>D3DFMT_FROM_FILE</unmanaged>\r
68                         literal int FormatFromFile = D3DFMT_FROM_FILE;\r
69 \r
70                         /// <summary>\r
71                         /// \r
72                         /// </summary>\r
73                         /// <unmanaged>D3DXGetDeclVertexSize</unmanaged>\r
74                         static int GetDeclarationVertexSize( array<VertexElement>^ elements, int stream );\r
75 \r
76                         /// <unmanaged>D3DXGetFVFVertexSize</unmanaged>\r
77                         static int GetFVFVertexSize( VertexFormat fvf );\r
78 \r
79                         /// <summary>\r
80                         /// Retrieves a declarator from a Flexible Vertex Format (FVF) code.\r
81                         /// </summary>\r
82                         /// <unmanaged>D3DXDeclaratorFromFVF</unmanaged>\r
83                         static array<VertexElement>^ DeclaratorFromFVF( VertexFormat fvf );\r
84 \r
85                         /// <summary>\r
86                         /// Retrieves a Flexible Vertex Format (FVF) code from a declarator.\r
87                         /// </summary>\r
88                         /// <unmanaged>D3DXFVFFromDeclarator</unmanaged>\r
89                         static VertexFormat FVFFromDeclarator( array<VertexElement>^ declarator );\r
90 \r
91                         /// <summary>\r
92                         /// Generates an output vertex declaration from the input declaration.\r
93                         /// The output declaration is intended for use by the mesh tessellation functions.\r
94                         /// </summary>\r
95                         /// <unmanaged>D3DXGenerateOutputDecl</unmanaged>\r
96                         static array<VertexElement>^ GenerateOutputDeclaration( array<VertexElement>^ declaration );\r
97 \r
98                         /// <summary>Returns the number of elements in the vertex declaration.</summary>\r
99                         /// <unmanaged>D3DXGetDeclLength</unmanaged>\r
100                         static int GetDeclarationLength( array<VertexElement>^ declaration );\r
101 \r
102                         /// <summary>Gets the size of the rectangle patch.</summary>\r
103                         /// <unmanaged>D3DXRectPatchSize</unmanaged>\r
104                         static Result GetRectanglePatchSize( float segmentCount, [Out] int% triangleCount, [Out] int% vertexCount );\r
105 \r
106                         /// <summary>Gets the size of the triangle patch.</summary>\r
107                         /// <unmanaged>D3DXTriPatchSize</unmanaged>\r
108                         static Result GetTrianglePatchSize( float segmentCount, [Out] int% triangleCount, [Out] int% vertexCount );\r
109 \r
110                         /// <summary>Generates a FOURCC Format code from the provided bytes.</summary>\r
111                         /// <unmanaged>MAKEFOURCC</unmanaged>\r
112                         static Format MakeFourCC( System::Byte c1, System::Byte c2, System::Byte c3, System::Byte c4 );\r
113 \r
114                         /// <summary>Turns on or off all D3DX debug output.</summary>\r
115                         /// <unmanaged>D3DXDebugMute</unmanaged>\r
116                         static bool DebugMute( bool mute );\r
117 \r
118                         /// <summary>Generates an optimized face remapping for a triangle list.</summary>\r
119                         /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
120                         static array<int>^ OptimizeFaces( array<int>^ indices, int faceCount, int vertexCount );\r
121 \r
122                         /// <summary>Generates an optimized face remapping for a triangle list.</summary>\r
123                         /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
124                         static array<int>^ OptimizeFaces( array<System::Int16>^ indices, int faceCount, int vertexCount );\r
125 \r
126                         /// <summary>Generates an optimized vertex remapping for a triangle list. </summary>\r
127                         /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
128                         static array<int>^ OptimizeVertices( array<int>^ indices, int faceCount, int vertexCount );\r
129 \r
130                         /// <summary>Generates an optimized vertex remapping for a triangle list. </summary>\r
131                         /// <unmanaged>D3DXOptimizeFaces</unmanaged>\r
132                         static array<int>^ OptimizeVertices( array<System::Int16>^ indices, int faceCount, int vertexCount );\r
133 \r
134                         /// <summary>\r
135                         /// Verifies that the compiled version of D3DX matches the runtime version of D3DX.\r
136                         /// </summary>\r
137                         /// <returns><c>true</c> if the versions match; otherwise, <c>false</c>.</returns>\r
138                         /// <unmanaged>D3DXCheckVersion</unmanaged>\r
139                         static bool CheckVersion();\r
140 \r
141                         /// <unmanaged>D3DXFresnelTerm</unmanaged>\r
142                         static float FresnelTerm( float cosTheta, float refractionIndex );\r
143 \r
144                         static array<Vector3>^ GetVectors( DataStream^ stream, int vertexCount, VertexFormat format );\r
145 \r
146                         static array<Vector3>^ GetVectors( DataStream^ stream, int vertexCount, int stride );\r
147                 };\r
148         }\r
149 }\r