[Gcblue-commits] gcb_wx/src/database tcGenericDBObject.cpp,1.9,1.10
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-08-06 02:48:00
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7549/src/database Modified Files: tcGenericDBObject.cpp Log Message: Index: tcGenericDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcGenericDBObject.cpp 18 Jul 2004 03:18:00 -0000 1.9 --- tcGenericDBObject.cpp 6 Aug 2004 02:47:51 -0000 1.10 *************** *** 61,64 **** --- 61,77 ---- } + /** + * @returns a tc3DPoint object with (x,y,z) relative position of launcher n + */ + tc3DPoint tcGenericDBObject::GetLauncherPosition(unsigned n) + { + if ((int)n >= mnNumLaunchers) + { + fprintf(stderr, "Error - GetLauncherPosition - bad launcher index\n"); + return tc3DPoint(0, 0, 0); + } + return launcherPosition[n]; + } + void tcGenericDBObject::RandInit() { *************** *** 210,219 **** { float az; *csv >> s; *csv >> az; if (s.size() > 0) { maLauncherClass[mnNumLaunchers] = s.c_str(); ! launcherAz[mnNumLaunchers++] = az; } } --- 223,237 ---- { float az; + tc3DPoint loc; *csv >> s; *csv >> az; + *csv >> loc.x; + *csv >> loc.y; + *csv >> loc.z; if (s.size() > 0) { maLauncherClass[mnNumLaunchers] = s.c_str(); ! launcherAz[mnNumLaunchers] = az; ! launcherPosition[mnNumLaunchers++] = loc; } } *************** *** 269,272 **** --- 287,293 ---- *csv << string(maLauncherClass[i].mz); *csv << launcherAz[i]; + *csv << launcherPosition[i].x; + *csv << launcherPosition[i].y; + *csv << launcherPosition[i].z; } else *************** *** 274,277 **** --- 295,301 ---- *csv << ""; *csv << ""; + *csv << ""; + *csv << ""; + *csv << ""; } } *************** *** 351,354 **** --- 375,381 ---- childNode->SetAttribute("class", maLauncherClass[i].mz); childNode->SetAttribute("az", launcherAz[i]); + childNode->SetAttribute("x", launcherPosition[i].x); + childNode->SetAttribute("y", launcherPosition[i].y); + childNode->SetAttribute("z", launcherPosition[i].z); } *************** *** 394,400 **** { tcString s; ! s.Format("Launcher%d",i+1); *csv << s.GetBuffer(); ! s.Format("Launcher%d-angle",i+1); *csv << s.GetBuffer(); } --- 421,433 ---- { tcString s; ! s.Format("Lau%d",i+1); *csv << s.GetBuffer(); ! s.Format("Lau%d-angle",i+1); ! *csv << s.GetBuffer(); ! s.Format("Lau%d-x",i+1); ! *csv << s.GetBuffer(); ! s.Format("Lau%d-y",i+1); ! *csv << s.GetBuffer(); ! s.Format("Lau%d-z",i+1); *csv << s.GetBuffer(); } *************** *** 471,474 **** --- 504,508 ---- maLauncherClass[i] = obj.maLauncherClass[i]; launcherAz[i] = obj.launcherAz[i]; + launcherPosition[i] = obj.launcherPosition[i]; } for(i=0;i<MAXSENSORS;i++) |