OSDN Git Service

フォーラム[#56172] SlimDX(改)のフォルダ内容が不完全だったので再UP。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d10 / InputElement.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 "../dxgi/Enums.h"\r
25 \r
26 #include "Enums.h"\r
27 \r
28 namespace SlimDX\r
29 {\r
30         namespace Direct3D10\r
31         {\r
32                 public value class InputElement : System::IEquatable<InputElement>\r
33                 {\r
34                 private:\r
35                         System::String^ m_SemanticName;\r
36                         int m_SemanticIndex;\r
37                         DXGI::Format m_Format;\r
38                         int m_InputSlot;\r
39                         int m_AlignedByteOffset;\r
40                         InputClassification m_InputSlotClass;\r
41                         int m_InstanceDataStepRate;\r
42         \r
43                 internal:\r
44                         D3D10_INPUT_ELEMENT_DESC CreateNativeVersion();\r
45                         \r
46                 public:\r
47                         property System::String^ SemanticName\r
48                         {\r
49                                 System::String^ get();\r
50                                 void set( System::String^ value );\r
51                         }\r
52 \r
53                         property int SemanticIndex\r
54                         {\r
55                                 int get();\r
56                                 void set( int value );\r
57                         }\r
58 \r
59                         property DXGI::Format Format\r
60                         {\r
61                                 DXGI::Format get();\r
62                                 void set( DXGI::Format value );\r
63                         }\r
64 \r
65                         property int Slot\r
66                         {\r
67                                 int get();\r
68                                 void set( int value );\r
69                         }\r
70 \r
71                         property int AlignedByteOffset\r
72                         {\r
73                                 int get();\r
74                                 void set( int value );\r
75                         }\r
76 \r
77                         property InputClassification Classification\r
78                         {\r
79                                 InputClassification get();\r
80                                 void set( InputClassification value );\r
81                         }\r
82 \r
83                         property int InstanceDataStepRate\r
84                         {\r
85                                 int get();\r
86                                 void set( int value );\r
87                         }\r
88 \r
89                         /// <summary>\r
90                         /// Returns a value that can be used for the offset parameter of an InputElement to indicate that the element\r
91                         /// should be aligned directly after the previous element, including any packing if neccessary.\r
92                         /// </summary>\r
93                         /// <returns>A value used to align input elements.</returns>\r
94                         /// <unmanaged>D3D10_APPEND_ALIGNED_ELEMENT</unmanaged>\r
95                         property static int AppendAligned {\r
96                                 int get();\r
97                         }\r
98 \r
99                         InputElement( System::String^ name, int index, DXGI::Format format, int offset, int slot );\r
100                         InputElement( System::String^ name, int index, DXGI::Format format, int offset, int slot, InputClassification slotClass, int stepRate );\r
101                 \r
102                         static bool operator == ( InputElement left, InputElement right );\r
103                         static bool operator != ( InputElement left, InputElement right );\r
104 \r
105                         virtual int GetHashCode() override;\r
106                         virtual bool Equals( System::Object^ obj ) override;\r
107                         virtual bool Equals( InputElement other );\r
108                         static bool Equals( InputElement% value1, InputElement% value2 );\r
109                 };\r
110         }\r
111 };