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