ホーム » その他 » VEyeChgV を改良予定

2012年10月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,354 アクセス



VEyeChgV を改良予定

共通のコードはまだ手を付けられないので,テスト的に,VOpGLS のビューに修正を加えた. VOpGLS.zip


ID_V_EYE_DRAG を追加.
マウスのイベントを追加.
  void CVOpGLSView::OnLButtonDown(UINT nFlags, CPoint point)   {
    SetDragAnchor(point) ;
    if (CanMouseEyeChange()) {
      SetDragMoveEye() ;
      DrgLastEye = GetEyeChg().GetEye() ;
      return ;
      }
    VOpGLView::OnLButtonDown(nFlags, point);
    }
  void CVOpGLSView::OnLButtonUp(UINT nFlags, CPoint point)   {
    if (CanMouseEyeChange()) {
      SetDragMoveEye(FALSE) ;
      this->InvalidateRect(NULL) ;
      return ;
      }
    VOpGLView::OnLButtonUp(nFlags, point);
    }
  void CVOpGLSView::OnMouseMove(UINT nFlags, CPoint point)   {
    if (CanDragEyeChange()) {
      Eye newEye = DrgLastEye ;
      CRect rect ;
      GetClientRect(&rect) ;
      double newAngleXY = rad(Anchor.x-point.x)*180/rect.Width () ;
      double newAngleZ =-rad(Anchor.y-point.y)*120/rect.Height() ;
      newEye = newEye.GetSpinXY(newAngleXY) ;
      newEye = newEye.GetSpinZ (newAngleZ) ;
      GetEyeChgP()->SetEye(newEye) ;
      this->InvalidateRect(NULL) ;
      return ;
      }
    VOpGLView::OnMouseMove(nFlags, point);
    }


2012/10/04 追記
同様に改良. ToPAm.zip

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コメントする

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

%d人のブロガーが「いいね」をつけました。