Table of Contents

Class BlockInfo

命名空間
easyar

稠密重建得到的模型使用三角網格表示,稱為mesh。由於mesh會頻繁更新,為了保證效率,整個重建模型的mesh被分割成非常多的mesh block。一個mesh block由一個邊長約1米的立方體組成,其中有vertex和index等元素。 BlockInfo用來描述一個mesh block的內容。其中(x,y,z)是mesh block的索引,將(x,y,z)乘上每個mesh block的物理尺寸可獲得這個mesh block的原點在世界座標系中的座標。可透過mesh block在世界中的位置對需要顯示的部分進行提前過濾,以節省渲染所需的時間。

Record BlockInfo
BlockInfo

屬性

x

mesh block的索引(x,y,z)中的x。

int x
int x
public int x
public Int x
@property (nonatomic) int x
public var x: Int32
public int x

y

mesh block的索引(x,y,z)中的y。

int y
int y
public int y
public Int y
@property (nonatomic) int y
public var y: Int32
public int y

z

mesh block的索引(x,y,z)中的z。

int z
int z
public int z
public Int z
@property (nonatomic) int z
public var z: Int32
public int z

numOfVertex

一個mesh block中所擁有的頂點數目。

int numOfVertex
int numOfVertex
public int numOfVertex
public Int numOfVertex
@property (nonatomic) int numOfVertex
public var numOfVertex: Int32
public int numOfVertex

startPointOfVertex

頂點數據在vertex buffer中存放的起始位置,表示從第幾個頂點開始是屬於當前這個mesh block的。不等於偏移量的字節數,起始位置的偏移為startPointOfVertex34個字節。

int startPointOfVertex
int startPointOfVertex
public int startPointOfVertex
public Int startPointOfVertex
@property (nonatomic) int startPointOfVertex
public var startPointOfVertex: Int32
public int startPointOfVertex

numOfIndex

一個mesh block中所擁有的索引數目,每連續3個頂點構成一個三角面。

int numOfIndex
int numOfIndex
public int numOfIndex
public Int numOfIndex
@property (nonatomic) int numOfIndex
public var numOfIndex: Int32
public int numOfIndex

startPointOfIndex

與startPointOfVertex類似。索引數據在index buffer中存放的起始位置,表示從第幾個索引開始是屬於當前這個mesh block的。不等於偏移量的字節數,起始位置的偏移為startPointOfIndex34個字節。

int startPointOfIndex
int startPointOfIndex
public int startPointOfIndex
public Int startPointOfIndex
@property (nonatomic) int startPointOfIndex
public var startPointOfIndex: Int32
public int startPointOfIndex

version

當前mesh block更新的次數,version越大表示更新的次數更多。如果調用updateSceneMesh 後一個mesh block的version變大了,說明其中的內容發生了變化。

int version
int version
public int version
public Int version
@property (nonatomic) int version
public var version: Int32
public int version