元編程參考文件

粒子會話

14 個節點

本頁內容 14

推進

函數

把粒子推進一段模擬時間(秒),每步不超過六十分之一秒。

簽名
推進(Particle Session: Particle Session, seconds: 數字)
void Advance(ParticleSession Particle Session, double seconds)

參數

名稱型別預設值說明
Particle SessionParticle Session—
seconds數字—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

迸發

函數

讓一個發射器在下一步裡一次放出若干粒子。

簽名
迸發(Particle Session: Particle Session, 名稱: 文字, 數量: 整數)
void Burst(
    ParticleSession Particle Session,
    string name,
    int count)

參數

名稱型別預設值說明
Particle SessionParticle Session—
名稱文字—The emitter's name.
數量整數—How many particles.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

數量

函數

此刻有多少個活著的粒子。

簽名
數量(Particle Session: Particle Session) -> 整數
int Count(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

結束會話

函數

結束會話,把它在顯示卡上的記憶體還回去。

簽名
結束會話(Particle Session: Particle Session)
void Dispose(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

幀

函數

How many frames Step Frame has stepped.

簽名
幀(Particle Session: Particle Session) -> 整數
int Frame(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

場景

函數

The scene the session started from (what was moved since is not in it).

簽名
場景(Particle Session: Particle Session) -> Particle Scene Description
ParticleSceneDescription Scene(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—

返回

結果Particle Scene Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

時間

函數

Simulated time (s).

簽名
時間(Particle Session: Particle Session) -> 數字
double Time(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

移動發射器

函數

把一個發射器搬到新的地方(米);從此它的粒子在那裡生出。

簽名
移動發射器
    Particle Session: Particle Session
    名稱: 文字
    位置: Vector3d
void MoveEmitter(
    ParticleSession Particle Session,
    string name,
    Vector3d position)

參數

名稱型別預設值說明
Particle SessionParticle Session—
名稱文字—The emitter's name.
位置Vector3d—Its new centre (m).
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

移動固體

函數

把一個固體搬到新的地方(米)。它在下一步裡到達,沿途把擋路的粒子掃走。

簽名
移動固體
    Particle Session: Particle Session
    名稱: 文字
    位置: Vector3d
void MoveSolid(
    ParticleSession Particle Session,
    string name,
    Vector3d position)

參數

名稱型別預設值說明
Particle SessionParticle Session—
名稱文字—The solid's name.
位置Vector3d—Its new centre (m).
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

點

函數

活著的粒子此刻的位置(米)。

簽名
點(Particle Session: Particle Session) -> Vector3d 陣列
Vector3d[] Points(ParticleSession Particle Session)

參數

名稱型別預設值說明
Particle SessionParticle Session—

返回

結果Vector3d 陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

渲染

函數

場景此刻的一張圖片:地面、固體和粒子。

簽名
渲染 -> Pixel Image
    Particle Session: Particle Session
    眼睛: Vector3d
    目標: Vector3d
    寬度: 整數
    高度: 整數
    視場角: 數字
PixelImage Render(
    ParticleSession Particle Session,
    Vector3d eye,
    Vector3d target,
    int width = 640,
    int height = 480,
    double fieldOfView = 40)

參數

名稱型別預設值說明
Particle SessionParticle Session—
眼睛Vector3d—Where the camera stands (m).
目標Vector3d—What it looks at (m).
寬度整數640The picture's width in pixels.
高度整數480The picture's height in pixels.
視場角數字40The camera's vertical field of view in degrees.

返回

結果Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

設定風

函數

改變風(米/秒)。

簽名
設定風(Particle Session: Particle Session, wind: Vector3d)
void SetWind(ParticleSession Particle Session, Vector3d wind)

參數

名稱型別預設值說明
Particle SessionParticle Session—
windVector3d—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

步進一幀

函數

按某個幀率把粒子推進一幀。

簽名
步進一幀
    Particle Session: Particle Session
    framesPerSecond: 數字
void StepFrame(
    ParticleSession Particle Session,
    double framesPerSecond = 30)

參數

名稱型別預設值說明
Particle SessionParticle Session—
framesPerSecond數字30
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬

開始粒子會話

函數

從一個粒子場景開始一個會話。

簽名
開始粒子會話(場景: Particle Scene Description) -> Particle Session
ParticleSession Start(ParticleSceneDescription scene)

參數

名稱型別預設值說明
場景Particle Scene Description—The scene.

返回

結果Particle Session
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
粒子會話
所屬包
物理模擬