ホーム » 2018 » 12月 » 01

日別アーカイブ: 2018/12/01

2018年12月
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

カテゴリー

アーカイブ

ブログ統計情報

  • 77,427 アクセス



カメラ座標からワールドに

{
    Prj ctow ;
    {   //  Prj の逆行列を求める
        Matrix pm ;
        Prj    prj(GetEyeChg().Get()) ;
        prj.Get(&pm) ;
        pm.Inv() ;	//  逆行列
        ctow.Set(pm) ;
        }
    for (size_t index=0 ; index<pnts.size() ; index++) {
        Vd3 pnt = pnts[index] ;
        for (size_t index3=0 ; index3<pntsXzY.size() ; index3++) {
            Vd3 pt3 = pntsXzY[index3] ;
            pt3.y = 0 ;
            if (::V3_is_near(pnt,pt3)) {
                Vd3 pntc = pntsXzY[index3] ;
                Vd3 pntw = ::ToVd3(ctow.P3to3(::ToP3(pntc))) ;  //  逆行列を掛けている
                pnts[index] = pntw ;
                break ;
                }
            }
        }
    }


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