Table of Contents

Struct BlockInfo

네임스페이스
easyar
어셈블리
EasyAR.Sense.dll

dense reconstruction으로 얻은 모델은 triangle mesh로 표현되며 mesh라고 합니다. mesh는 자주 업데이트되므로 효율을 보장하기 위해 전체 재구성 모델의 mesh는 많은 mesh block으로 분할됩니다. 하나의 mesh block은 한 변의 길이가 약 1미터인 큐브로 구성되며 vertex와 index 등의 요소가 있습니다.

BlockInfo는 mesh block의 내용을 설명합니다. 여기서 (x,y,z)는 mesh block의 index입니다. (x,y,z)에 각 mesh block의 물리적 크기를 곱하면 이 mesh block의 origin이 world coordinate system에서 가지는 좌표를 얻을 수 있습니다. 표시해야 하는 부분은 world에서 mesh block의 위치를 기준으로 미리 필터링하여 렌더링에 필요한 시간을 절약할 수 있습니다.
</p>
public struct BlockInfo

생성자

BlockInfo(int, int, int, int, int, int, int, int)

public BlockInfo(int x, int y, int z, int numOfVertex, int startPointOfVertex, int numOfIndex, int startPointOfIndex, int version)

매개 변수

x
y
z
numOfVertex
startPointOfVertex
numOfIndex
startPointOfIndex
version

필드

numOfIndex

하나의 mesh block이 가진 indices 수입니다. 연속된 3개의 vertices가 하나의 triangular face를 구성합니다.

public int numOfIndex

numOfVertex

하나의 mesh block이 가진 vertices 수입니다.

public int numOfVertex

startPointOfIndex

startPointOfVertex와 유사합니다. index data가 index buffer에 저장되는 시작 위치이며, 현재 mesh block이 몇 번째 index부터 시작되는지를 나타냅니다. offset의 바이트 수가 아닙니다. 시작 위치의 offset은 startPointOfIndex*3*4 bytes입니다.

public int startPointOfIndex

startPointOfVertex

vertex data가 vertex buffer에 저장되는 시작 위치이며, 현재 mesh block이 몇 번째 vertex부터 시작되는지를 나타냅니다. offset의 바이트 수가 아닙니다. 시작 위치의 offset은 startPointOfVertex*3*4 bytes입니다.

public int startPointOfVertex

version

현재 mesh block이 업데이트된 횟수입니다. version이 클수록 업데이트 횟수가 더 많음을 나타냅니다. `DenseSpatialMap.updateSceneMesh`_를 호출한 후 mesh block의 version이 커졌다면 그 내용이 변경되었음을 의미합니다.

public int version

x

mesh block의 index (x,y,z) 중 x입니다.

public int x

y

mesh block의 index (x,y,z) 중 y입니다.

public int y

z

mesh block의 index (x,y,z) 중 z입니다.

public int z