[Gcblue-commits] gcb_wx/src/scriptinterface tcPlatformInterface.cpp,1.24,1.25 tcPlatformInterfaceExt
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-07-19 00:53:12
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28653/src/scriptinterface Modified Files: tcPlatformInterface.cpp tcPlatformInterfaceExtensionB.cpp tcSimPythonInterface.cpp Log Message: Index: tcPlatformInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcPlatformInterface.cpp 18 Jul 2004 03:18:01 -0000 1.24 --- tcPlatformInterface.cpp 19 Jul 2004 00:53:01 -0000 1.25 *************** *** 120,123 **** --- 120,136 ---- } + /** + * Get terrain elevation for (lon_rad, lat_rad). Over water this + * returns a negative number for water depth. + * @return terrain elevation in meters + */ + float tcPlatformInterface::GetMapTerrainElevation(float lon_rad, float lat_rad) + { + wxASSERT(mapData); + + return mapData->GetTerrainHeight(lon_rad * C_180OVERPI, lat_rad * C_180OVERPI, + mpSimState->GetTime()); + } + /** * Get terrain elevation for current position. Over water this *************** *** 268,280 **** return false; } ! if ((track.mnClassification & PTYPE_SURFACE)&&(info.mnTargetFlags & SURFACE_TARGET)) { return true; } ! if ((track.mnClassification & PTYPE_AIR)&&(info.mnTargetFlags & AIR_TARGET)) { return true; } ! if ((track.mnClassification & PTYPE_MISSILE)&&(info.mnTargetFlags & MISSILE_TARGET)) { return true; } return false; } --- 281,300 ---- return false; } ! if ((track.mnClassification & PTYPE_SURFACE)&&(info.mnTargetFlags & SURFACE_TARGET)) ! { return true; } ! if ((track.mnClassification & PTYPE_AIR)&&(info.mnTargetFlags & AIR_TARGET)) ! { return true; } ! if ((track.mnClassification & PTYPE_MISSILE)&&(info.mnTargetFlags & MISSILE_TARGET)) ! { return true; } + if ((track.mnClassification & PTYPE_FIXED)&&(info.mnTargetFlags & LAND_TARGET)) + { + return true; + } return false; } *************** *** 453,461 **** } ! void tcPlatformInterface::SendDatumToLauncher(float afLon_rad, float afLat_rad, int anLauncher) { ! tcPoint p; ! p.x = afLon_rad; ! p.y = afLat_rad; mpPlatformObj->DesignateLauncherDatum(p, anLauncher); } --- 473,483 ---- } ! void tcPlatformInterface::SendDatumToLauncher(float afLon_rad, float afLat_rad, ! float alt_m, int anLauncher) { ! tsGeoPoint p; ! p.mfLon_rad = afLon_rad; ! p.mfLat_rad = afLat_rad; ! p.mfAlt_m = alt_m; mpPlatformObj->DesignateLauncherDatum(p, anLauncher); } *************** *** 914,918 **** tcSoundConsole* tcPlatformInterface::mpConsole = NULL; tcCommandQueue* tcPlatformInterface::mpCommandQueue = NULL; ! } --- 936,940 ---- tcSoundConsole* tcPlatformInterface::mpConsole = NULL; tcCommandQueue* tcPlatformInterface::mpCommandQueue = NULL; ! tcMapData* tcPlatformInterface::mapData = NULL; } Index: tcSimPythonInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcSimPythonInterface.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcSimPythonInterface.cpp 18 Jul 2004 03:18:01 -0000 1.14 --- tcSimPythonInterface.cpp 19 Jul 2004 00:53:01 -0000 1.15 *************** *** 177,180 **** --- 177,181 ---- void tcSimPythonInterface::AttachMapData(tcMapData *md) { + tcPlatformInterface::AttachMapData(md); tcScenarioInterface::AttachMapData(md); } Index: tcPlatformInterfaceExtensionB.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtensionB.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcPlatformInterfaceExtensionB.cpp 18 Jul 2004 03:18:01 -0000 1.11 --- tcPlatformInterfaceExtensionB.cpp 19 Jul 2004 00:53:01 -0000 1.12 *************** *** 60,63 **** --- 60,64 ---- .def("GetRangeToDatum",&tcPlatformInterface::GetRangeToDatum) .def("GetTerrainElevation",&tcPlatformInterface::GetTerrainElevation) + .def("GetMapTerrainElevation",&tcPlatformInterface::GetMapTerrainElevation) .def("HasThrottle",&tcPlatformInterface::HasThrottle) .def("SetAlt", &tcPlatformInterface::SetAltitude) |