[Gcblue-commits] gcb_wx/include/sim Game.h,1.22,1.23 tc3DViewer.h,1.21,1.22
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-01-20 03:02:56
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1:/tmp/cvs-serv12457/include/sim Modified Files: Game.h tc3DViewer.h Log Message: Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Game.h 5 Jan 2004 02:48:02 -0000 1.22 --- Game.h 20 Jan 2004 03:02:52 -0000 1.23 *************** *** 139,142 **** --- 139,143 ---- int mnLeftMargin; // width of left auxiliary windows int mnBottomMargin; // height of bottom aux windows + wxGLCanvas *glCanvas; tcSoundConsole *infoConsole; ///< console object for info messages tcButtonConsole *briefingConsoleLeft; ///< console object for briefing text Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tc3DViewer.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tc3DViewer.h 18 Jan 2004 18:42:41 -0000 1.21 --- tc3DViewer.h 20 Jan 2004 03:02:52 -0000 1.22 *************** *** 28,39 **** #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include <osg/NodeVisitor> #include <osgUtil/Optimizer> #include <osgText/Text> - #include <Producer/Math> - #include <Producer/Referenced> #include "cspDate.h" - class tcRenderSurface; class tcSimState; class tcGameObject; --- 28,38 ---- #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions + #include <osg/FrameStamp> #include <osg/NodeVisitor> + #include <osgUtil/SceneView> #include <osgUtil/Optimizer> #include <osgText/Text> #include "cspDate.h" class tcSimState; class tcGameObject; *************** *** 41,59 **** class tc3DSky; class tcMapData; - - namespace Producer - { - class Camera; - class CameraConfig; - class CameraGroup; - } - - namespace osgProducer - { - class OsgCameraGroup; - } class Sky; ! ! using namespace Producer; --- 40,45 ---- class tc3DSky; class tcMapData; class Sky; ! class wxGLCanvas; *************** *** 61,69 **** { public: ! Producer::ref_ptr<tcRenderSurface> render_surface; ! Producer::ref_ptr<Producer::Camera> camera; ! Producer::ref_ptr<Producer::CameraConfig> camera_config; ! osg::ref_ptr<osgProducer::OsgCameraGroup> camera_group; osg::ref_ptr<osg::NodeVisitor> updateVisitor; osg::ref_ptr<osgText::Text> viewerText; ///< text for debug/basic viewer info display osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform --- 47,58 ---- { public: ! // Producer::ref_ptr<tcRenderSurface> render_surface; ! //Producer::ref_ptr<Producer::Camera> camera; ! //Producer::ref_ptr<Producer::CameraConfig> camera_config; ! //osg::ref_ptr<osgProducer::OsgCameraGroup> camera_group; ! osg::ref_ptr<osgUtil::SceneView> sceneView; ! osg::ref_ptr<osg::DisplaySettings> displaySettings; osg::ref_ptr<osg::NodeVisitor> updateVisitor; + osg::ref_ptr<osg::FrameStamp> frameStamp; osg::ref_ptr<osgText::Text> viewerText; ///< text for debug/basic viewer info display osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform *************** *** 103,112 **** void CreateSky(); void CreateTestGraph(); - void DirtyAll(); void Frame(); void Freeze(); ! Producer::Vec3 GetCameraPosition(); double GetGameTime() const {return gameTime;} ! Producer::Vec3 GetObjectPosition(tcGameObject *obj); bool IsActive() {return isActive;} void LoadModel(tcGameObject *obj); --- 92,100 ---- void CreateSky(); void CreateTestGraph(); void Frame(); void Freeze(); ! osg::Vec3 GetCameraPosition(); double GetGameTime() const {return gameTime;} ! osg::Vec3 GetObjectPosition(tcGameObject *obj); bool IsActive() {return isActive;} void LoadModel(tcGameObject *obj); *************** *** 120,123 **** --- 108,112 ---- void SetPolarOffset(float az, float el, float range); void SetText(const char *s); + void Swap(); void ToggleFog(); void ToggleWireframe(); *************** *** 129,133 **** ! tc3DViewer(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "tc3DViewer"); --- 118,122 ---- ! tc3DViewer(wxGLCanvas *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "tc3DViewer"); *************** *** 135,138 **** --- 124,128 ---- private: + wxGLCanvas *glCanvas; bool isFrozen; ///< set true if window has been frozen bool isActive; *************** *** 151,154 **** --- 141,146 ---- float shiftDistance; ///< reset origin if camera distance from origin exceeds this double gameTime; ///< current game time [s] + float zmin; ///< depth buffer limits + float zmax; // camera parameters *************** *** 159,165 **** double cameraLatitude; ///< radians float cameraAltitude; ///< meters ! Producer::Vec3 cameraPosition; ///< current position of camera ! Producer::Vec3 cameraPositionOffset; ///< current position offset of camera rel to target, for moveWith ! Producer::Vec3 cameraTarget; ///< point camera is looking at for lookAt modes float cameraAz; ///< camera azimuth relative to target for moveWith modes float cameraEl; ///< camera elevation relative to target for moveWith modes --- 151,157 ---- double cameraLatitude; ///< radians float cameraAltitude; ///< meters ! osg::Vec3 cameraPosition; ///< current position of camera ! osg::Vec3 cameraPositionOffset; ///< current position offset of camera rel to target, for moveWith ! osg::Vec3 cameraTarget; ///< point camera is looking at for lookAt modes float cameraAz; ///< camera azimuth relative to target for moveWith modes float cameraEl; ///< camera elevation relative to target for moveWith modes *************** *** 173,177 **** void InitLight(); ! void InitSceneView(); void InitState(); void InitText(); --- 165,169 ---- void InitLight(); ! void InitSceneView(wxPoint pos, wxSize size); void InitState(); void InitText(); *************** *** 179,184 **** void UpdateCamera(); void UpdateChildModels(tcGameObject *gameObj); ! void UpdateOrigin(); void UpdateModels(); void UpdateSky(DateZulu& dateZulu); --- 171,177 ---- void UpdateCamera(); void UpdateChildModels(tcGameObject *gameObj); ! bool UpdateOrigin(); void UpdateModels(); + void UpdateProjectionMatrix(const wxSize& windowSize); void UpdateSky(DateZulu& dateZulu); |