元編程參考文件

潑濺檔案

6 個節點

本頁內容 6

描述

函數

過載 1/2

簽名
描述(路徑: 文字) -> Splat File Description
SplatFileDescription Describe(string path)

不構建雲,報告一個檔案的格式、潑濺數、球諧階數和範圍。PLY 和 .splat 逐塊掃描求出範圍;壓縮 PLY、glTF 和 SOG 在開頭就寫明瞭;SPZ 只解壓它的位置。

參數

名稱型別預設值說明
路徑文字—

返回

結果Splat File Description

過載 2/2

簽名
描述(流: Stream) -> Splat File Description
SplatFileDescription Describe(Stream stream)

不構建雲,報告一個流的格式、潑濺數、球諧階數和範圍。

參數

名稱型別預設值說明
流Stream—

返回

結果Splat File Description
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形

檢測格式

函數

按內容判斷檔案的格式:PLY、glTF、gzip、NGSP 或 zip 的簽名,或者是 glTF 或 SOG meta.json 的 JSON。.splat 沒有簽名,按副檔名識別。

簽名
檢測格式(路徑: 文字) -> Splat Format
SplatFormat DetectFormat(string path)

參數

名稱型別預設值說明
路徑文字—

返回

結果Splat Format
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形

取得格式座標軸

函數

一種格式存放潑濺所用的座標軸約定:SPZ 為右、上、後,glTF 為左、上、前;PLY、壓縮 PLY、.splat 和 SOG 為未指定,它們存的是訓練器產出的樣子。

簽名
取得格式座標軸(格式: Splat Format) -> Splat Axes
SplatAxes GetFormatAxes(SplatFormat format)

參數

名稱型別預設值說明
格式Splat Format—

返回

結果Splat Axes
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形

按副檔名取得格式

函數

檔名的副檔名所指的格式,不指任何格式時為自動:.compressed.ply、.ply、.splat、.spz、.gltf、.glb、.sog,以及 SOG 的 meta.json 所用的 .json。

簽名
按副檔名取得格式(路徑: 文字) -> Splat Format
SplatFormat GetFormatFromExtension(string path)

參數

名稱型別預設值說明
路徑文字—

返回

結果Splat Format
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形

載入

函數

過載 1/4

簽名
載入(路徑: 文字) -> Splat Cloud
SplatCloud Load(string path)

載入潑濺檔案,從內容判斷格式,返回訓練器座標軸(x 向右,y 向下,z 向前)下的雲。

參數

名稱型別預設值說明
路徑文字—

返回

結果Splat Cloud

過載 2/4

簽名
載入(路徑: 文字, 選項: Splat Load Options) -> Splat Cloud
SplatCloud Load(string path, SplatLoadOptions options)

按選項載入潑濺檔案:用指定的格式代替判斷出的格式,讓結果採用另一種座標軸約定,或說明檔案所用的座標軸。

參數

名稱型別預設值說明
路徑文字—
選項Splat Load Options—

返回

結果Splat Cloud

過載 3/4

簽名
載入(流: Stream) -> Splat Cloud
SplatCloud Load(Stream stream)

從流載入潑濺檔案,從內容判斷格式。緩衝區在外面的 glTF 和散放在資料夾裡的 SOG 要用路徑載入。

參數

名稱型別預設值說明
流Stream—

返回

結果Splat Cloud

過載 4/4

簽名
載入(流: Stream, 選項: Splat Load Options) -> Splat Cloud
SplatCloud Load(Stream stream, SplatLoadOptions options)

按選項從流載入潑濺檔案。

參數

名稱型別預設值說明
流Stream—
選項Splat Load Options—

返回

結果Splat Cloud
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形

儲存

函數

過載 1/4

簽名
儲存(潑濺雲: Splat Cloud, 路徑: 文字)
void Save(SplatCloud cloud, string path)

按副檔名所指的格式儲存雲:.ply、.compressed.ply、.splat、.spz、.gltf(旁邊帶一個 .bin)、.glb、.sog,或用 meta.json 把 SOG 作為散放的檔案存進那個資料夾。雲被視為在訓練器的座標軸下,格式有自己的座標軸時轉換過去。

參數

名稱型別預設值說明
潑濺雲Splat Cloud—
路徑文字—

過載 2/4

簽名
儲存(潑濺雲: Splat Cloud, 路徑: 文字, 選項: Splat Save Options)
void Save(
    SplatCloud cloud,
    string path,
    SplatSaveOptions options)

按選項儲存雲:用指定的格式代替副檔名的,雲所在的座標軸,要存的座標軸,以及各格式自己的設定。

參數

名稱型別預設值說明
潑濺雲Splat Cloud—
路徑文字—
選項Splat Save Options—

過載 3/4

簽名
儲存(潑濺雲: Splat Cloud, 流: Stream, 格式: Splat Format)
void Save(SplatCloud cloud, Stream stream, SplatFormat format)

以指定的格式和預設設定把雲儲存到流。寫到流裡的 .gltf 把緩衝區作為 data URI 嵌入;SOG 寫成它的 zip 包。

參數

名稱型別預設值說明
潑濺雲Splat Cloud—
流Stream—
格式Splat Format—

過載 4/4

簽名
儲存(潑濺雲: Splat Cloud, 流: Stream, 選項: Splat Save Options)
void Save(
    SplatCloud cloud,
    Stream stream,
    SplatSaveOptions options)

按選項把雲儲存到流;選項必須寫明格式。

參數

名稱型別預設值說明
潑濺雲Splat Cloud—
流Stream—
選項Splat Save Options—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
潑濺檔案
所屬包
電腦圖形