/** * 矩形領域のエッジサイズを指定します。 * エッジの計算方法は以下の通りです。 * 1.マーカ全体を(i_x_edge*2+width)x(i_y_edge*2+height)の解像度でパラメタを計算します。 * 2.ピクセルの取得開始位置を(i_x_edge/2,i_y_edge/2)へ移動します。 * 3.開始位置から、width x height個のピクセルを取得します。 * * ARToolKit標準マーカの場合は、width/2,height/2を指定してください。 * @param i_x_edge * @param i_y_edge */ public void setEdgeSize(int i_x_edge, int i_y_edge, int i_resolution) { Debug.Assert(i_x_edge >= 0); Debug.Assert(i_y_edge >= 0); //Perspectiveパラメタ計算器を作成 this._perspective_gen = new NyARPerspectiveParamGenerator_O1( LOCAL_LT, LOCAL_LT, (i_x_edge * 2 + this._size.w) * i_resolution, (i_y_edge * 2 + this._size.h) * i_resolution); //ピックアップ開始位置を計算 this._pickup_lt.x = i_x_edge * i_resolution + LOCAL_LT; this._pickup_lt.y = i_y_edge * i_resolution + LOCAL_LT; return; }
/** * 矩形領域のエッジサイズを指定します。 * エッジの計算方法は以下の通りです。 * 1.マーカ全体を(i_x_edge*2+width)x(i_y_edge*2+height)の解像度でパラメタを計算します。 * 2.ピクセルの取得開始位置を(i_x_edge/2,i_y_edge/2)へ移動します。 * 3.開始位置から、width x height個のピクセルを取得します。 * * ARToolKit標準マーカの場合は、width/2,height/2を指定してください。 * @param i_x_edge * @param i_y_edge */ public void setEdgeSize(int i_x_edge,int i_y_edge,int i_resolution) { Debug.Assert(i_x_edge>=0); Debug.Assert(i_y_edge>=0); //Perspectiveパラメタ計算器を作成 this._perspective_gen=new NyARPerspectiveParamGenerator_O1( LOCAL_LT,LOCAL_LT, (i_x_edge*2+this._size.w)*i_resolution, (i_y_edge*2+this._size.h)*i_resolution); //ピックアップ開始位置を計算 this._pickup_lt.x=i_x_edge*i_resolution+LOCAL_LT; this._pickup_lt.y=i_y_edge*i_resolution+LOCAL_LT; return; }