[Gcblue-commits] gcb_wx/include/sim tcGameObject.h,1.40,1.41 tcHeloObject.h,1.2,1.3 tcMapData.h,1.11
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-28 02:51:32
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6326/include/sim Modified Files: tcGameObject.h tcHeloObject.h tcMapData.h tcMissileObject.h tcObjectControl.h tcSensorMapTrack.h tcSensorPlatform.h tcSensorState.h tcSonar.h tcSubObject.h tcSurfaceObject.h tcTorpedoObject.h Log Message: Index: tcSubObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSubObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcSubObject.h 25 Jun 2005 22:09:47 -0000 1.5 --- tcSubObject.h 28 Jun 2005 02:51:20 -0000 1.6 *************** *** 57,60 **** --- 57,61 ---- bool GetPeriscopeState() const; bool GetRadarMastState() const; + virtual float GetSonarSourceLevel() const; bool IsAtPeriscopeDepth() const; bool IsSurfaced() const; Index: tcTorpedoObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcTorpedoObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcTorpedoObject.h 1 Jun 2005 00:13:28 -0000 1.4 --- tcTorpedoObject.h 28 Jun 2005 02:51:20 -0000 1.5 *************** *** 27,35 **** #define _TCTORPEDOOBJECT_H_ #include "tcWeaponObject.h" #include "tcGuidanceState.h" #include "tcSonar.h" - class tcUpdateStream; --- 27,35 ---- #define _TCTORPEDOOBJECT_H_ + #include "tcSensorPlatform.h" #include "tcWeaponObject.h" #include "tcGuidanceState.h" #include "tcSonar.h" class tcUpdateStream; *************** *** 44,48 **** * @see tcGameObject */ ! class tcTorpedoObject : public tcWeaponObject { public: --- 44,48 ---- * @see tcGameObject */ ! class tcTorpedoObject : public tcWeaponObject, public tcSensorPlatform { public: *************** *** 75,79 **** bool isWireActive; // true if wire is available to receive remote commands ! tcSonar seeker; float battery_kJ; ///< current battery charge --- 75,79 ---- bool isWireActive; // true if wire is available to receive remote commands ! tcSonar* seeker; float battery_kJ; ///< current battery charge *************** *** 93,96 **** --- 93,97 ---- virtual void SetSpeed(float newSpeed); virtual tcSonar* GetSensorState(); + virtual float GetSonarSourceLevel() const; virtual void DesignateTarget(long anID); virtual int GetGuidanceParameters(tsGuidanceParameters& gp); Index: tcMapData.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMapData.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcMapData.h 22 Jun 2005 01:21:27 -0000 1.11 --- tcMapData.h 28 Jun 2005 02:51:20 -0000 1.12 *************** *** 126,129 **** --- 126,131 ---- float GetTerrainHeightLowRes(float afLon_deg, float afLat_deg); void GetTheaterArea(tcGeoRect& r) {r = mrTheaterView;} + float GetTheaterHeightDeg() const; + float GetTheaterWidthDeg() const; void GetWorldArea(tcGeoRect& r) {r = mrWorldView;} void GetTheaterData(short*& rpData, unsigned& anM, unsigned& anN) Index: tcHeloObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcHeloObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcHeloObject.h 31 Jan 2005 01:32:36 -0000 1.2 --- tcHeloObject.h 28 Jun 2005 02:51:20 -0000 1.3 *************** *** 41,44 **** --- 41,45 ---- virtual void UpdateClimb(float dt_s); + void UpdateDestroyed(double t); virtual void UpdateSpeed(float dt_s); virtual void Update(double afStatusTime); Index: tcObjectControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcObjectControl.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcObjectControl.h 25 Jun 2005 22:09:47 -0000 1.17 --- tcObjectControl.h 28 Jun 2005 02:51:20 -0000 1.18 *************** *** 46,49 **** --- 46,50 ---- class tcControl; class tcCommandQueue; + class tcPopupText; namespace osg *************** *** 166,169 **** --- 167,172 ---- const std::vector<MapSymbolInfo>& GetMapSymbols() const; void SetHookID(tnPoolIndex anID) {mnHookID=anID;} + void OnEnterWindow(wxMouseEvent& event); + void OnLeaveWindow(wxMouseEvent& event); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); *************** *** 198,202 **** std::vector<tcControl*> controls; tcControl* altitudeControl; ! void AddSensorRangeCircles(); --- 201,211 ---- std::vector<tcControl*> controls; tcControl* altitudeControl; ! bool isMouseOver; ///< true if mouse is over window ! wxPoint lastMousePos; ///< last mouse position ! unsigned int lastMoveTime; ///< tcTime time of last mouse move (for timing "tooltip" popup) ! bool hintActive; ///< true to display hint text ! std::string hintText; ///< text to display for popup "tooltip" hint ! const unsigned int hintDelay; ///< time in 30Hz tics to wait to popup hint ! tcPopupText* popupHint; void AddSensorRangeCircles(); *************** *** 219,222 **** --- 228,232 ---- void SetControlGameObject(tcGameObject* obj); void UpdateControlObjects(); + void UpdateHint(); void UpdateSymbolList(); void GetObjectInfo(tcString& s, tcDatabaseObject *apDBObject, tcGameObject *apGameObject); Index: tcSensorMapTrack.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMapTrack.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorMapTrack.h 1 Jun 2005 00:13:28 -0000 1.2 --- tcSensorMapTrack.h 28 Jun 2005 02:51:20 -0000 1.3 *************** *** 145,150 **** tc3DModel* GetModel() const; void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} bool IsDestroyed() const; bool IsStale() const; --- 145,152 ---- tc3DModel* GetModel() const; void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() const {return this;} ! void IdentifyTrack(long id); ! bool IsIdentified() const; ! bool IsNew() const; bool IsDestroyed() const; bool IsStale() const; Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** tcGameObject.h 22 Jun 2005 01:21:27 -0000 1.40 --- tcGameObject.h 28 Jun 2005 02:51:20 -0000 1.41 *************** *** 161,164 **** --- 161,165 ---- virtual void GetLauncherState(tcLauncherState*& pLauncherState) {pLauncherState = NULL;} virtual tcLauncher* GetLauncher(unsigned idx) {return 0;} + virtual float GetSonarSourceLevel() const; float GetSpan() const; float GetTerrainElevation() {return mcTerrain.mfHeight_m;} Index: tcMissileObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMissileObject.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcMissileObject.h 22 Jun 2005 01:21:27 -0000 1.19 --- tcMissileObject.h 28 Jun 2005 02:51:20 -0000 1.20 *************** *** 29,32 **** --- 29,33 ---- #include "tcGuidanceState.h" #include "tcRadar.h" + #include "tcSensorPlatform.h" *************** *** 38,42 **** * @see tcGameObject */ ! class tcMissileObject : public tcWeaponObject { public: --- 39,43 ---- * @see tcGameObject */ ! class tcMissileObject : public tcWeaponObject, public tcSensorPlatform { public: *************** *** 55,59 **** float mfRangeToObjective_km; // for segment determination UINT mnCurrentSegment; ! tcSensorState* sensor; ///< missile seeker Aero::tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj --- 56,60 ---- float mfRangeToObjective_km; // for segment determination UINT mnCurrentSegment; ! Aero::tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj Index: tcSonar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonar.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSonar.h 1 Jun 2005 00:13:28 -0000 1.4 --- tcSonar.h 28 Jun 2005 02:51:20 -0000 1.5 *************** *** 60,64 **** void Serialize(tcFile& file, bool mbLoad); ! bool IsPassive() const; virtual bool IsRadar() const; virtual bool IsSonar() const; --- 60,64 ---- void Serialize(tcFile& file, bool mbLoad); ! bool IsPassive() const; ///< Warning: don't confuse with !tcSensorState::IsActive() virtual bool IsRadar() const; virtual bool IsSonar() const; *************** *** 79,83 **** --- 79,85 ---- protected: bool isPassive; + float scope_m; ///< [m] scope of towed array + void UpdateScope(double t); void UpdateSeeker(double t); void UpdateSensorMapActive(double t, const tcGameObject* target, float range_km); Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcSensorState.h 22 Jun 2005 01:21:27 -0000 1.19 --- tcSensorState.h 28 Jun 2005 02:51:20 -0000 1.20 *************** *** 49,52 **** --- 49,53 ---- class tcGameObject; class tcUpdateStream; + class tcSensorPlatform; /** *************** *** 58,61 **** --- 59,63 ---- short int mbActive; tcGameObject* parent; + tcSensorPlatform* sensorPlatform; ///< parent should always be a sensor plat, this is a down-cast for convenience long mnDBKey; tcSensorDBObject* mpDBObj; *************** *** 96,100 **** virtual void SetFireControlSensor(long id, unsigned char idx); void SetMountAz(float az); ! void SetParent(tcGameObject *obj) {parent = obj;} virtual void Update(double t); int UpdateScan(double afTime); --- 98,102 ---- virtual void SetFireControlSensor(long id, unsigned char idx); void SetMountAz(float az); ! void SetParent(tcGameObject* obj); virtual void Update(double t); int UpdateScan(double afTime); Index: tcSensorPlatform.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorPlatform.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcSensorPlatform.h 22 Jun 2005 01:21:27 -0000 1.4 --- tcSensorPlatform.h 28 Jun 2005 02:51:20 -0000 1.5 *************** *** 40,43 **** --- 40,44 ---- class tcUpdateStream; class tcGameObject; + class tcSonar; namespace database *************** *** 55,58 **** --- 56,64 ---- { public: + enum + { + RADAR_ACTIVE = 1, + ACTIVE_SONAR_ACTIVE = 2 + }; std::vector<tcSensorState*> sensorState; *************** *** 62,72 **** unsigned int GetSensorCount() const; bool HasActivatedSensor(); bool IsRadiating() const; const tcSensorState* GetSensor(unsigned idx) const; wxString GetSensorDescription(); ! tcSensorState* GetSensorMutable(unsigned idx); ! tcSensorState* GetSensorMutable(const std::string& sensorClass); ! void Init(tcSensorPlatformDBObject* obj, tcGameObject* parent); void SetSensorState(unsigned idx, bool state); --- 68,81 ---- unsigned int GetSensorCount() const; bool HasActivatedSensor(); + bool IsEnsonifying() const; bool IsRadiating() const; const tcSensorState* GetSensor(unsigned idx) const; wxString GetSensorDescription(); ! tcSensorState* GetSensorMutable(unsigned idx) const; ! tcSensorState* GetSensorMutable(const std::string& sensorClass) const; ! const tcSonar* GetStrongestActiveSonar() const; void Init(tcSensorPlatformDBObject* obj, tcGameObject* parent); + void Init(const char* databaseClass, tcGameObject* parent); + void SetActivityFlag(unsigned int flag); void SetSensorState(unsigned idx, bool state); *************** *** 92,99 **** --- 101,111 ---- tcSensorPlatform(tcSensorPlatform&); tcSensorPlatform(tcSensorPlatformDBObject* obj, tcGameObject* parent); + tcSensorPlatform(const char* databaseClass, tcGameObject* parent); virtual ~tcSensorPlatform(); protected: + unsigned int sensorActivityFlags; ///< flags for faster check of activity state of diff sensor types + void ClearActivityFlags(); }; Index: tcSurfaceObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSurfaceObject.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcSurfaceObject.h 1 Jun 2005 00:13:28 -0000 1.11 --- tcSurfaceObject.h 28 Jun 2005 02:51:20 -0000 1.12 *************** *** 1,20 **** /** ! * Copyright (C) 2003 Dewitt Colclough (de...@tw...) ! * All rights reserved. ! * ! * This file is part of the Global Conflict Blue (GCB) program. ! * GCB is free software; you can redistribute it and/or modify ! * it under the terms of version 2 of the GNU General Public License as ! * published by the Free Software Foundation. ! * ! * GCB is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with GCB; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ #if _MSC_VER > 1000 --- 1,20 ---- /** ! * Copyright (C) 2003 Dewitt Colclough (de...@tw...) ! * All rights reserved. ! * ! * This file is part of the Global Conflict Blue (GCB) program. ! * GCB is free software; you can redistribute it and/or modify ! * it under the terms of version 2 of the GNU General Public License as ! * published by the Free Software Foundation. ! * ! * GCB is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with GCB; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ #if _MSC_VER > 1000 *************** *** 31,71 **** namespace database { ! class tcGenericDBObject; } /** ! * Represents a platform that resides on the water's surface. ! * ! * @see tcPlatformObject ! */ class tcSurfaceObject : public tcPlatformObject { public: ! tcEngagementData mcEngagementData; ! tcGenericDBObject *mpDBObject; ! ! virtual void Clear(); ! virtual bool IsDestroyed(); ! virtual void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void Update(double afStatusTime); ! virtual void UpdateEffects(); ! virtual void UpdateHeading(float dt_s); ! void PrintToFile(tcFile& file); ! void SaveToFile(tcFile& file); ! void LoadFromFile(tcFile& file); ! virtual void Serialize(tcFile& file, bool mbLoad); ! tcSurfaceObject(); ! tcSurfaceObject(tcSurfaceObject&); ! tcSurfaceObject(tcGenericDBObject *obj); ! ~tcSurfaceObject(); protected: ! virtual void ApplyRestrictions(void); ! virtual void UpdateClimb(float dt_s) {} // do nothing for surface objs ! virtual void UpdateDestroyed(double t); ! bool doneSinking; }; --- 31,73 ---- namespace database { ! class tcGenericDBObject; } /** ! * Represents a platform that resides on the water's surface. ! * ! * @see tcPlatformObject ! */ class tcSurfaceObject : public tcPlatformObject { public: ! tcEngagementData mcEngagementData; ! tcGenericDBObject *mpDBObject; ! virtual void Clear(); ! virtual float GetSonarSourceLevel() const; ! virtual bool IsDestroyed(); ! virtual void RandInitNear(float afLon_deg, float afLat_deg); ! virtual void Update(double afStatusTime); ! virtual void UpdateEffects(); ! virtual void UpdateHeading(float dt_s); ! ! void PrintToFile(tcFile& file); ! void SaveToFile(tcFile& file); ! void LoadFromFile(tcFile& file); ! virtual void Serialize(tcFile& file, bool mbLoad); ! ! tcSurfaceObject(); ! tcSurfaceObject(tcSurfaceObject&); ! tcSurfaceObject(tcGenericDBObject *obj); ! ~tcSurfaceObject(); protected: ! virtual void ApplyRestrictions(void); ! virtual void UpdateClimb(float dt_s) {} // do nothing for surface objs ! virtual void UpdateDestroyed(double t); ! bool doneSinking; }; |