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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6 - (show annotations) (download)
Fri Jul 30 00:28:19 2010 UTC (10 years, 8 months ago) by william
File size: 9166 byte(s)
bulk commit

1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using gr2lib.core.interfaces;
5 using System.Diagnostics;
6 using System.ComponentModel;
7
8 namespace gr2lib.core.coretypes.implementation
9 {
10 #region public class ArtToolInfoVersion
11 /// <summary>
12 /// ArtToolInfoVersion class
13 /// </summary>
14 [Browsable(true)]
15 [TypeConverter(typeof(ExpandableObjectConverter))]
16 public class ArtToolInfoVersion : IArtToolInfoVersion
17 {
18 /// <summary>
19 /// default constructor
20 /// </summary>
21 public ArtToolInfoVersion()
22 {
23 this.Major = 0;
24 this.Minor = 0;
25 }
26 /// <summary>
27 /// default constructor - specify: Major, Minor
28 /// </summary>
29 public ArtToolInfoVersion(int Major, int Minor)
30 {
31 this.Major = Major;
32 this.Minor = Minor;
33 }
34
35 private int _Major;
36 /// <summary>
37 /// Get/set the major
38 /// </summary>
39 [RefreshPropertiesAttribute(RefreshProperties.All)]
40 [Browsable(true)]
41 public int Major
42 {
43 get { return _Major; }
44 set { _Major = value; }
45 }
46 private int _Minor;
47 /// <summary>
48 /// Get/set the minor
49 /// </summary>
50 [RefreshPropertiesAttribute(RefreshProperties.All)]
51 [Browsable(true)]
52 public int Minor
53 {
54 get { return _Minor; }
55 set { _Minor = value; }
56 }
57 /// <summary>
58 /// string representation
59 /// </summary>
60 /// <returns></returns>
61 public override string ToString()
62 {
63 return string.Format("{0}.{1}", Major, Minor);
64 }
65 }
66 #endregion
67
68 #region public class ArtToolInfoVector
69 /// <summary>
70 /// ArtToolInfoVector class
71 /// </summary>
72 [Browsable(true)]
73 [TypeConverter(typeof(ExpandableObjectConverter))]
74 public class ArtToolInfoVector : IArtToolInfoVector
75 {
76 private Vector3 _Origin;
77 private Vector3 _Right;
78 private Vector3 _Up;
79 private Vector3 _Back;
80
81 /// <summary>
82 /// default constructor
83 /// </summary>
84 public ArtToolInfoVector()
85 {
86 this.Origin = new Vector3();
87 this.Right = new Vector3();
88 this.Up = new Vector3();
89 this.Back = new Vector3();
90 }
91 /// <summary>
92 /// default constructor - specify: Origin, Right, Up, Back
93 /// </summary>
94 public ArtToolInfoVector(Vector3 Origin, Vector3 Right, Vector3 Up, Vector3 Back)
95 {
96 this.Origin = Origin;
97 this.Right = Right;
98 this.Up = Up;
99 this.Back = Back;
100 }
101 /// <summary>
102 /// Get/set the Origin
103 /// </summary>
104 [RefreshPropertiesAttribute(RefreshProperties.All)]
105 public Vector3 Origin { get { return _Origin; } set { _Origin = value; } }
106 /// <summary>
107 /// Get/set the Right
108 /// </summary>
109 [RefreshPropertiesAttribute(RefreshProperties.All)]
110 public Vector3 Right { get { return _Right; } set { _Right = value; } }
111 /// <summary>
112 /// Get/set the Up
113 /// </summary>
114 [RefreshPropertiesAttribute(RefreshProperties.All)]
115 public Vector3 Up { get { return _Up; } set { _Up = value; } }
116 /// <summary>
117 /// Get/set the Back
118 /// </summary>
119 [RefreshPropertiesAttribute(RefreshProperties.All)]
120 public Vector3 Back { get { return _Back; } set { _Back = value; } }
121
122 /// <summary>
123 /// get string representation
124 /// </summary>
125 /// <returns></returns>
126 public override string ToString()
127 {
128 string format = "0.00";
129
130 string origin = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Origin.x, Origin.y, Origin.z) + "}";
131 string right = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Right.x, Right.y, Right.z) + "}";
132 string up = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Up.x, Up.y, Up.z) + "}";
133 string back = "{" + string.Format("{0:" + format + "},{1:" + format + "},{2:" + format + "}", Back.x, Back.y, Back.z) + "}";
134
135 return string.Format("{0} ; {1} ; {2} ; {3}", origin, right, up, back);
136 }
137
138
139
140 }
141 #endregion
142
143 /// <summary>
144 /// ArtToolInfo class
145 /// </summary>
146 //[Category("Art Tool Info")]
147 public class ArtToolInfo : IArtToolInfo
148 {
149 //private string _ParentResourceName;
150 /// <summary>
151 /// Get's the parent resource name
152 /// </summary>
153 protected internal string ParentResourceName { get { return "Art Tool Info"; } }
154
155 private string _fromArtToolName;
156 //private granny_int32 _artToolMajorRevision;
157 //private granny_int32 _artToolMinorRevision;
158 private float _unitsPerMeter;
159
160
161
162
163 //private Vector3 _Origin;
164 //private Vector3 _Right;
165 //private Vector3 _Up;
166 //private Vector3 _Back;
167
168 /// <summary>
169 /// default constructor
170 /// </summary>
171 public ArtToolInfo()
172 {
173 this.FromArtToolName = "";
174 this.ToolVersion = new ArtToolInfoVersion();
175
176 //this.ArtToolMajorRevision = 0;
177 //this.ArtToolMinorRevision = 0;
178 this.UnitsPerMeter = 1;
179 //this.ExtendedData = IntPtr.Zero;
180 //this.NativePointer = IntPtr.Zero;
181 this.Vector = new ArtToolInfoVector();
182
183 //this.Origin = new Vector3(0, 0, 0);
184 //this.Right = new Vector3(0, 0, 0);
185 //this.Up = new Vector3(0, 0, 0);
186 //this.Back = new Vector3(0, 0, 0);
187
188
189
190 }
191
192
193 #region IArtToolInfo Members
194 /// <summary>
195 /// Get/set ArtTool Name
196 /// </summary>
197 [RefreshPropertiesAttribute(RefreshProperties.All)]
198 [CategoryAttribute("Art Tool Info")]
199 public string FromArtToolName { get { return _fromArtToolName; } set { _fromArtToolName = value; } }
200 ///// <summary>
201 ///// Get/set ArtTool Major
202 ///// </summary>
203 //[RefreshPropertiesAttribute(RefreshProperties.All)]
204 //internal int ArtToolMajorRevision { get { return _ToolVersion.Major; } set { _ToolVersion.Major = value; } }
205 ///// <summary>
206 ///// Get/set ArtTool Minor
207 ///// </summary>
208 //[RefreshPropertiesAttribute(RefreshProperties.All)]
209 //internal int ArtToolMinorRevision { get { return _ToolVersion.Minor; } set { _ToolVersion.Minor = value; } }
210
211 private ArtToolInfoVersion _ToolVersion;
212 /// <summary>
213 /// Get/set ArtTool Version
214 /// </summary>
215 [RefreshPropertiesAttribute(RefreshProperties.All)]
216 [CategoryAttribute("Art Tool Info")]
217 [Browsable(true)]
218 public ArtToolInfoVersion ToolVersion { get { return _ToolVersion; } set { _ToolVersion = value; } }
219
220 /// <summary>
221 ///Get/set ArtTool UnitsPerMeter
222 /// </summary>
223 [RefreshPropertiesAttribute(RefreshProperties.All)]
224 //[Editor(typeof(UINumericEditor<NumericType<float>,float>), typeof(UITypeEditor))]
225 [CategoryAttribute("Art Tool Info")]
226 public float UnitsPerMeter { get { return _unitsPerMeter; } set { _unitsPerMeter = value; } }
227
228 ///// <summary>
229 /////Get/set ArtTool Origin
230 ///// </summary>
231 //[RefreshPropertiesAttribute(RefreshProperties.All)]
232 //internal Vector3 Origin { get { return Vector.Origin; } set { Vector.Origin = value; } }
233 ///// <summary>
234 /////Get/set ArtTool Right
235 ///// </summary>
236 //[RefreshPropertiesAttribute(RefreshProperties.All)]
237 //internal Vector3 Right { get { return Vector.Right; } set { Vector.Right = value; } }
238 ///// <summary>
239 /////Get/set ArtTool Up
240 ///// </summary>
241 //[RefreshPropertiesAttribute(RefreshProperties.All)]
242 //internal Vector3 Up { get { return Vector.Up; } set { Vector.Up = value; } }
243 ///// <summary>
244 /////Get/set ArtTool Back
245 ///// </summary>
246 //[RefreshPropertiesAttribute(RefreshProperties.All)]
247 //internal Vector3 Back { get { return Vector.Back; } set { Vector.Back = value; } }
248
249 private ArtToolInfoVector _Vector;
250 /// <summary>
251 ///Get/set ArtTool Vector
252 /// </summary>
253 [RefreshPropertiesAttribute(RefreshProperties.All)]
254 [CategoryAttribute("Art Tool Info")]
255 [Browsable(true)]
256 public ArtToolInfoVector Vector
257 {
258 get { return _Vector; }
259 set { _Vector = value; }
260 }
261 #endregion
262
263
264 }
265 }
266

  ViewVC Help
Powered by ViewVC 1.1.22