Revision 18800d29 scout/scoutsim/src/emitter.cpp

View differences:

scout/scoutsim/src/emitter.cpp
35 35
          , aperture(aperture)
36 36
          , distance(distance)
37 37
          , pen_on(true)
38
          , emitter_visual_on(true)
38 39
          , pen(wxColour(DEFAULT_PEN_R, DEFAULT_PEN_G, DEFAULT_PEN_B))
39 40
    {
40 41
        pen.SetWidth(3);
......
120 121
            emitter = wxBitmap(rotated_image);
121 122
        }
122 123

  
124
        if (emitter_visual_on) {
125
            path_dc.SelectObject(*path_bitmap);
126
            path_dc.SetBrush(*wxGREEN_BRUSH);
127
            path_dc.DrawLine(
128
                pos.x * PIX_PER_METER,
129
                pos.y * PIX_PER_METER,
130
                (pos.x+cos(orient-BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER,
131
                (pos.y-sin(orient-BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER);
132
            path_dc.DrawLine(
133
                pos.x * PIX_PER_METER,
134
                pos.y * PIX_PER_METER,
135
                (pos.x+cos(orient+BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER,
136
                (pos.y-sin(orient+BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER);
137

  
138

  
139
            path_dc.DrawCircle(
140
                wxPoint((pos.x+cos(orient-BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER,
141
                        (pos.y-sin(orient-BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER)
142
                ,2);
143
            path_dc.DrawCircle(
144
                wxPoint((pos.x+cos(orient+BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER,
145
                        (pos.y-sin(orient+BOM_APERTURE)*BOM_DISTANCE)*PIX_PER_METER)
146
              ,2);
147
        }
148

  
123 149
        geometry_msgs::Pose2D my_pose;
124 150
        my_pose.x = pos.x;
125 151
        my_pose.y = pos.y;

Also available in: Unified diff