[Gcblue-commits] gcb_wx/src/graphics ObjectUpdater.cpp,1.17,1.18 cspSky.cpp,1.13,1.14 tc3DModel.cpp,
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:14
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/graphics Modified Files: ObjectUpdater.cpp cspSky.cpp tc3DModel.cpp tc3DViewer.cpp tc3DWindow.cpp tcButton.cpp tcDisplaySettingsView.cpp tcGameView.cpp tcHookInfo.cpp tcMapObject.cpp tcMapView.cpp tcOOBView.cpp tcPopupControl.cpp tcTerrainView.cpp tcXmlWindow.cpp Log Message: namespace housekeeping Index: tc3DModel.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DModel.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tc3DModel.cpp 17 May 2005 00:20:40 -0000 1.25 --- tc3DModel.cpp 1 Jun 2005 00:13:30 -0000 1.26 *************** *** 53,57 **** #endif - using Sensor::tcSensorMapTrack; // started with CSP ModelProcessor class --- 53,56 ---- Index: ObjectUpdater.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/ObjectUpdater.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ObjectUpdater.cpp 17 May 2005 00:20:40 -0000 1.17 --- ObjectUpdater.cpp 1 Jun 2005 00:13:30 -0000 1.18 *************** *** 41,45 **** tc3DViewer* ObjectUpdater::viewer = 0; tcSimState* ObjectUpdater::simState = 0; ! Sensor::tcSensorMap* ObjectUpdater::sensorMap = 0; --- 41,45 ---- tc3DViewer* ObjectUpdater::viewer = 0; tcSimState* ObjectUpdater::simState = 0; ! tcSensorMap* ObjectUpdater::sensorMap = 0; Index: tcHookInfo.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcHookInfo.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcHookInfo.cpp 29 Apr 2005 18:52:53 -0000 1.10 --- tcHookInfo.cpp 1 Jun 2005 00:13:30 -0000 1.11 *************** *** 250,254 **** * drawing methods can draw underneath. */ ! void tcHookInfo::DrawTrackEngaged(const Sensor::tcSensorMapTrack *smtrack, float& x, float& y) { --- 250,254 ---- * drawing methods can draw underneath. */ ! void tcHookInfo::DrawTrackEngaged(const tcSensorMapTrack *smtrack, float& x, float& y) { Index: tcDisplaySettingsView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcDisplaySettingsView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcDisplaySettingsView.cpp 2 Nov 2004 04:23:56 -0000 1.7 --- tcDisplaySettingsView.cpp 1 Jun 2005 00:13:30 -0000 1.8 *************** *** 20,24 **** --- 20,28 ---- */ + #include "stdwx.h" // precompiled header file + + #ifndef WX_PRECOMP #include "wx/wx.h" + #endif #include "wx/string.h" *************** *** 27,30 **** --- 31,35 ---- #include "tcDisplayModes.h" #include "wxcommands.h" + #include "tc3DWindow.h" #ifdef _DEBUG Index: tcMapObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapObject.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcMapObject.cpp 8 May 2005 23:28:58 -0000 1.8 --- tcMapObject.cpp 1 Jun 2005 00:13:30 -0000 1.9 *************** *** 41,45 **** #endif - using MapView::tcMapView; tcMapView* tcMapObject::mapView = NULL; --- 41,44 ---- Index: tcXmlWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcXmlWindow.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcXmlWindow.cpp 2 Nov 2004 04:23:56 -0000 1.5 --- tcXmlWindow.cpp 1 Jun 2005 00:13:31 -0000 1.6 *************** *** 72,75 **** --- 72,101 ---- return; } + + TiXmlElement* elt = root->ToElement(); + + // background image + std::string imageName; + if (const char* s = elt->Attribute("BackgroundImage")) + { + imageName = s; + } + + if (imageName.size() > 2) + { + LoadBackgroundImage(imageName.c_str()); + } + + + int xmlWidth = 0; + int xmlHeight = 0; + elt->Attribute("Width", &xmlWidth); + elt->Attribute("Height", &xmlHeight); + if ((xmlWidth > 0) && (xmlHeight > 0)) + { + wxPoint pos = wxWindow::GetPosition(); + SetSize(pos.x, pos.y, xmlWidth, xmlHeight); // set all size params + } + // add buttons *************** *** 116,121 **** tcXmlWindow::tcXmlWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& configFile, const wxString& name) ! : tc3DWindow(parent, pos, size, name) { if (configFile.length() > 2) --- 142,148 ---- tcXmlWindow::tcXmlWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& configFile, const wxString& name, ! tc3DWindow* graphicsHost) ! : tc3DWindow(parent, pos, size, name, graphicsHost) { if (configFile.length() > 2) Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcOOBView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcOOBView.cpp 27 Jan 2005 01:01:50 -0000 1.7 --- tcOOBView.cpp 1 Jun 2005 00:13:31 -0000 1.8 *************** *** 45,49 **** #endif - using namespace MapView; --- 45,48 ---- *************** *** 158,164 **** void tcOOBView::UpdateTrackData() { - using Sensor::tcSensorMapTrack; - using Sensor::tcSensorTrackIterator; - surfaceTracks.clear(); subTracks.clear(); --- 157,160 ---- Index: tcTerrainView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcTerrainView.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcTerrainView.cpp 16 Apr 2005 20:44:42 -0000 1.6 --- tcTerrainView.cpp 1 Jun 2005 00:13:31 -0000 1.7 *************** *** 38,302 **** ! namespace MapView { ! void tcTerrainView::Draw() ! { ! if (!redraw) return; ! // if displayRegion is wrapped, draw two images ! if (!isWrapped) ! { ! DrawZoomedImage(mapImage.get(), 0, 0, (float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! } ! else ! { ! DrawZoomedImage(mapImage.get(), 0, 0, wrapWidth*(float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! DrawZoomedImage(mapImage.get(), wrapWidth*(float)mnWidth, 0, (1.0f-wrapWidth)*(float)mnWidth, (float)mnHeight, ! displayRegionWrapped, ALIGN_BOTTOM_LEFT); ! } ! FinishDraw(); ! redraw = false; ! } ! void tcTerrainView::GetViewParameters(tsTerrainViewParameters& vp) ! { ! vp.mnSurfaceWidth = mnWidth; ! vp.mnSurfaceHeight = mnHeight; ! vp.mrectDisplay = mrectDisplay; ! vp.mrectGeo = mrectCurrentView; ! } ! /** ! * If the terrain view is minimized always force ! * abActive to false ! */ ! void tcTerrainView::SetActive(bool abActive) ! { ! if (IsWindowMinimized()) ! { ! tc3DWindow::SetActive(false); ! } ! tc3DWindow::SetActive(abActive); ! } ! /** ! * ! */ ! void tcTerrainView::SetDisplayRegion(tcRect& r) ! { ! displayRegion = r; ! } ! /** ! * Sets new view, updating display region of map quad ! */ ! void tcTerrainView::SetView(tcGeoRect r) ! { ! if (mrectCurrentView == r) return; // no change, so return ! mrectCurrentView = r; ! isWrapped = r.left > r.right; ! if (!isWrapped) ! { ! // assumes longitude is within [-pi,pi) and lat within [-pi/2,pi/2] ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = 1.0f; ! } ! else ! { ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = 1.0f; ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.left = 0; ! displayRegionWrapped.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegionWrapped.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = (1.0f - displayRegion.left) / (1.0f - displayRegion.left + displayRegionWrapped.right); ! } ! redraw = true; ! } ! int tcTerrainView::LoadLowResSurface() ! { ! tsMapDataInfo sMDI; ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! /*** Refresh low resolution map surface ***/ ! int width = sMDI.mnLowResWidth; ! int height = sMDI.mnLowResHeight; ! ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); ! mpMapData->GetWorldArea(mrectMap); - unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits != NULL); ! if (mpOptions != NULL) ! { ! mpMapData->CreateMapImage(mpOptions->mnMapMode, 0, pBits); ! } ! else ! { ! fprintf(stderr, "tcTerrainView::LoadLowResSurface - " ! "called without attached options, using default\n"); ! mpMapData->CreateMapImage(1, 0, pBits); ! } ! redraw = true; ! return true; ! } ! int tcTerrainView::LoadHighResSurface() ! { ! tsMapDataInfo sMDI; ! bool mbTextureMaps; ! if (mpOptions != NULL) ! { ! mbTextureMaps = mpOptions->mbTextureMappedMaps == 1; ! } ! else ! { ! mbTextureMaps = true; ! } ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! int width = sMDI.mnHighResWidth; ! int height = sMDI.mnHighResHeight; ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); - mpMapData->GetTheaterArea(mrectMap); - ! unsigned int* pBits = (unsigned int*) image->data(); ! ! wxASSERT(pBits); - mpMapData->CreateMapImage(mpOptions->mnMapMode, 1, pBits); // 1 for high res - - redraw = true; ! return true; ! } ! /** ! * ! */ ! void tcTerrainView::Maximize() ! { ! tc3DWindow::Maximize(); ! redraw = true; ! } ! /** ! * ! */ ! void tcTerrainView::Minimize() ! { ! // tc3DWindow::SetActive(false); ! tc3DWindow::Minimize(); ! redraw = true; ! } ! int tcTerrainView::RefreshSurfaces() ! { ! if (mpMapData == NULL) ! { ! wxMessageBox("tcTerrainView - RefreshSurfaces called with NULL mpMapData"); ! return false; ! } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } - /** - * - */ - int tcTerrainView::CreateSurfaces() - { - if (mpMapData == NULL) - { - wxMessageBox("tcTerrainView - CreateSurfaces called with NULL mpMapData"); - return false; - } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } ! tcTerrainView::tcTerrainView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! bool isHighRes, const wxString& name) ! : ! tc3DWindow(parent, pos, size, name, 0), ! highRes(isHighRes), ! displayRegion(0, 1, 0, 1), ! redraw(true) ! { ! mpMapData = NULL; ! mpOptions = tcOptions::Get(); ! SetResizeable2D(false); // do not resize 2D surface on resize ! mapImage = new osg::Texture2D(); ! // mapImage->setUseHardwareMipMapGeneration(true); ! // mapImage->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT); ! SetBlend(false); ! } - tcTerrainView::~tcTerrainView() - { - } } --- 38,300 ---- ! ! void tcTerrainView::Draw() { ! if (!redraw) return; ! // if displayRegion is wrapped, draw two images ! if (!isWrapped) ! { ! DrawZoomedImage(mapImage.get(), 0, 0, (float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! } ! else ! { ! DrawZoomedImage(mapImage.get(), 0, 0, wrapWidth*(float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! DrawZoomedImage(mapImage.get(), wrapWidth*(float)mnWidth, 0, (1.0f-wrapWidth)*(float)mnWidth, (float)mnHeight, ! displayRegionWrapped, ALIGN_BOTTOM_LEFT); ! } ! FinishDraw(); ! redraw = false; ! } ! void tcTerrainView::GetViewParameters(tsTerrainViewParameters& vp) ! { ! vp.mnSurfaceWidth = mnWidth; ! vp.mnSurfaceHeight = mnHeight; ! vp.mrectDisplay = mrectDisplay; ! vp.mrectGeo = mrectCurrentView; ! } ! /** ! * If the terrain view is minimized always force ! * abActive to false ! */ ! void tcTerrainView::SetActive(bool abActive) ! { ! if (IsWindowMinimized()) ! { ! tc3DWindow::SetActive(false); ! } ! tc3DWindow::SetActive(abActive); ! } ! /** ! * ! */ ! void tcTerrainView::SetDisplayRegion(tcRect& r) ! { ! displayRegion = r; ! } ! /** ! * Sets new view, updating display region of map quad ! */ ! void tcTerrainView::SetView(tcGeoRect r) ! { ! if (mrectCurrentView == r) return; // no change, so return ! mrectCurrentView = r; ! isWrapped = r.left > r.right; ! if (!isWrapped) ! { ! // assumes longitude is within [-pi,pi) and lat within [-pi/2,pi/2] ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = 1.0f; ! } ! else ! { ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = 1.0f; ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.left = 0; ! displayRegionWrapped.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegionWrapped.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = (1.0f - displayRegion.left) / (1.0f - displayRegion.left + displayRegionWrapped.right); ! } ! redraw = true; ! } ! int tcTerrainView::LoadLowResSurface() ! { ! tsMapDataInfo sMDI; ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! /*** Refresh low resolution map surface ***/ ! int width = sMDI.mnLowResWidth; ! int height = sMDI.mnLowResHeight; ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); + mpMapData->GetWorldArea(mrectMap); ! unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits != NULL); ! if (mpOptions != NULL) ! { ! mpMapData->CreateMapImage(mpOptions->mnMapMode, 0, pBits); ! } ! else ! { ! fprintf(stderr, "tcTerrainView::LoadLowResSurface - " ! "called without attached options, using default\n"); ! mpMapData->CreateMapImage(1, 0, pBits); ! } ! redraw = true; ! return true; ! } ! int tcTerrainView::LoadHighResSurface() ! { ! tsMapDataInfo sMDI; ! bool mbTextureMaps; ! if (mpOptions != NULL) ! { ! mbTextureMaps = mpOptions->mbTextureMappedMaps == 1; ! } ! else ! { ! mbTextureMaps = true; ! } ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! int width = sMDI.mnHighResWidth; ! int height = sMDI.mnHighResHeight; + osg::Image* image = mapImage->getImage(); + if (!image) + { + image = new osg::Image(); + mapImage->setImage(image); + } + image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); ! mpMapData->GetTheaterArea(mrectMap); ! unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits); + mpMapData->CreateMapImage(mpOptions->mnMapMode, 1, pBits); // 1 for high res ! redraw = true; ! return true; ! } + /** + * + */ + void tcTerrainView::Maximize() + { + tc3DWindow::Maximize(); + redraw = true; + } ! /** ! * ! */ ! void tcTerrainView::Minimize() ! { ! // tc3DWindow::SetActive(false); ! tc3DWindow::Minimize(); ! redraw = true; ! } + int tcTerrainView::RefreshSurfaces() + { + if (mpMapData == NULL) + { + wxMessageBox("tcTerrainView - RefreshSurfaces called with NULL mpMapData"); + return false; + } + if (highRes) + { + return LoadHighResSurface(); + } + else + { + return LoadLowResSurface(); + } + } ! /** ! * ! */ ! int tcTerrainView::CreateSurfaces() ! { ! if (mpMapData == NULL) ! { ! wxMessageBox("tcTerrainView - CreateSurfaces called with NULL mpMapData"); ! return false; ! } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } + tcTerrainView::tcTerrainView(wxWindow *parent, + const wxPoint& pos, const wxSize& size, + bool isHighRes, const wxString& name) + : + tc3DWindow(parent, pos, size, name, 0), + highRes(isHighRes), + displayRegion(0, 1, 0, 1), + redraw(true) + { + mpMapData = NULL; + mpOptions = tcOptions::Get(); + SetResizeable2D(false); // do not resize 2D surface on resize + mapImage = new osg::Texture2D(); + // mapImage->setUseHardwareMipMapGeneration(true); + // mapImage->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT); + + SetBlend(false); } + + tcTerrainView::~tcTerrainView() + { + + } + Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapView.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tcMapView.cpp 6 May 2005 23:57:50 -0000 1.25 --- tcMapView.cpp 1 Jun 2005 00:13:30 -0000 1.26 *************** *** 50,54 **** using namespace std; - using namespace MapView; #ifdef _DEBUG --- 50,53 ---- *************** *** 1733,1737 **** * Version that uses pre-drawn images to draw symbols */ ! void tcTacticalMapView::DrawSymbol2(MapView::tcMapObj* pMO) { float symbsize = 15.0f; --- 1732,1736 ---- * Version that uses pre-drawn images to draw symbols */ ! void tcTacticalMapView::DrawSymbol2(tcMapObj* pMO) { float symbsize = 15.0f; Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPopupControl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcPopupControl.cpp 10 Mar 2005 03:28:28 -0000 1.8 --- tcPopupControl.cpp 1 Jun 2005 00:13:31 -0000 1.9 *************** *** 35,39 **** #endif ! using namespace ScriptInterface; --- 35,39 ---- #endif ! using namespace scriptinterface; Index: tcButton.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcButton.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcButton.cpp 27 Jan 2005 01:01:49 -0000 1.17 --- tcButton.cpp 1 Jun 2005 00:13:30 -0000 1.18 *************** *** 246,250 **** SetCommand(command); ! caption = current->Attribute("Caption"); SetName(caption.c_str()); --- 246,254 ---- SetCommand(command); ! if (const char* s = current->Attribute("Caption")) ! { ! caption = s; ! } ! SetName(caption.c_str()); *************** *** 269,277 **** { TiXmlElement* imageElement = childNode->ToElement(); ! std::string offImageName = imageElement->Attribute("Off"); ! std::string onImageName = imageElement->Attribute("On"); ! std::string overOnImageName = imageElement->Attribute("OverOn"); ! std::string overOffImageName = imageElement->Attribute("OverOff"); LoadImages(offImageName, onImageName, overOffImageName, overOnImageName); if (offImage.valid()) { --- 273,317 ---- { TiXmlElement* imageElement = childNode->ToElement(); ! std::string offImageName; ! std::string onImageName; ! std::string overOnImageName; ! std::string overOffImageName; ! ! if (const char* s = imageElement->Attribute("Off")) ! { ! offImageName = s; ! } ! ! if (const char* s = imageElement->Attribute("On")) ! { ! onImageName = s; ! } ! else ! { ! onImageName = offImageName; ! } ! ! if (const char* s = imageElement->Attribute("OverOff")) ! { ! overOffImageName = s; ! } ! else ! { ! overOffImageName = offImageName; ! } ! ! if (const char* s = imageElement->Attribute("OverOn")) ! { ! overOnImageName = s; ! } ! else ! { ! overOnImageName = onImageName; ! } ! ! LoadImages(offImageName, onImageName, overOffImageName, overOnImageName); + + /* if (offImage.valid()) { *************** *** 279,282 **** --- 319,323 ---- height = offImage->getTextureHeight(); } + */ } Index: cspSky.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/cspSky.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cspSky.cpp 23 Nov 2004 23:30:55 -0000 1.13 --- cspSky.cpp 1 Jun 2005 00:13:30 -0000 1.14 *************** *** 77,82 **** using namespace osg; - using UnitConversions::toRadians; - using UnitConversions::toDegrees; using std::min; using std::max; --- 77,80 ---- *************** *** 240,245 **** void setObserver(double lat, double lmst, float ambient) { ! rz = 270.0 - toDegrees(lmst); ! rx = - 90.0 + toDegrees(lat); if (ambient < 0.0) ambient = 0.0; if (ambient > 1.0) ambient = 1.0; --- 238,243 ---- void setObserver(double lat, double lmst, float ambient) { ! rz = 270.0 - UnitConversions::toDegrees(lmst); ! rx = - 90.0 + UnitConversions::toDegrees(lat); if (ambient < 0.0) ambient = 0.0; if (ambient > 1.0) ambient = 1.0; *************** *** 263,267 **** const double AstronomicalBody::_earth_radius = 6370000.0; ! const double AstronomicalBody::_earth_tilt = toRadians(23.4397); // simData::toRadians(23.4397); const double AstronomicalBody::_cos_earth_tilt = cos(_earth_tilt); const double AstronomicalBody::_sin_earth_tilt = sin(_earth_tilt); --- 261,265 ---- const double AstronomicalBody::_earth_radius = 6370000.0; ! const double AstronomicalBody::_earth_tilt = UnitConversions::toRadians(23.4397); // simData::toRadians(23.4397); const double AstronomicalBody::_cos_earth_tilt = cos(_earth_tilt); const double AstronomicalBody::_sin_earth_tilt = sin(_earth_tilt); *************** *** 276,280 **** double AstronomicalBody::refract(double h) const { double f = 0.000305 / (0.000305 + h * h); // localize effect at horizon (semi-arbitrary approx) ! return h + toRadians(0.57 * f); } --- 274,278 ---- double AstronomicalBody::refract(double h) const { double f = 0.000305 / (0.000305 + h * h); // localize effect at horizon (semi-arbitrary approx) ! return h + UnitConversions::toRadians(0.57 * f); } *************** *** 420,424 **** _beta = 0.0; ! _lambda = toRadians(slon); _pi = 0.00004263; // just taking an average orbital radius of the earth _stale = true; --- 418,422 ---- _beta = 0.0; ! _lambda = UnitConversions::toRadians(slon); _pi = 0.00004263; // just taking an average orbital radius of the earth _stale = true; *************** *** 1371,1375 **** osg::Vec4 horizon_average; for (i = 0; i < m_nlev; ++i) { ! double elev = toRadians(m_lev[i]); if (elev < 0.0) elev = 0.0; // sub horizon colors aren't correct --- 1369,1373 ---- osg::Vec4 horizon_average; for (i = 0; i < m_nlev; ++i) { ! double elev = UnitConversions::toRadians(m_lev[i]); if (elev < 0.0) elev = 0.0; // sub horizon colors aren't correct Index: tc3DWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DWindow.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tc3DWindow.cpp 5 May 2005 02:14:51 -0000 1.21 --- tc3DWindow.cpp 1 Jun 2005 00:13:30 -0000 1.22 *************** *** 1179,1183 **** } ! void tc3DWindow::LoadBackgroundImage(char* fileName) { wxString fileWithPath = PrependImagePath(fileName); --- 1179,1183 ---- } ! void tc3DWindow::LoadBackgroundImage(const char* fileName) { wxString fileWithPath = PrependImagePath(fileName); *************** *** 1675,1678 **** --- 1675,1679 ---- HideUnusedObjects(); + SetBackgroundDraw(false); for (size_t n=0; n<children.size(); n++) Index: tcGameView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcGameView.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcGameView.cpp 6 May 2005 23:57:50 -0000 1.9 --- tcGameView.cpp 1 Jun 2005 00:13:30 -0000 1.10 *************** *** 47,52 **** using namespace std; - using namespace MapView; - using namespace Sensor; --- 47,50 ---- *************** *** 70,74 **** } ! MapView::teSymbol tcGameView::GetMapSymbolByClassification(int anClassification) { switch (anClassification) --- 68,72 ---- } ! teSymbol tcGameView::GetMapSymbolByClassification(int anClassification) { switch (anClassification) Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DViewer.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tc3DViewer.cpp 17 May 2005 00:20:40 -0000 1.16 --- tc3DViewer.cpp 1 Jun 2005 00:13:30 -0000 1.17 *************** *** 1150,1154 **** void tc3DViewer::UpdateSensorModels(unsigned int alliance) { - using Sensor::tcSensorTrackIterator; tcSensorTrackIterator iter(alliance, 0xFFFF); --- 1150,1153 ---- |