[Gcblue-commits] gcb_wx/include/graphics ObjectUpdater.h,1.6,1.7 tc3DModel.h,1.8,1.9 tc3DViewer.h,1.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-11-06 15:14:36
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31472/include/graphics Modified Files: ObjectUpdater.h tc3DModel.h tc3DViewer.h tcHookInfo.h tcScenarioSelectView.h Log Message: Added optical sensor model, fixed generic model display for sensor tracks Index: tcHookInfo.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcHookInfo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcHookInfo.h 29 Oct 2004 02:50:43 -0000 1.3 --- tcHookInfo.h 6 Nov 2004 15:13:40 -0000 1.4 *************** *** 77,82 **** tcOptions *mpOptions; tcUserInfo *mpUserInfo; tnPoolIndex mnHookID; ! //Gdiplus::Pen *mpPen; // GDI+ objects --- 77,84 ---- tcOptions *mpOptions; tcUserInfo *mpUserInfo; + tcDatabase* database; tnPoolIndex mnHookID; ! unsigned int ambiguityIdx; ///< index to cycle display of large numbers of ambiguous platforms ! unsigned int lastCycleCount; ///< time of last update of cycle display //Gdiplus::Pen *mpPen; // GDI+ objects Index: tc3DModel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DModel.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tc3DModel.h 6 Sep 2004 01:08:03 -0000 1.8 --- tc3DModel.h 6 Nov 2004 15:13:40 -0000 1.9 *************** *** 1,5 **** ! /** @file tc3DModel.h */ ! /* ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tc3DModel.h ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 70,73 **** --- 71,83 ---- { public: + enum + { + USE_TRUE_MODEL = 0, + USE_UNKNOWN_GENERIC = 1, + USE_AIR_GENERIC = 2, + USE_LAND_GENERIC = 3, + USE_SURFACE_GENERIC = 4, + DISABLE_MODEL = 5 + }; std::vector<tcAnimationInfo> animationInfo; ///< animation transforms to update at model level void AddChild(tc3DModel *child); *************** *** 79,82 **** --- 89,93 ---- unsigned int GetNumParents(); float GetRadius(); + float GetRadiusGeneric(); bool IsSmokeEnabled() const {return smokeTrail.valid();} void Load(std::string model_name); *************** *** 84,87 **** --- 95,99 ---- void SetupAnimation(tcGameObject *obj); void SetDistanceFromCamera(float distance) {distanceFromCamera = distance;} + void SetGenericMode(int mode); void SetSmokeMode(int mode) {smokeMode = mode;} void SetupUpdate(tcGameObject *obj); *************** *** 93,96 **** --- 105,109 ---- ~tc3DModel(); + static void LoadUnknowns(); static void SetWorldFrame(osg::Group* worldFrame) {world = worldFrame;} *************** *** 101,112 **** int smokeMode; ! osg::ref_ptr<osg::LOD> modelGroup; ///< top level group for model, not shared osg::ref_ptr<osg::MatrixTransform> modelTransform; ///< positions object in world, not shared osg::ref_ptr<osg::Node> modelNode; ///< shared between instances of model static osg::ref_ptr<osg::Group> world; tcGameObject *gameObj; ///< game object to use to update model state ! bool useSmoothing; float distanceFromCamera; void DisableSmoke(); --- 114,135 ---- int smokeMode; ! osg::ref_ptr<osg::Switch> root; ///< top level group for model ! osg::ref_ptr<osg::LOD> modelGroup; ///< top level group for (identified) model, not shared osg::ref_ptr<osg::MatrixTransform> modelTransform; ///< positions object in world, not shared osg::ref_ptr<osg::Node> modelNode; ///< shared between instances of model static osg::ref_ptr<osg::Group> world; + /// models for unidentified platforms + static osg::ref_ptr<osg::Node> unknownAll; + static osg::ref_ptr<osg::Node> unknownAir; + static osg::ref_ptr<osg::Node> unknownLand; + static osg::ref_ptr<osg::Node> unknownSurface; + static bool useSmoothing; + + tcGameObject *gameObj; ///< game object to use to update model state ! float distanceFromCamera; + int genericMode; void DisableSmoke(); Index: tcScenarioSelectView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcScenarioSelectView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcScenarioSelectView.h 2 Oct 2004 22:41:32 -0000 1.2 --- tcScenarioSelectView.h 6 Nov 2004 15:13:40 -0000 1.3 *************** *** 90,94 **** bool Init(); void Draw(); ! void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); --- 90,94 ---- bool Init(); void Draw(); ! void LoadScenario(std::string filePath, std::string caption); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); *************** *** 127,131 **** void DrawScenarioDirectory(std::vector<scenarioInfo>& info); wxArrayString GetListOfScenarioFiles(); - void LoadScenario(std::string filePath, std::string caption); void LogScenarioInfo(std::vector<scenarioInfo>& info, int level); bool ProcessMouseClick(std::vector<scenarioInfo>& info, wxPoint pos); --- 127,130 ---- Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DViewer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tc3DViewer.h 21 Oct 2004 04:10:58 -0000 1.3 --- tc3DViewer.h 6 Nov 2004 15:13:40 -0000 1.4 *************** *** 92,96 **** virtual void OnSize(wxSizeEvent& event); void AttachMapData(tcMapData *pMapData); ! void AttachSimState(tcSimState *ss) {simState = ss;} void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame --- 92,96 ---- virtual void OnSize(wxSizeEvent& event); void AttachMapData(tcMapData *pMapData); ! void AttachSimState(tcSimState *ss); void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame Index: ObjectUpdater.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/ObjectUpdater.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ObjectUpdater.h 11 Apr 2004 21:09:52 -0000 1.6 --- ObjectUpdater.h 6 Nov 2004 15:13:40 -0000 1.7 *************** *** 1,2 **** --- 1,22 ---- + /** + ** @file ObjectUpdater.h + */ + /* 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 + */ #ifndef __ObjectUpdater_h__ *************** *** 7,12 **** class tc3DModel; class tc3DViewer; ! ! using namespace osg; /** --- 27,39 ---- class tc3DModel; class tc3DViewer; ! class tcSimState; ! namespace Sensor ! { ! class tcSensorMap; ! } ! using Sensor::tcSensorMap; ! using osg::Node; ! using osg::NodeCallback; ! using osg::NodeVisitor; /** *************** *** 19,25 **** { public: ! bool useRelativeChildPos; /** implements the callback*/ virtual void operator()(Node* node, NodeVisitor* nv); static void AttachViewer(tc3DViewer *v) {viewer = v;} --- 46,53 ---- { public: ! /** implements the callback*/ virtual void operator()(Node* node, NodeVisitor* nv); + static void AttachSimState(tcSimState* ss) {simState = ss;} static void AttachViewer(tc3DViewer *v) {viewer = v;} *************** *** 29,37 **** private: ! static tc3DViewer *viewer; tc3DModel *model; ///< tc3DModel has method to access sim tcGameObject float distanceFromCamera; ///< model distance from camera, calculated by update ! void UpdateAnimations(); }; --- 57,71 ---- private: ! static tc3DViewer* viewer; ! static tcSimState* simState; ! static tcSensorMap* sensorMap; ! tc3DModel *model; ///< tc3DModel has method to access sim tcGameObject float distanceFromCamera; ///< model distance from camera, calculated by update ! void UpdateAnimations(); ! void UpdateTrack(Node* node); ! void UpdateTrue(Node* node); ! }; |