: Public Class
Created: 2015-07-31 오후 4:10:13
Modified: 2015-07-31 오후 4:10:13
Project:
Advanced:
CDlgNavigation dialog<p/>
Attribute
Private CBitmap
  _bitmap
Details:
 
Private CBitmap*
  _bitmapOld
Details:
 
Private CPoint
  _cursorDragStartPt
Details:
Notes: 마우스 커서 왼쪽 버튼을 누를 때 저장된 위치#lt;p/#gt;
Public CListBox
  _listTargetName
Details:
 
Private CRect
  _mapRect
Details:
Notes: 지도를 표시할 사각 영역#lt;p/#gt;
Private CDC
  _memDC
Details:
Notes: 화면 깜박임을 없애기 위해 메모리 DC를 사용한다. 메모리 DC에 그림을 그린 후, 이를 대화상자로 복사한다.#lt;p/#gt;
Private CPosture
  _offset
Details:
Notes: 지도를 표시하는 사각 영역에 표시되는 지도의 오프셋 값, 사각 영역의 좌측 하단이 기준점임. offset 값이 (-1,-1)인 경우 지도상의 (-1,-1)위치가 기준점에 표시됨.#lt;p/#gt;
Private CPosture
  _robotPos
Details:
Notes: 차량의 현위치를 저장하고 있는 변수#lt;p/#gt;
Private CPosture
  _robotPosPrev
Details:
Notes: 차량의 과거 상태를 기록하는 변수로 Hold Robot Position in Scr. 옵션에서 사용하는 변수#lt;p/#gt;
Private double
  _scale
Details:
Notes: 미터에 _scale을 곱하여 pixel값으로 계산된다. 즉, scale값이 100이면, 지도상의 1m가 화면상의 100pixel로 표시된다.#lt;p/#gt;
Private string
  _targetName
