|
From: Melchior F. <mf...@fl...> - 2007-06-30 08:56:44
|
Update of /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation
In directory baron:/tmp/cvs-serv16527
Modified Files:
wxradar.cxx wxradar.hxx
Log Message:
Vivian MEAZZA: allow to turn off heading marker (symbol for own aircaft)
mf: remove commented out
Index: wxradar.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation/wxradar.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -r1.15 -r1.16
*** wxradar.cxx 29 Jun 2007 22:44:41 -0000 1.15
--- wxradar.cxx 30 Jun 2007 08:53:06 -0000 1.16
***************
*** 143,146 ****
--- 143,147 ----
_radar_coverage_node = _Instrument->getNode("limit-deg", true);
_radar_ref_rng_node = _Instrument->getNode("reference-range-nm", true);
+ _radar_hdg_marker_node = _Instrument->getNode("heading-marker", true);
SGPropertyNode *n = _Instrument->getNode("display-controls", true);
***************
*** 155,158 ****
--- 156,161 ----
if (_radar_ref_rng_node->getType() == SGPropertyNode::NONE)
_radar_ref_rng_node->setDoubleValue(35);
+ if (_radar_hdg_marker_node->getType() == SGPropertyNode::NONE)
+ _radar_hdg_marker_node->setBoolValue(true);
_x_offset = 0;
***************
*** 661,674 ****
wxRadarBg::update_heading_marker()
{
! /*
! float angle = _view_heading + _angle_offset;
!
! float x = sin(angle);
! float y = cos(angle);
! float s_rot_x = sin(angle + SGD_PI_4);
! float s_rot_y = cos(angle + SGD_PI_4);
!
! float size = UNIT * 500;
! */
const osg::Vec2f texBase(2 * UNIT, 3 * UNIT);
--- 664,669 ----
wxRadarBg::update_heading_marker()
{
! if (!_radar_hdg_marker_node->getBoolValue())
! return;
const osg::Vec2f texBase(2 * UNIT, 3 * UNIT);
***************
*** 677,685 ****
* wxRotate(_view_heading + _angle_offset));
- if (_display_mode == MAP) {
- //cout << "Map Mode " << range << endl;
- // m *= osg::Matrixf::translate(_scale, _scale, 0.0f);
- }
-
m *= _centerTrans;
addQuad(_vertices, _texCoords, m, texBase);
--- 672,675 ----
Index: wxradar.hxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Instrumentation/wxradar.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -r1.12 -r1.13
*** wxradar.hxx 29 Jun 2007 22:44:41 -0000 1.12
--- wxradar.hxx 30 Jun 2007 08:53:06 -0000 1.13
***************
*** 100,103 ****
--- 100,104 ----
SGPropertyNode_ptr _radar_coverage_node;
SGPropertyNode_ptr _radar_ref_rng_node;
+ SGPropertyNode_ptr _radar_hdg_marker_node;
SGPropertyNode_ptr _ai_enabled_node;
|