/[Sims3RigEditor]/trunk/gr2lib_typedefs/typedefs/VertexData.cs
ViewVC logotype

Contents of /trunk/gr2lib_typedefs/typedefs/VertexData.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 90 - (show annotations) (download)
Mon Aug 16 08:02:29 2010 UTC (9 years, 6 months ago) by william
File size: 4116 byte(s)
rename GrannyDataTypeDefinition and GrannyVertexAnnotationSet

1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 namespace gr2lib.core.typedefs
6 {
7 public interface IVertexData
8 {
9 GrannyDataTypeDefinition VertexType { get; set; }
10 int VertexCount { get; }
11 List<byte> Vertices { get; set; }
12 int VertexComponentNameCount { get; }
13 List<string> VertexComponentNames { get; set; }
14 int VertexAnnotationSetCount { get; }
15 List<GrannyVertexAnnotationSet> VertexAnnotationSets { get; set; }
16
17 }
18 public interface IGrannyVertexAnnotationSet
19 {
20 string Name { get; set; }
21 GrannyDataTypeDefinition VertexAnnotationType { get; set; }
22 int VertexAnnotationCount { get; }
23 List<byte> VertexAnnotations { get; set; }
24 int IndicesMapFromVertexToAnnotation { get; set; }
25 int VertexAnnotationIndexCount { get; }
26 List<int> VertexAnnotationIndices { get; set; }
27
28 }
29 public class GrannyVertexAnnotationSet : IGrannyVertexAnnotationSet
30 {
31 public GrannyVertexAnnotationSet()
32 {
33 this.init();
34 }
35
36 private void init()
37 {
38 this.Name = "";
39 this.VertexAnnotationType = new GrannyDataTypeDefinition();
40 this.VertexAnnotations = new List<byte>();
41 this.IndicesMapFromVertexToAnnotation = 0;
42 this.VertexAnnotationIndices = new List<int>();
43 }
44 #region IGrannyVertexAnnotationSet Members
45 private string _Name;
46 public string Name { get { return _Name; } set { _Name = value; } }
47 private GrannyDataTypeDefinition _VertexAnnotationType;
48 public GrannyDataTypeDefinition VertexAnnotationType { get { return _VertexAnnotationType; } set { _VertexAnnotationType = value; } }
49
50 public int VertexAnnotationCount { get { return this.VertexAnnotations.Count; } }
51 private List<byte> _VertexAnnotations;
52 public List<byte> VertexAnnotations { get { return _VertexAnnotations; } set { _VertexAnnotations = value; } }
53
54 private int _IndicesMapFromVertexToAnnotation;
55 public int IndicesMapFromVertexToAnnotation { get { return _IndicesMapFromVertexToAnnotation; } set { _IndicesMapFromVertexToAnnotation = value; } }
56
57 public int VertexAnnotationIndexCount { get { return this.VertexAnnotationIndices.Count; } }
58 private List<int> _VertexAnnotationIndices;
59 public List<int> VertexAnnotationIndices { get { return _VertexAnnotationIndices; } set { _VertexAnnotationIndices = value; } }
60 #endregion
61 }
62
63 public class VertexData : IVertexData
64 {
65 public VertexData()
66 {
67 this.init();
68 }
69
70 private void init()
71 {
72 this.VertexType = new GrannyDataTypeDefinition();
73 this.Vertices = new List<byte>();
74 this.VertexComponentNames = new List<string>();
75 this.VertexAnnotationSets = new List<GrannyVertexAnnotationSet>();
76 }
77
78 #region IVertexData Members
79 private GrannyDataTypeDefinition _VertexType;
80 public GrannyDataTypeDefinition VertexType { get { return _VertexType; } set { _VertexType = value; } }
81 public int VertexCount { get { return this.Vertices.Count; } }
82 private List<byte> _Vertices;
83 public List<byte> Vertices { get { return _Vertices; } set { _Vertices = value; } }
84
85 public int VertexComponentNameCount { get { return this.VertexComponentNames.Count; } }
86 private List<string> _VertexComponentNames;
87 public List<string> VertexComponentNames { get { return _VertexComponentNames; } set { _VertexComponentNames = value; } }
88
89
90 public int VertexAnnotationSetCount { get { return this.VertexAnnotationSets.Count; } }
91 private List<GrannyVertexAnnotationSet> _VertexAnnotationSets;
92 public List<GrannyVertexAnnotationSet> VertexAnnotationSets { get { return _VertexAnnotationSets; } set { _VertexAnnotationSets = value; } }
93 #endregion
94 }
95 }

  ViewVC Help
Powered by ViewVC 1.1.22