“SetViewDirection 指令”的版本间的差异
来自GeoGebra Manual
(建立内容为“<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|3D}} ;SetViewDirection( <Direction> ) :Sets the direction of the 3D view orientation depending on t…”的新页面) |
小 |
||
(未显示同一用户的1个中间版本) | |||
第1行: | 第1行: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|3D}} | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|3D}} | ||
− | ;SetViewDirection( < | + | ;SetViewDirection( < 方向> ) |
− | : | + | : 根據指定的 <方向> 設定 '''3D 繪圖區'''的視角。 |
:{{example| 1=<code><nowiki>SetViewDirection(Vector((0, 0, 1)))</nowiki></code>}} | :{{example| 1=<code><nowiki>SetViewDirection(Vector((0, 0, 1)))</nowiki></code>}} | ||
:{{example| 1=<code><nowiki>SetViewDirection((0, 0, 1))</nowiki></code>}} | :{{example| 1=<code><nowiki>SetViewDirection((0, 0, 1))</nowiki></code>}} | ||
第7行: | 第7行: | ||
;SetViewDirection( ) | ;SetViewDirection( ) | ||
− | : | + | : 設定 '''3D 繪圖區'''的視角到預設位置。 |
:{{example| 1=<code><nowiki>SetViewDirection()</nowiki></code>}} | :{{example| 1=<code><nowiki>SetViewDirection()</nowiki></code>}} | ||
− | ;SetViewDirection( < | + | ;SetViewDirection( < 方向>, < 動畫?> ) |
− | : | + | : 根據指定的 <方向> 設定 '''3D 繪圖區'''的視角,並決定是否要開啟 <動畫?>。 |
− | :{{example|1= | + | :{{example|1= 假設有一角度數值滑桿 ''α''。在 ''α'' '''屬性'''視窗'''程式'''分頁的 ''OnUpdate'' 輸入指令 <code><nowiki>SetViewDirection(Vector((1; α; -30°)), false)</nowiki></code> ,即可透過 '' α'' 去旋轉 '''3D 繪圖區''' 。}} |
{{notes| 1= | {{notes| 1= | ||
− | * | + | * 可設定視角方向朝向一條直線、一條線段、一個平面... 等等。 |
− | * | + | * 假設使用指令 <code>SetViewDirection(x + y + z = 1)</code> 兩次,會發現有兩種可能的情況(相差 180° )。想要更精確地指定視角,可以使用指令像是 <code>SetViewDirection(Vector((0, 0, 1)))</code> 。 |
− | * | + | * 請參閱 [[Image:Mode viewinfrontof.png|link=|24px]] [[ 面對指定面_工具| 面對指定面]] 工具。}} |
2024年1月5日 (五) 02:59的最新版本
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版。
- SetViewDirection( <方向> )
- 根據指定的 <方向> 設定 3D 繪圖區的視角。
- 範例:
SetViewDirection(Vector((0, 0, 1)))
- 範例:
SetViewDirection((0, 0, 1))
- 範例:
SetViewDirection(x + y + z = 1)
- SetViewDirection( )
- 設定 3D 繪圖區的視角到預設位置。
- 範例:
SetViewDirection()
- SetViewDirection( <方向>, <動畫?> )
- 根據指定的 <方向> 設定 3D 繪圖區的視角,並決定是否要開啟 <動畫?>。
- 範例: 假設有一角度數值滑桿 α。在 α 屬性視窗程式分頁的 OnUpdate 輸入指令
SetViewDirection(Vector((1; α; -30°)), false)
,即可透過 α 去旋轉 3D 繪圖區。
備註:
- 可設定視角方向朝向一條直線、一條線段、一個平面...等等。
- 假設使用指令
SetViewDirection(x + y + z = 1)
兩次,會發現有兩種可能的情況(相差 180°)。想要更精確地指定視角,可以使用指令像是SetViewDirection(Vector((0, 0, 1)))
。 - 請參閱 面對指定面工具。