Details:
Notes: 목적지 이름을 저장하는 string#lt;p/#gt;
Operation
Public
CDlgNavigation( pParent: CWnd*,
):
Details:
Sequential
Tags: initializer=CDialog(CDlgNavigation::IDD, pParent)
Public abstract
~CDlgNavigation():
Details:
Sequential
Protected abstract
DoDataExchange( pDX: CDataExchange*,
):void
Details:
Sequential
Private
DrawAllPaths( dc: CDC&,
path: CAstar*,
):void
Details:
Sequential
Private
DrawBackground( dc: CDC&,
sx: double,
sy: double,
ex: double,
ey: double,
d: double,
):void
Details:
Sequential
Private
DrawCovariance( dc: CDC&,
x: double,
y: double,
s_xx: double,
s_xy: double,
s_yy: double,
):void
Details:
Sequential
Private
DrawHeadingAndObstacle( dc: CDC&,
robotPos: CPosture&,
tracePath: CPathFollowing*,
color: COLORREF,
):void
Details:
Sequential
Private
DrawLaserScanner( dc: CDC&,
robotPos: CPosture&,
laserProfile: CLaserProfile*,
color: COLORREF,
pointSize: int,
):void
Details:
Sequential
Private
DrawMagnets( dc: CDC&,
magnets: CMagnetContainer*,
radius: double,
):void
Details:
Sequential
Private
DrawRobot( dc: CDC&,
robotPos: CPosture&,
model: int,
color: COLORREF,
):void
Details:
Sequential
Private
DrawScannedMagnets( dc: CDC&,
magnets: CMagnetContainer*,
radius: double,
):void
Details:
Sequential
Private
DrawTracePath( dc: CDC&,
robotPos: CPosture&,
tracePath: CPathFollowing*,
color: COLORREF,
):void
Details:
Sequential
Notes: void CDlgNavigation::DrawHallSensor(CDC &dc, const CPosture &robotPos, CHallArrayProfile *hap) { 홀센서로 감지한 자석의 세기를 그린다.  CPen pen_red (PS_SOLID, 1, RGB(128, 0, 0)); CPen pen_blue (PS_SOLID, 1, RGB(0, 0, 128)); CBrush brush_red (RGB(255,128,0)); CBrush brush_blue (RGB(0,128,255));  double dy = (hap-#gt;_endArray - hap-#gt;_startArray)/(hap-#gt;_hallCount - 1); for (int i=0; i#lt;hap-#gt;_hallCount; ++i) { CPosture hp = CPosture (0., hap-#gt;_startArray + i*dy, 0.); hp.Transform (hap-#gt;_posture); hp.Transform (robotPos);  int x = M2Px(hp.x); int y = M2Py(hp.y); int r = 1+M2Pl(fabs(hap-#gt;_measured[i]*0.1));  if (hap-#gt;_measured[i] #gt;= 0.) { dc.SelectObject (pen_red); dc.SelectObject (brush_red); } else { dc.SelectObject (pen_blue); dc.SelectObject (brush_blue); }  dc.Ellipse (x-r, y-r, x+r, y+r); } }#lt;p/#gt;
Private
DrawWalls( dc: CDC&,
wallc: CWallContainer*,
):void
Details:
Sequential
Private
M2Pl( _d: double,
):int
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Private
M2Px( _x: double,
):int
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Private
M2Py( _y: double,
):int
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Public
OnBnClickedButtonClear():void
Details:
Sequential
Tags: afx_msg=true
Public
OnBnClickedButtonNavigationTo():void
Details:
Sequential
Tags: afx_msg=true
Public
OnBnClickedButtonSave():void
Details:
Sequential
Tags: afx_msg=true
Public
OnBnClickedButtonStop():void
Details:
Sequential
Tags: afx_msg=true
Public
OnDestroy():void
Details:
Sequential
Tags: afx_msg=true
Public abstract
OnInitDialog():BOOL
Details:
Sequential
Notes: CDlgNavigation message handlers#lt;p/#gt;
Public
OnLbnSelchangeListTargetPos():void
Details:
Sequential
Tags: afx_msg=true
Public
OnLButtonDown( nFlags: UINT,
point: CPoint,
):void
Details:
Sequential
Tags: afx_msg=true
Public
OnLButtonUp( nFlags: UINT,
point: CPoint,
):void
Details:
Sequential
Tags: afx_msg=true
Public
OnMouseMove( nFlags: UINT,
point: CPoint,
):void
Details:
Sequential
Tags: afx_msg=true
Public
OnMouseWheel( nFlags: UINT,
zDelta: short,
pt: CPoint,
):BOOL
Details:
Sequential
Tags: afx_msg=true
Public
OnPaint():void
Details:
Sequential
Tags: afx_msg=true
Notes: If you add a minimize button to your dialog, you will need the code below to draw the icon.  For MFC applications using the document/view model, this is automatically done for you by the framework.#lt;p/#gt;
Public
OnRButtonDblClk( nFlags: UINT,
point: CPoint,
):void
Details:
Sequential
Tags: afx_msg=true
Public
OnRButtonDown( nFlags: UINT,
point: CPoint,
):void
Details:
Sequential
Tags: afx_msg=true
Public
OnTimer( nIDEvent: UINT_PTR,
):void
Details:
Sequential
Tags: afx_msg=true
Private
P2Ml( _d: int,
):double
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Private
P2Mx( _x: int,
):double
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Private
P2My( _y: int,
):double
Details:
Sequential
Tags: bodyLocation=classDec
inline=true
Private
UpdateDlgItem( robotPos: CPosture&,
):void
Details:
Sequential
Private
UpdateScreen( robotPos: CPosture&,
):void
Details:
Sequential
Element Source Role Target Role
CPosture
Class  
Name:  
 
Name: _offset
 
Details:
 
CPosture
Class  
Name:  
 
Name: _robotPos
 
Details:
 
CPosture
Class  
Name:  
 
Name: _robotPosPrev
 
Details: