[Gcblue-commits] gcb_wx/include/sim commandlist.h,1.8,1.9 tcCommandQueue.h,1.2,1.3 tcGameObject.h,1.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-11-27 22:21:37
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6732/include/sim Modified Files: commandlist.h tcCommandQueue.h tcGameObject.h tcRadar.h Log Message: - Added waypoint drag edit feature to gui. User can adjust waypoints on map screen by clicking and dragging - Fixed sound disable to include music. Previously sound failure would disable sound effects, but then play music leading to a crash. - Added random feature targeting to missiles. Missiles should now lock on to a random feature of the target instead of always hitting the center. Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** tcGameObject.h 28 Jun 2005 02:51:20 -0000 1.41 --- tcGameObject.h 27 Nov 2005 22:21:28 -0000 1.42 *************** *** 120,123 **** --- 120,125 ---- float BearingTo(tcGameObject& p) const; float BearingToRad(tcGameObject& p) const; + bool CalculateCollisionPoint(tcGameObject* collider, osg::Vec3& pos, float& dt); + osg::Vec3 ConvertModelCoordinatesToWorld(const osg::Vec3& x) const; void AddChild(tcGameObject *child); tcGameObject* GetChildById(long id) const; *************** *** 127,130 **** --- 129,135 ---- virtual void ClearChildren(void); void GetRelPosOf(tcGameObject *obj, tsRelativePosition& rel_pos); + void GetRelativeStateLocal(tcGameObject *obj, osg::Vec3& position, osg::Vec3& velocity); + void GetRelativeStateWorld(tcGameObject *obj, osg::Vec3& position, osg::Vec3& velocity); + osg::Vec3 GetWorldVelocity() const; virtual void RandInitNear(float afLon_deg, float afLat_deg); GeoPoint RelPosToLatLonAlt(const tsRelativePosition& rel_pos) const; Index: tcCommandQueue.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcCommandQueue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcCommandQueue.h 10 Jan 2005 00:30:21 -0000 1.2 --- tcCommandQueue.h 27 Nov 2005 22:21:28 -0000 1.3 *************** *** 50,54 **** void AddPythonCommand(const char *azCommand, int param = -1); ! void AddPythonCommand(const char *azCommand, std::string textParam); void GetUserInput(const char *azCallback, const char *azUserInput, int param = -1) ; --- 50,56 ---- void AddPythonCommand(const char *azCommand, int param = -1); ! void AddPythonCommand(const char *azCommand, const std::string& textParam); ! ! void AddPythonCommandGeneral(const std::string& command, const std::string& args, const std::vector<long>& platformID); void GetUserInput(const char *azCallback, const char *azUserInput, int param = -1) ; *************** *** 78,93 **** - - - - - - - - - - - - - #endif \ No newline at end of file --- 80,83 ---- + #endif Index: commandlist.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/commandlist.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** commandlist.h 10 Sep 2005 21:48:06 -0000 1.8 --- commandlist.h 27 Nov 2005 22:21:28 -0000 1.9 *************** *** 62,65 **** --- 62,76 ---- }; + /** + * + */ + enum CommandType + { + GAME_COMMAND = 0, + PYTHON_CALLBACK = 1, // replaces mbUsePython && mbCallback + PYTHON_USERINPUT = 2, // replaces mbUsePython && mbGetUserInput + PYTHON_COMMAND_TEXT = 3, ///< command with single text parameter + PYTHON_COMMAND_GENERAL = 4 ///< command with general parameter string + }; /** *************** *** 68,71 **** --- 79,83 ---- struct tsCommandInfo { + CommandType commandType; teGameCommand meCmd; float mfData; *************** *** 74,80 **** char mzString[256]; char mzUserInput[64]; ///< Heading, Target, Datum - bool mbUsePython; - bool mbCallback; - bool mbGetUserInput; std::string textParam; ///< string parameter for python std::vector<long> platformID; ///< -1 or empty to use current hooked --- 86,89 ---- Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcRadar.h 22 Jun 2005 01:21:27 -0000 1.16 --- tcRadar.h 27 Nov 2005 22:21:28 -0000 1.17 *************** *** 101,105 **** --- 101,109 ---- bool isSemiactive; bool isCommandReceiver; + float last_range_km; ///< [km] target range from last call to CanDetectTarget + float target_x_offset_m; ///< offset for seeker target point in model coords + float target_y_offset_m; ///< may want to move params like this to a seeker derived class + void AdjustTrackForFineTargeting(const tcGameObject* target); void UpdateSeeker(double t); void UpdateSensorMap(double t, const tcGameObject* target, float range_km); |