ホーム » 2012 » 10月

月別アーカイブ: 10月 2012

2012年10月
 123456
78910111213
14151617181920
21222324252627
28293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,631 アクセス



operator[]

以下の様なコードで,配列の要素として書き戻す部分がうまく機能してなかった.
BOOL d3D_PgonsA::SetUniqueName (void) {
  { // 空の場合 “Pgons_0x” を設定
    for (int index=0 ; index<this->GetCount() ; index++) {
      d3D_Pgons1 pgons = (*this)[index] ;
      CString name = pgons.GetName().c_str() ;
      if (name.IsEmpty()) {
        name.Format(_T(“Pgons1_%03d”),index+1) ;
        pgons.SetName(name) ;
        (*this)[index] = pgons ;
        continue ;
        }
      }
    }
  // …
  }
原因は, d3D_Pgons1& operator[] (const int index) が定義されてなかったためだが,未だによくわかってない.

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

iPhone 3D – 2

71 ページのプロジェクトの名称の変更の場所がわからなかったので,

右上のプロジェクト名の部分を「HelloArrow」から「HelloCone」に打ち直す.

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

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.