海洋會話
16 個節點
本頁內容 16
推進
函數把海和海上的物體推進一段模擬時間(秒)。
簽名
推進(Ocean Session: Ocean Session, seconds: 數字)
void Advance(OceanSession Ocean Session, double seconds)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| seconds | 數字 | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
物體位置
函數一個物體此刻的位置(米)。
簽名
物體位置(Ocean Session: Ocean Session, 名稱: 文字) -> Vector3d
Vector3d BodyPosition(OceanSession Ocean Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 名稱 | 文字 | — | Its name. |
返回
| 結果 | Vector3d |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
物體朝向
函數一個物體此刻的朝向。
簽名
物體朝向 -> Quaterniond
Ocean Session: Ocean Session
名稱: 文字Quaterniond BodyRotation(
OceanSession Ocean Session,
string name)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 名稱 | 文字 | — | Its name. |
返回
| 結果 | Quaterniond |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
物體速度
函數一個物體此刻的速度(米/秒)。
簽名
物體速度(Ocean Session: Ocean Session, 名稱: 文字) -> Vector3d
Vector3d BodyVelocity(OceanSession Ocean Session, string name)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 名稱 | 文字 | — | Its name. |
返回
| 結果 | Vector3d |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
捕獲物體
函數物體此刻的樣子,取為一個幀,三維檢視會把它畫出來。
簽名
捕獲物體(Ocean Session: Ocean Session) -> Simulation Frame
SimulationFrame CaptureBodies(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
返回
| 結果 | Simulation Frame |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
結束會話
函數結束會話,把它在顯示卡上佔用的東西還回去。
簽名
結束會話(Ocean Session: Ocean Session)
void Dispose(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
幀
函數How many frames Step Frame has stepped.
簽名
幀(Ocean Session: Ocean Session) -> 整數
int Frame(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
返回
| 結果 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
場景
函數The scene the session started from.
簽名
場景(Ocean Session: Ocean Session) -> Ocean Scene Description
OceanSceneDescription Scene(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
返回
| 結果 | Ocean Scene Description |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
時間
函數Simulated time (s).
簽名
時間(Ocean Session: Ocean Session) -> 數字
double Time(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
高度
函數此刻某一點上方的海面高度(米)。
簽名
高度(Ocean Session: Ocean Session, 位置: Vector3d) -> 數字
double Height(OceanSession Ocean Session, Vector3d position)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 位置 | Vector3d | — | The point; its Z is not used. |
返回
| 結果 | 數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
推動物體
函數在一個物體的中心推它一下:一個衝量(牛·秒),即它的質量乘以速度的變化。船的引擎,一陣風。
簽名
推動物體
Ocean Session: Ocean Session
名稱: 文字
衝量: Vector3dvoid PushBody(
OceanSession Ocean Session,
string name,
Vector3d impulse)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 名稱 | 文字 | — | The body's name. |
| 衝量 | Vector3d | — | The impulse (N·s). |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
渲染
函數海此刻的一張圖片,連同海上的物體。在顯示卡上生成。
簽名
渲染 -> Pixel Image
Ocean Session: Ocean Session
眼睛: Vector3d
目標: Vector3d
寬度: 整數
高度: 整數
視場角: 數字PixelImage Render(
OceanSession Ocean Session,
Vector3d eye,
Vector3d target,
int width = 640,
int height = 480,
double fieldOfView = 40)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 眼睛 | Vector3d | — | Where the camera stands (m). |
| 目標 | Vector3d | — | What it looks at (m). |
| 寬度 | 整數 | 640 | The picture's width in pixels. |
| 高度 | 整數 | 480 | The picture's height in pixels. |
| 視場角 | 數字 | 40 | The camera's vertical field of view in degrees. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
步進一幀
函數按某個幀率把海和海上的物體推進一幀。
簽名
步進一幀(Ocean Session: Ocean Session, framesPerSecond: 數字)
void StepFrame(
OceanSession Ocean Session,
double framesPerSecond = 30)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| framesPerSecond | 數字 | 30 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
表面
函數此刻一個矩形範圍內的海面,作為一個網格。
簽名
表面 -> Streamed Vertex Mesh Data
Ocean Session: Ocean Session
中心: Vector3d
X 大小: 數字
Y 大小: 數字
單元數: 整數StreamedVertexMeshData Surface(
OceanSession Ocean Session,
Vector3d center,
double sizeX = 100,
double sizeY = 100,
int cells = 128)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — | |
| 中心 | Vector3d | — | The rectangle's middle (m). |
| X 大小 | 數字 | 100 | Its extent along X (m). |
| Y 大小 | 數字 | 100 | Its extent along Y (m). |
| 單元數 | 整數 | 128 | Cells along its longer side. |
返回
| 結果 | Streamed Vertex Mesh Data |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
取出事件
函數自上次呼叫以來場景的觸發器做了什麼,最早的在前:每觸發一次就是一個事件,帶著它的時間、地點和所涉及的物體。沒有觸發過,或者海沒有觸發器時為空。
簽名
取出事件(Ocean Session: Ocean Session) -> Simulation Event 陣列
SimulationEvent[] TakeEvents(OceanSession Ocean Session)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Ocean Session | Ocean Session | — |
返回
| 結果 | Simulation Event 陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 事件 例程 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬
開始海洋會話
函數從一個海洋場景開始一個會話。
簽名
開始海洋會話(場景: Ocean Scene Description) -> Ocean Session
OceanSession Start(OceanSceneDescription scene)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 場景 | Ocean Scene Description | — | The sea. |
返回
| 結果 | Ocean Session |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 海洋會話
- 所屬包
- 物理模擬