BlockInfo Struct

This type is an EasyAR Sense API in C#: BlockInfo . Some descriptions may not apply to Unity environment on this page.

This type is partially wrapped into Unity components: DenseSpatialMapBlockController . Members and instances of this type are not required to be used directly in most situations. Use this type by DenseSpatialMapBlockController.Info instead of creating new instances when a few unwrapped API is desired for use.

Description

The dense reconstructed model is represented by triangle mesh, or simply denoted as mesh. Because mesh updates frequently, in order to ensure efficiency, the mesh of the whole reconstruction model is divided into many mesh blocks. A mesh block is composed of a cube about 1 meter long, with attributes such as vertices and indices.

BlockInfo is used to describe the content of a mesh block. (x, y, z) is the index of mesh block, the coordinates of a mesh block’s origin in world coordinate system can be obtained by multiplying (x, y, z) by the physical size of mesh block. You may filter the part you want to display in advance by the mesh block’s world coordinates for the sake of saving rendering time.


Fields

x

C#

public int x

x in index (x, y, z) of mesh block.

y

C#

public int y

y in index (x, y, z) of mesh block.

z

C#

public int z

z in index (x, y, z) of mesh block.

numOfVertex

C#

public int numOfVertex

Number of vertices in a mesh block.

startPointOfVertex

C#

public int startPointOfVertex

startPointOfVertex is the starting position of the vertex data stored in the vertex buffer, indicating from where the stored vertices belong to current mesh block. It is not equal to the number of bytes of the offset from the beginning of vertex buffer. The offset is startPointOfVertex*3*4 bytes.

numOfIndex

C#

public int numOfIndex

The number of indices in a mesh block. Each of three consecutive vertices form a triangle.

startPointOfIndex

C#

public int startPointOfIndex

Similar to startPointOfVertex. startPointOfIndex is the starting position of the index data stored in the index buffer, indicating from where the stored indices belong to current mesh block. It is not equal to the number of bytes of the offset from the beginning of index buffer. The offset is startPointOfIndex*3*4 bytes.

version

C#

public int version

Version represents how many times the mesh block has updated. The larger the version, the newer the block. If the version of a mesh block increases after calling DenseSpatialMap.updateSceneMesh , it indicates that the mash block has changed.