[Gcblue-commits] gcb_wx/include/sim tcGameObject.h,1.10,1.11 tcLauncherState.h,1.3,1.4 tcPlatformObj
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@pr...> - 2004-01-31 04:47:00
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4640/include/sim Modified Files: tcGameObject.h tcLauncherState.h tcPlatformObject.h tcRadarSensorState.h Log Message: Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcGameObject.h 10 Jan 2004 21:55:31 -0000 1.10 --- tcGameObject.h 30 Jan 2004 01:02:34 -0000 1.11 *************** *** 108,112 **** virtual void DesignateDatum(tcPoint p) {} virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher) {} ! virtual void DesignateLauncherTarget(tnPoolIndex anID, unsigned anLauncher) {} virtual void DesignateTarget(long anID) {} virtual void GetDatum(tsGeoPoint& p) {} --- 108,112 ---- virtual void DesignateDatum(tcPoint p) {} virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher) {} ! virtual bool DesignateLauncherTarget(tnPoolIndex anID, unsigned anLauncher) {return false;} virtual void DesignateTarget(long anID) {} virtual void GetDatum(tsGeoPoint& p) {} Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcLauncherState.h 29 Jan 2004 00:05:17 -0000 1.3 --- tcLauncherState.h 30 Jan 2004 01:02:34 -0000 1.4 *************** *** 37,40 **** --- 37,42 ---- using namespace Database; + class tcGameObject; + class tcSimState; class tcRadar; *************** *** 66,73 **** --- 68,78 ---- { public: + tcGameObject *parent; int mnCount; std::vector<tsLData> launchers; ///< vector of launcher state info static tcDatabase *mpDatabase; + static void AttachSimState(tcSimState* ss) {simState = ss;} + void AddFullLauncher(tcDatabase *pDatabase, tnPoolIndex anKey, float azimuth_rad); int GetLauncherQuantity(unsigned anLauncher); *************** *** 75,82 **** --- 80,96 ---- bool IsDatumLaunch(unsigned anLauncher); bool IsSeekerLaunch(unsigned anLauncher); + bool ReadyToLaunch(unsigned nLauncher); void Serialize(tcFile& file, bool abLoad); + void SetFireControlSensor(unsigned nLauncher, tcRadar* radar); + bool SetLauncherDatum(unsigned nLauncher, double lon_rad, double lat_rad); + bool SetLauncherTarget(unsigned nLauncher, long targetID); + void SetParent(tcGameObject *obj) {parent = obj;} tcLauncherState(); + tcLauncherState(tcGameObject *parentObj); tcLauncherState(tcLauncherState&); ~tcLauncherState(); + + private: + static tcSimState *simState; }; #endif \ No newline at end of file Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcPlatformObject.h 29 Jan 2004 00:05:17 -0000 1.7 --- tcPlatformObject.h 30 Jan 2004 01:02:34 -0000 1.8 *************** *** 57,61 **** virtual void DesignateDatum(tcPoint p); virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher); ! virtual void DesignateLauncherTarget(tnPoolIndex anID, unsigned anLauncher); virtual void DesignateTarget(long anID) {mcAI.SetTarget(anID);} virtual void GetDatum(tsGeoPoint& p) {p=msTargetDatum;} --- 57,61 ---- virtual void DesignateDatum(tcPoint p); virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher); ! virtual bool DesignateLauncherTarget(tnPoolIndex anID, unsigned anLauncher); virtual void DesignateTarget(long anID) {mcAI.SetTarget(anID);} virtual void GetDatum(tsGeoPoint& p) {p=msTargetDatum;} *************** *** 90,93 **** --- 90,94 ---- virtual void ApplyRestrictions(void); + virtual void SetFireControlSensors(); virtual void Move(float dt_s); virtual void UpdateClimb(float dt_s) {}; Index: tcRadarSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadarSensorState.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcRadarSensorState.h 29 Jan 2004 00:05:17 -0000 1.3 --- tcRadarSensorState.h 30 Jan 2004 01:02:34 -0000 1.4 *************** *** 42,50 **** class tcGameObject; class tcRadar : public tcSensorState { public: tcRadarDBObject *mpDBObj; ! unsigned int fireControlTracks; virtual bool CanDetectTarget(const tcGameObject* target, float& range_km); --- 42,62 ---- class tcGameObject; + /** + * Class to handle surveillance, fire control, and seeker radars. + * May want to break this up use derived classes for detailed + * functions. + * + */ class tcRadar : public tcSensorState { public: tcRadarDBObject *mpDBObj; ! ! // fire-control vars ! unsigned int fireControlTrackCount; ! ! // semi-active and command mode vars ! long illuminatorID; ///< id of SA illuminating platform ! unsigned illuminatorSensorIdx; ///< sensor index of illum platform virtual bool CanDetectTarget(const tcGameObject* target, float& range_km); *************** *** 56,59 **** --- 68,73 ---- virtual bool ReleaseTrack(); + virtual void SetIlluminator(long illum_id, unsigned sensor_idx); + void Serialize(tcFile& file, bool mbLoad); *************** *** 62,65 **** --- 76,82 ---- tcRadar(); virtual ~tcRadar(); + + protected: + bool isSemiactive; }; |