[Gcblue-commits] gcb_wx/include/sim tcAeroAirObject.h,1.2,1.3 tcAirObject.h,1.5,1.6 tcCarrierObject.
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-02-13 01:36:54
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv386/include/sim Modified Files: tcAeroAirObject.h tcAirObject.h tcCarrierObject.h tcGameObject.h tcMissileObject.h tcPlatformObject.h tcPool.h tcRadar.h tcSensorMap.h tcSensorState.h tcSimState.h tcSurfaceObject.h Log Message: Index: tcAeroAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAeroAirObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcAeroAirObject.h 9 Dec 2003 00:36:03 -0000 1.2 --- tcAeroAirObject.h 13 Feb 2004 01:31:32 -0000 1.3 *************** *** 53,57 **** virtual void UpdateClimb(float dt_s); virtual void UpdateHeading(float dt_s); ! virtual void UpdateKin(double afStatusTime); virtual void UpdateSpeed(float dt_s); private: --- 53,57 ---- virtual void UpdateClimb(float dt_s); virtual void UpdateHeading(float dt_s); ! virtual void Update(double afStatusTime); virtual void UpdateSpeed(float dt_s); private: Index: tcAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAirObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcAirObject.h 8 Dec 2003 03:06:36 -0000 1.5 --- tcAirObject.h 13 Feb 2004 01:31:32 -0000 1.6 *************** *** 39,43 **** void SetPitchLimit(float limit_rad); virtual void UpdateClimb(float dt_s); ! virtual void UpdateKin(double afStatusTime); void PrintToFile(tcFile& file); --- 39,43 ---- void SetPitchLimit(float limit_rad); virtual void UpdateClimb(float dt_s); ! virtual void Update(double afStatusTime); void PrintToFile(tcFile& file); Index: tcCarrierObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcCarrierObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcCarrierObject.h 5 Jan 2004 02:48:02 -0000 1.5 --- tcCarrierObject.h 13 Feb 2004 01:31:32 -0000 1.6 *************** *** 43,47 **** virtual void Serialize(tcFile& file, bool mbLoad); void SetFlightportDefaults(); ! virtual void UpdateKin(double afStatusTime); virtual void UpdateLaunch(); --- 43,47 ---- virtual void Serialize(tcFile& file, bool mbLoad); void SetFlightportDefaults(); ! virtual void Update(double afStatusTime); virtual void UpdateLaunch(); Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcGameObject.h 1 Feb 2004 22:19:08 -0000 1.12 --- tcGameObject.h 13 Feb 2004 01:31:32 -0000 1.13 *************** *** 103,107 **** virtual void LoadFromFile(tcFile& file); virtual void Serialize(tcFile& file, bool mbLoad); ! virtual void UpdateKin(double afStatusTime) {} virtual void UpdateCaptivePosition(void); --- 103,107 ---- virtual void LoadFromFile(tcFile& file); virtual void Serialize(tcFile& file, bool mbLoad); ! virtual void Update(double afStatusTime) {} virtual void UpdateCaptivePosition(void); Index: tcMissileObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMissileObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcMissileObject.h 7 Feb 2004 02:19:54 -0000 1.4 --- tcMissileObject.h 13 Feb 2004 01:31:32 -0000 1.5 *************** *** 53,57 **** void Clear(void); void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void UpdateKin(double afStatusTime); virtual void UpdateGuidance(double afStatusTime); virtual void SetHeading(float afNewHeading) {mfGoalHeading_rad=afNewHeading;} --- 53,57 ---- void Clear(void); void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void Update(double afStatusTime); virtual void UpdateGuidance(double afStatusTime); virtual void SetHeading(float afNewHeading) {mfGoalHeading_rad=afNewHeading;} Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcPlatformObject.h 12 Feb 2004 21:41:52 -0000 1.11 --- tcPlatformObject.h 13 Feb 2004 01:31:32 -0000 1.12 *************** *** 75,79 **** virtual int SetLaunch(int anLauncher, int anQuantity); virtual void SetFormation(tsFormationParameters asFP) {msFormationParameters=asFP;} ! virtual void UpdateKin(double afStatusTime); void PrintToFile(tcFile&); --- 75,79 ---- virtual int SetLaunch(int anLauncher, int anQuantity); virtual void SetFormation(tsFormationParameters asFP) {msFormationParameters=asFP;} ! virtual void Update(double afStatusTime); void PrintToFile(tcFile&); Index: tcPool.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPool.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcPool.h 12 Feb 2004 01:54:49 -0000 1.4 --- tcPool.h 13 Feb 2004 01:31:32 -0000 1.5 *************** *** 38,41 **** --- 38,42 ---- tnPoolIndex GetPrevKey(tnPoolIndex pos); T operator[] (tnPoolIndex index) const; // r-value version + bool CheckForCorruption(); //T*& operator[] (tnPoolIndex index); // l-value version, T has to support assignment bool CreateAndAddElement(T*& pt, tnPoolIndex& newkey); // T object created with new *************** *** 62,65 **** --- 63,82 ---- /***** inline function definitions *****/ /**********************************************************/ + + + template <class T, int POOLSIZE> + bool tcPool<T,POOLSIZE>::CheckForCorruption() + { + if (mpool[POOLSIZE-1] != NULL) + { + return true; + } + else + { + return false; + } + } + + template <class T, int POOLSIZE> bool tcPool<T,POOLSIZE>::Lookup(tnPoolIndex n,T*& pt) { *************** *** 131,134 **** --- 148,152 ---- maPrev[newkey] = NULL_INDEX; } + fprintf(stdout,"added element %d\n",newkey); return true; } *************** *** 292,299 **** mnTail = maPrev[n]; // if n is tail then n prev becomes new tail } ! if (maPrev[n] < POOLSIZE) { maNext[maPrev[n]] = maNext[n]; // maNext[n] can be invalid } ! if (maNext[n] < POOLSIZE) { maPrev[maNext[n]] = maPrev[n]; // maPrev[n] can be invalid } --- 310,319 ---- mnTail = maPrev[n]; // if n is tail then n prev becomes new tail } ! if ((maPrev[n] >= 0)&&(maPrev[n] < POOLSIZE)) ! { maNext[maPrev[n]] = maNext[n]; // maNext[n] can be invalid } ! if ((maNext[n] >=0 )&&(maNext[n] < POOLSIZE)) ! { maPrev[maNext[n]] = maPrev[n]; // maPrev[n] can be invalid } *************** *** 334,341 **** mnTail = maPrev[n]; // if n is tail then n prev becomes new tail } ! if (maPrev[n] < POOLSIZE) { maNext[maPrev[n]] = maNext[n]; // maNext[n] can be invalid } ! if (maNext[n] < POOLSIZE) { maPrev[maNext[n]] = maPrev[n]; // maPrev[n] can be invalid } --- 354,363 ---- mnTail = maPrev[n]; // if n is tail then n prev becomes new tail } ! if ((maPrev[n] >= 0)&&(maPrev[n] < POOLSIZE)) ! { maNext[maPrev[n]] = maNext[n]; // maNext[n] can be invalid } ! if ((maNext[n] >= 0)&&(maNext[n] < POOLSIZE)) ! { maPrev[maNext[n]] = maPrev[n]; // maPrev[n] can be invalid } Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcRadar.h 12 Feb 2004 21:41:52 -0000 1.3 --- tcRadar.h 13 Feb 2004 01:31:32 -0000 1.4 *************** *** 87,92 **** --- 87,94 ---- tcRadar* GetSemiactiveIlluminator(); + void UpdateSeeker(double t); void UpdateSensorMap(double t, const tcGameObject* target, float range_km); void UpdateSurveillance(double t); + void UpdateTrack(const tcGameObject* target, double t); }; Index: tcSensorMap.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMap.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorMap.h 19 Oct 2003 17:46:01 -0000 1.2 --- tcSensorMap.h 13 Feb 2004 01:31:32 -0000 1.3 *************** *** 53,58 **** mfTimestamp=0;mfStartTime=0; mfStartTime = 0; ! mnTrackID=0; ! mnSensorPlatformID=0; mnFlags=0; mbClassified = 0; --- 53,58 ---- mfTimestamp=0;mfStartTime=0; mfStartTime = 0; ! mnTrackID = -1; ! mnSensorPlatformID = -1; mnFlags=0; mbClassified = 0; Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcSensorState.h 12 Feb 2004 01:54:49 -0000 1.7 --- tcSensorState.h 13 Feb 2004 01:31:32 -0000 1.8 *************** *** 31,37 **** #define SSMODE_SURVEILLANCE 1 ! #define SSMODE_SEEKERTRACK 2 ! #define SSMODE_SEEKERSEARCH 3 ! #define SSMODE_SEEKERACQUIRE 4 #define SSMODE_FC 5 // fire control only #define SSMODE_FCSURVEILLANCE 6 // both --- 31,37 ---- #define SSMODE_SURVEILLANCE 1 ! #define SSMODE_SEEKERTRACK 2 ///< seeker is tracking target ! #define SSMODE_SEEKERSEARCH 3 ///< seeker searching for target ! #define SSMODE_SEEKERACQUIRE 4 ///< seeker has target cue and attempting to track #define SSMODE_FC 5 // fire control only #define SSMODE_FCSURVEILLANCE 6 // both *************** *** 46,51 **** { public: - tcGameObject *parent; int mbActive; tnPoolIndex mnDBKey; tcSensorDBObject *mpDBObj; --- 46,51 ---- { public: int mbActive; + tcGameObject *parent; tnPoolIndex mnDBKey; tcSensorDBObject *mpDBObj; *************** *** 60,66 **** --- 60,68 ---- static void AttachSimState(tcSimState *ss) {simState = ss;} + bool GetActive() const {return mbActive != 0;} void GetTestArea(tcRect& region); virtual bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); void Serialize(tcFile& file, bool mbLoad); + virtual void SetActive(bool active); void SetMountAz(float az) {mountAz_rad = az;} void SetParent(tcGameObject *obj) {parent = obj;} Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcSimState.h 12 Feb 2004 21:41:52 -0000 1.16 --- tcSimState.h 13 Feb 2004 01:31:32 -0000 1.17 *************** *** 80,83 **** --- 80,84 ---- tcUserInfo *mpUserInfo; tcGoalTracker *goalTracker; ///< tracks win/lose victory conditions for each alliance + tcCommandQueue *mpCommandInterface; tcSimPythonInterface *mpPythonInterface; tcSensorMap mcSensorMap; *************** *** 169,173 **** private: tcMapData *mpMapData; - tcCommandQueue *mpCommandInterface; double mfSimTime; DateZulu dateZulu; --- 170,173 ---- Index: tcSurfaceObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSurfaceObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcSurfaceObject.h 29 Jan 2004 00:05:21 -0000 1.5 --- tcSurfaceObject.h 13 Feb 2004 01:31:32 -0000 1.6 *************** *** 42,46 **** virtual void Clear(void); virtual void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void UpdateKin(double afStatusTime); virtual void UpdateHeading(float dt_s); --- 42,46 ---- virtual void Clear(void); virtual void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void Update(double afStatusTime); virtual void UpdateHeading(float dt_s); |