@@ -162,79 +162,10 @@ public Settings3D()
162
162
163
163
/// <summary>6D Settings from QTM</summary>
164
164
[ XmlRoot ( "The_6D" ) ]
165
- public class Settings6D_V1 : SettingsBase
166
- {
167
- internal static Settings6D ConvertToSettings6DOF ( Settings6D_V1 settings )
168
- {
169
- return new Settings6D ( settings . Xml , settings . BodyCount , settings . Bodies . ConvertAll < Settings6DOF > ( Settings6DOF_V1 . ConvertToSettings6DOF ) , settings . EulerNames ) ;
170
- }
171
-
172
- [ XmlElement ( "Bodies" ) ]
173
- public int BodyCount ;
174
- [ XmlElement ( "Body" ) ]
175
- public List < Settings6DOF_V1 > Bodies ;
176
- [ XmlElement ( "Euler" ) ]
177
- public EulerNames EulerNames ;
178
- }
179
-
180
- [ XmlRoot ( "Euler" ) ]
181
- public class EulerNames
182
- {
183
- public EulerNames ( )
184
- {
185
- First = "Roll" ;
186
- Second = "Pitch" ;
187
- Third = "Yaw" ;
188
- }
189
-
190
- [ XmlElement ( "First" ) ]
191
- public string First ;
192
- [ XmlElement ( "Second" ) ]
193
- public string Second ;
194
- [ XmlElement ( "Third" ) ]
195
- public string Third ;
196
- }
197
-
198
- /// <summary>6D Settings from QTM</summary>
199
- [ XmlRoot ( "The_6D" ) ]
200
- public class Settings6D_V2 : SettingsBase
201
- {
202
- public Settings6D_V2 ( ) { }
203
- internal Settings6D_V2 ( Settings6D settings )
204
- {
205
- Bodies = settings . Bodies . ConvertAll < Settings6DOF_V2 > ( Settings6DOF . ConvertToSettings6DOF_V2 ) ;
206
- }
207
-
208
- internal static Settings6D ConvertToSettings6DOF ( Settings6D_V2 settings )
209
- {
210
- return new Settings6D ( settings . Xml , settings . Bodies . Count , settings . Bodies . ConvertAll < Settings6DOF > ( Settings6DOF_V2 . ConvertToSettings6DOF ) , new EulerNames ( ) ) ;
211
- }
212
- [ XmlElement ( "Body" ) ]
213
- public List < Settings6DOF_V2 > Bodies ;
214
- }
215
-
216
165
public class Settings6D : SettingsBase
217
166
{
218
- public Settings6D ( )
219
- {
220
- #pragma warning disable CS0618 // Type or member is obsolete
221
- EulerNames = new EulerNames ( ) ;
222
- #pragma warning restore CS0618 // Type or member is obsolete
223
- }
224
- public Settings6D ( string xml , int bodyCount , List < Settings6DOF > bodies , EulerNames eulerNames )
225
- {
226
- Xml = xml ;
227
- BodyCount = bodyCount ;
228
- Bodies = bodies ;
229
- #pragma warning disable CS0618 // Type or member is obsolete
230
- EulerNames = eulerNames ;
231
- #pragma warning restore CS0618 // Type or member is obsolete
232
- }
233
-
234
- public int BodyCount ;
167
+ [ XmlElement ( "Body" ) ]
235
168
public List < Settings6DOF > Bodies ;
236
- [ Obsolete ( "EulerNames is moved to general settings from protocol version 1.21." , false ) ]
237
- public EulerNames EulerNames ;
238
169
}
239
170
240
171
/// <summary>Analog Settings from QTM</summary>
@@ -1016,48 +947,10 @@ public string TimestampTypeAsString
1016
947
public int Frequency ;
1017
948
}
1018
949
1019
- /// <summary>Struct for 6dof point information</summary>
1020
- public struct Settings6DOFPoint_V1
1021
- {
1022
- internal static Settings6DOFPoint ConvertToSettingsPoint ( Settings6DOFPoint_V1 settingsPoint )
1023
- {
1024
- return new Settings6DOFPoint ( "" , settingsPoint . X , settingsPoint . Y , settingsPoint . Z , settingsPoint . Virtual , settingsPoint . PhysicalId ) ;
1025
- }
1026
- [ XmlElement ( "X" ) ]
1027
- public float X ;
1028
- [ XmlElement ( "Y" ) ]
1029
- public float Y ;
1030
- [ XmlElement ( "Z" ) ]
1031
- public float Z ;
1032
- [ XmlElement ( "PhysicalId" ) ]
1033
- public int PhysicalId ;
1034
- [ XmlElement ( "Virtual" ) ]
1035
- public bool Virtual ;
1036
- }
1037
-
1038
- /// <summary>Settings for 6DOF bodies</summary>
1039
- public struct Settings6DOF_V1
1040
- {
1041
- internal static Settings6DOF ConvertToSettings6DOF ( Settings6DOF_V1 settings6DOF )
1042
- {
1043
- return new Settings6DOF ( settings6DOF . Name , true , settings6DOF . ColorRGB , 0 , 0 , 0 , new Settings6DOFFilter ( ) , new Settings6DOFMesh ( ) ,
1044
- settings6DOF . Points . ConvertAll < Settings6DOFPoint > ( Settings6DOFPoint_V1 . ConvertToSettingsPoint ) , new Settings6DOFDataOrigin ( ) , new Settings6DOFDataOrientation ( ) ) ;
1045
- }
1046
- /// <summary>Name of 6DOF body</summary>
1047
- [ XmlElement ( "Name" ) ]
1048
- public string Name ;
1049
- /// <summary>Color of 6DOF body</summary>
1050
- [ XmlElement ( "RGBColor" ) ]
1051
- public int ColorRGB ;
1052
- /// <summary>List of points in 6DOF body</summary>
1053
- [ XmlElement ( "Point" ) ]
1054
- public List < Settings6DOFPoint_V1 > Points ;
1055
- }
1056
-
1057
950
/// <summary>Struct for 6dof filter</summary>
1058
- public struct Settings6DOFColor_V2
951
+ public struct Settings6DOFColor
1059
952
{
1060
- internal Settings6DOFColor_V2 ( int ColorRGB )
953
+ internal Settings6DOFColor ( int ColorRGB )
1061
954
{
1062
955
R = ( ColorRGB & 0xff ) ;
1063
956
G = ( ( ColorRGB >> 8 ) & 0xff ) ;
@@ -1155,28 +1048,8 @@ public struct Settings6DOFDataOrientation
1155
1048
public float R33 ;
1156
1049
}
1157
1050
1158
- public struct Settings6DOF_V2
1051
+ public struct Settings6DOF
1159
1052
{
1160
- internal Settings6DOF_V2 ( Settings6DOF settings )
1161
- {
1162
- Name = settings . Name ;
1163
- Enabled = settings . Enabled ;
1164
- Color = new Settings6DOFColor_V2 ( settings . ColorRGB ) ;
1165
- MaximumResidual = settings . MaximumResidual ;
1166
- MinimumMarkersInBody = settings . MinimumMarkersInBody ;
1167
- BoneLengthTolerance = settings . BoneLengthTolerance ;
1168
- Filter = settings . Filter ;
1169
- Mesh = settings . Mesh ;
1170
- Points = settings . Points ;
1171
- DataOrigin = settings . DataOrigin ;
1172
- DataOrientation = settings . DataOrientation ;
1173
- }
1174
- internal static Settings6DOF ConvertToSettings6DOF ( Settings6DOF_V2 settings6DOF )
1175
- {
1176
- int colorRGB = ( settings6DOF . Color . R & 0xff ) | ( ( settings6DOF . Color . G << 8 ) & 0xff00 ) | ( ( settings6DOF . Color . B << 16 ) & 0xff0000 ) ;
1177
- return new Settings6DOF ( settings6DOF . Name , settings6DOF . Enabled , colorRGB , settings6DOF . MaximumResidual , settings6DOF . MinimumMarkersInBody , settings6DOF . BoneLengthTolerance ,
1178
- settings6DOF . Filter , settings6DOF . Mesh , settings6DOF . Points , settings6DOF . DataOrigin , settings6DOF . DataOrientation ) ;
1179
- }
1180
1053
/// <summary>Name of 6DOF body</summary>
1181
1054
[ XmlElement ( "Name" ) ]
1182
1055
public string Name ;
@@ -1185,7 +1058,7 @@ internal static Settings6DOF ConvertToSettings6DOF(Settings6DOF_V2 settings6DOF)
1185
1058
public bool Enabled ;
1186
1059
/// <summary>Color of 6DOF body</summary>
1187
1060
[ XmlElement ( "Color" ) ]
1188
- public Settings6DOFColor_V2 Color ;
1061
+ public Settings6DOFColor Color ;
1189
1062
/// <summary>Maximum residual of 6DOF body</summary>
1190
1063
[ XmlElement ( "MaximumResidual" ) ]
1191
1064
public float MaximumResidual ;
@@ -1238,51 +1111,6 @@ public Settings6DOFPoint(string name, float x, float y, float z, bool _virtual,
1238
1111
public int PhysicalId ;
1239
1112
}
1240
1113
1241
- public struct Settings6DOF
1242
- {
1243
- internal static Settings6DOF_V2 ConvertToSettings6DOF_V2 ( Settings6DOF settings )
1244
- {
1245
- return new Settings6DOF_V2 ( settings ) ;
1246
- }
1247
- public Settings6DOF ( string name , bool enabled , int colorRGB , float maxResidual , int minimumMarkersInBody , float boneLengthTolerance , Settings6DOFFilter filter , Settings6DOFMesh mesh ,
1248
- List < Settings6DOFPoint > points , Settings6DOFDataOrigin dataOrigin , Settings6DOFDataOrientation dataOrientation )
1249
- {
1250
- Name = name ;
1251
- Enabled = enabled ;
1252
- ColorRGB = colorRGB ;
1253
- MaximumResidual = maxResidual ;
1254
- MinimumMarkersInBody = minimumMarkersInBody ;
1255
- BoneLengthTolerance = boneLengthTolerance ;
1256
- Filter = filter ;
1257
- Mesh = mesh ;
1258
- Points = points ;
1259
- DataOrigin = dataOrigin ;
1260
- DataOrientation = dataOrientation ;
1261
- }
1262
- /// <summary>Name of 6DOF body</summary>
1263
- public string Name ;
1264
- /// <summary>Availability of 6DOF body</summary>
1265
- public bool Enabled ;
1266
- /// <summary>Color of 6DOF body</summary>
1267
- public int ColorRGB ;
1268
- /// <summary>Maximum residual of 6DOF body</summary>
1269
- public float MaximumResidual ;
1270
- /// <summary>Minimum markers in 6DOF body</summary>
1271
- public int MinimumMarkersInBody ;
1272
- /// <summary>Bone length tolerance of 6DOF body</summary>
1273
- public float BoneLengthTolerance ;
1274
- /// <summary>Filter of 6DOF body</summary>
1275
- public Settings6DOFFilter Filter ;
1276
- /// <summary>Mesh of 6DOF body</summary>
1277
- public Settings6DOFMesh Mesh ;
1278
- /// <summary>List of points in 6DOF body</summary>
1279
- public List < Settings6DOFPoint > Points ;
1280
- /// <summary>Data origin of 6DOF body</summary>
1281
- public Settings6DOFDataOrigin DataOrigin ;
1282
- /// <summary>Data orientation of 6DOF body</summary>
1283
- public Settings6DOFDataOrientation DataOrientation ;
1284
- }
1285
-
1286
1114
/// <summary>General settings for Analog devices</summary>
1287
1115
public struct AnalogDevice
1288
1116
{
0 commit comments