PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/src/Microsoft.Research.Visualization3D/VertexStructures/VertexElementAttribute.cs

#
C# | 76 lines | 42 code | 6 blank | 28 comment | 0 complexity | 9116b1ecaaae706ffcddbdf79532b557 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using SlimDX.Direct3D9;
 6
 7namespace Microsoft.Research.Visualization3D.VertexStructures
 8{
 9    /// <summary>
10    /// Indicates that the target code element is part of a vertex declaration.
11    /// </summary>
12    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
13    public sealed class VertexElementAttribute : Attribute
14    {
15        /// <summary>
16        /// Gets or sets the stream index.
17        /// </summary>
18        /// <value>The stream index.</value>
19        public int Stream
20        {
21            get;
22            set;
23        }
24
25        /// <summary>
26        /// Gets or sets the tessellation method.
27        /// </summary>
28        /// <value>The tessellation method.</value>
29        public DeclarationMethod Method
30        {
31            get;
32            set;
33        }
34
35        /// <summary>
36        /// Gets or sets the element usage.
37        /// </summary>
38        /// <value>The element usage.</value>
39        public DeclarationUsage Usage
40        {
41            get;
42            private set;
43        }
44
45        /// <summary>
46        /// Gets or sets the type of the data.
47        /// </summary>
48        /// <value>The type of the data.</value>
49        public DeclarationType Type
50        {
51            get;
52            private set;
53        }
54
55        /// <summary>
56        /// Gets or sets the offset.
57        /// </summary>
58        /// <value>The offset.</value>
59        internal int Offset
60        {
61            get;
62            set;
63        }
64
65        /// <summary>
66        /// Initializes a new instance of the <see cref="VertexElementAttribute"/> class.
67        /// </summary>
68        /// <param name="type">The type.</param>
69        /// <param name="usage">The vertex element usage.</param>
70        public VertexElementAttribute(DeclarationType type, DeclarationUsage usage)
71        {
72            Type = type;
73            Usage = usage;
74        }
75    }
76}