3D Transformations

Rotation And Translation

Instruction:
此範例中Statue表現對Y軸發生順時針和逆時針旋轉;Rock表現向Y軸產生位移;Box表現對Y軸發生逆時針旋轉,均是對Rotate和Translate兩個Building Blocks作變化及運用。

Building Blocks
(a) Set As Active Camera-Cameras/Montage/Set As Active Camera
(b) Text Display-Interface/Text/Text Display
(c) Switch On Key-Controllers/Keyboard/Switch On Key
(d) Per Second-Logics/Calculator/Per Second
(e) Rotate-Transformations/Basic/Rotate
(f) Key Event-Controllers/Keyboard/Key Event
(g) Translate-3D Transformations/Basic/Translate
(h) Key Waiter-Controllers/Keyboard/Key Waiter

製作構想
Statue和Box的旋轉可以利用Building Blocks-Rotate或是再配合Per Second作旋轉的效果;Rock的位移可以利用Building Blocks-Translate再配合Per Second作移動的效果;在控制上,可以使用Building Blocks-Switch On Key、Key Event、Key Waiter等切換方式。

製作步驟
(a) Camera

Set As Active Camera:設定現在使用的Camera。
Text Display:文字說明。
 
(b) Statue

Switch On Key:設定控制鍵分別為'3'、'4'。
Per Second:設定1秒鐘所旋轉的角度值X(Turn:圈數;Degree:角度),乘上一個Frame所花費時間,在pOut輸出旋轉角度值Y。
T X(pIn) * Elapsed Time = Y(pOut) Rotate:於Angle of Rotation的pIn輸入旋轉角度值Y,設定Axis of Rotation-Y軸;設定Referential of the Axis-'-NULL-'或'Statue'皆可(如圖示) ;勾選Hierarchy表示Building Blocks也可以應用在Child。

(c) Rock

Key Event:設定Key Waited-'2';當Key'2'按下時由Pressed輸出,Key'2'放開時由Released輸出。
Translate:設定Key'2'按下時Translate Vector向Y方向移動(0,1,0);Key'2'放開時Translate Vector向Y方向移動(0,-1,0)。Referential設為'-NULL-'或'Rock'結果相同;勾選Hierarchy表示Building Blocks也可以應用在Child。

(d) Box

Key Waiter:設定控制鍵'1'按下時由Out輸出訊息。
Per Second:情況與Statue的Per Second相同。
Rotate:情況與Statue的Rotate相同。

愛迪斯科技股份有限公司版權所有,本網站各連結標題,商標及連結內容歸原權利人所有.
台北市內湖區民權東路六段16011樓之
2 Tel:(02)2791-2917 Fax:(02)2791-2916
CopyRight 2001-2002 Axis 3D Technology,inc. All rights reserved.