update_window_poseUpdateWindowPoseUpdateWindowPoseupdate_window_poseT_update_window_pose
説明
update_window_poseUpdateWindowPoseUpdateWindowPoseupdate_window_poseT_update_window_pose — 3 次元プロットのポーズを修正する。
書式
update_window_pose( window WindowHandle, point.y LastRow, point.x LastCol, point.y CurrentRow, point.x CurrentCol, string Mode )void UpdateWindowPose( const HTuple& WindowHandle, const HTuple& LastRow, const HTuple& LastCol, const HTuple& CurrentRow, const HTuple& CurrentCol, const HTuple& Mode )static void HOperatorSet.UpdateWindowPose( HTuple windowHandle, HTuple lastRow, HTuple lastCol, HTuple currentRow, HTuple currentCol, HTuple mode )def update_window_pose( window_handle: HHandle, last_row: Union[float, int], last_col: Union[float, int], current_row: Union[float, int], current_col: Union[float, int], mode: str ) -> None
Herror T_update_window_pose( const Htuple WindowHandle, const Htuple LastRow, const Htuple LastCol, const Htuple CurrentRow, const Htuple CurrentCol, const Htuple Mode )
void HWindow::UpdateWindowPose( const HTuple& LastRow, const HTuple& LastCol, const HTuple& CurrentRow, const HTuple& CurrentCol, const HString& Mode ) const
void HWindow::UpdateWindowPose( double LastRow, double LastCol, double CurrentRow, double CurrentCol, const HString& Mode ) const
void HWindow::UpdateWindowPose( double LastRow, double LastCol, double CurrentRow, double CurrentCol, const char* Mode ) const
void HWindow::UpdateWindowPose( double LastRow, double LastCol, double CurrentRow, double CurrentCol, const wchar_t* Mode ) const (Windows only)
void HWindow.UpdateWindowPose( HTuple lastRow, HTuple lastCol, HTuple currentRow, HTuple currentCol, string mode )
void HWindow.UpdateWindowPose( double lastRow, double lastCol, double currentRow, double currentCol, string mode )
説明
ペイントモードが set_paintSetPaint を使用し '3d_plot'"3d_plot" に
設定されている場合、オペレーター update_window_poseUpdateWindowPose は
disp_objDispObj で表示される高さフィールドのポーズを簡単に修正す
ることができます。
2 つのウインドウ座標(LastRowlastRowlast_row,LastCollastCollast_col)と(
CurrentRowcurrentRowcurrent_row, CurrentColcurrentColcurrent_col)は Modemodemode に応じ
て回転、縮尺変更、移動のいずれかで変換されます。
このウインドウ座標は現在の画像部分に応じて提供されなければなりませ
ん。結果として、この座標はサブピクセル座標です。現在の画像部分を(
row1,col1,row2,col2)とすると、左上隅が座標(row1 - 0.5, col1 - 0.
5)に対応します。したがって、右下隅は座標(row2 - 0.5, col2 - 0.5)
に対応します。get_mposition_sub_pixGetMpositionSubPix または
get_mbutton_sub_pixGetMbuttonSubPix を使用し、この座標を直接取得することが
できます。
Modemodemode を 'rotate'"rotate" に設定すると、仮想トラックボー
ルモデルを使用し高さフィールドが回転されます。各点はウインドウ
WindowHandlewindowHandlewindow_handle に中心がある球面上で投影されます。この 2 つ
の投影間の円弧は高さフィールドに適用された回転と対応します。
Modemodemode を 'scale'"scale" に設定すると、
CurrentRowcurrentRowcurrent_row が LastRowlastRowlast_row よりも大きい場合縮小され、
CurrentRowcurrentRowcurrent_row が LastRowlastRowlast_row よりも小さい場合拡大され
ます。
Modemodemode を 'move'"move" に設定すると、入力点は視野に平行
な高さフィールドの中心を通って平面上に投影されます。高さフィールド
の中心は各投影間の距離によって平面上で移動されます。
Modemodemode を 'move_plane'"move_plane" に設定すると、入力点は高さ
ゼロの平面上で投影されます。高さフィールドは 2 つの投影間の距離に
よってこの平面内で移動されます。
実行情報
実行情報
パラメーター
WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)
ウインドウハンドル
LastRowlastRowlast_row (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)
最初の点の行座標
LastCollastCollast_col (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)
最初の点の列座標
CurrentRowcurrentRowcurrent_row (input_control) point.y → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)
第 2 の点の行座標
CurrentColcurrentColcurrent_col (input_control) point.x → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)
第 2 の点の列座標
Modemodemode (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)
ナビゲーションモード
初期値: 'rotate'"rotate"
値のリスト: 'move', 'move_plane', 'rotate', 'scale'"move", "move_plane", "rotate", "scale"
例
(HDevelop)
* Interactive display of a height field
dev_set_paint ('3d_plot')
while (1)
dev_set_check ('~give_error')
get_mposition_sub_pix (WindowHandle, Row, Column, Button)
dev_set_check ('give_error')
if (ButtonDown and (Button == 0))
ButtonDown := false
endif
if (not(Button == 0))
if (ButtonDown)
if (Button == 1)
mode := 'rotate'
endif
if (Button == 4)
mode := 'scale'
endif
if (Button == 5)
mode := 'move'
endif
update_window_pose (WindowHandle, lastRow, lastCol, Row, Column, mode)
else
if (Button == 2)
break
endif
ButtonDown := true
endif
lastCol := Column
lastRow := Row
endif
dev_display (Image)
endwhile
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
set_paintSetPaint, open_windowOpenWindow, get_mposition_sub_pixGetMpositionSubPix, get_mbutton_sub_pixGetMbuttonSubPix
後処理の候補
disp_imageDispImage
関連項目
unproject_coordinatesUnprojectCoordinates
モジュール
Foundation