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变大了,说明其中的内容发生了变化。