SceneMesh Class

Description

SceneMesh is used to manage and preserve the results of DenseSpatialMap .

There are two kinds of meshes saved in SceneMesh, one is the mesh of the whole reconstructed scene, hereinafter referred to as meshAll, the other is the recently updated mesh, hereinafter referred to as meshUpdated. meshAll is a whole mesh, including all vertex data and index data, etc. meshUpdated is composed of several mesh block s, each mesh block is a cube, which contains the mesh formed by the object surface in the corresponding cube space.

meshAll is available only when the DenseSpatialMap.updateSceneMesh method is called specifying that all meshes need to be updated. If meshAll has been updated previously and not updated in recent times, the data in meshAll is remain the same.

getNumOfVertexAll

Get the number of vertices in meshAll.

C: int easyar_SceneMesh_getNumOfVertexAll(easyar_SceneMesh * This)
C++17: int getNumOfVertexAll()
Traditional C++: int getNumOfVertexAll()
Java: public int getNumOfVertexAll()
Kotlin: fun getNumOfVertexAll(): Int
Objective-C: - (int)getNumOfVertexAll
Swift: public func getNumOfVertexAll() -> Int32
C#: public virtual int getNumOfVertexAll()

getNumOfIndexAll

Get the number of indices in meshAll. Since every 3 indices form a triangle, the returned value should be a multiple of 3.

C: int easyar_SceneMesh_getNumOfIndexAll(easyar_SceneMesh * This)
C++17: int getNumOfIndexAll()
Traditional C++: int getNumOfIndexAll()
Java: public int getNumOfIndexAll()
Kotlin: fun getNumOfIndexAll(): Int
Objective-C: - (int)getNumOfIndexAll
Swift: public func getNumOfIndexAll() -> Int32
C#: public virtual int getNumOfIndexAll()

getVerticesAll

Get the position component of the vertices in meshAll (in the world coordinate system). The position of a vertex is described by three coordinates (x, y, z) in meters. The position data are stored tightly in Buffer by x1, y1, z1, x2, y2, z2, ... Each component is of float type.

C: void easyar_SceneMesh_getVerticesAll(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getVerticesAll()
Traditional C++: void getVerticesAll(Buffer * * Return)
Java: public @Nonnull Buffer getVerticesAll()
Kotlin: fun getVerticesAll(): Buffer
Objective-C: - (easyar_Buffer *)getVerticesAll
Swift: public func getVerticesAll() -> Buffer
C#: public virtual Buffer getVerticesAll()

getNormalsAll

Get the normal component of vertices in meshAll. The normal of a vertex is described by three components (nx, ny, nz). The normal is normalized, that is, the length is 1. Normal data are stored tightly in Buffer by nx1, ny1, nz1, nx2, ny2, nz2,.... Each component is of float type.

C: void easyar_SceneMesh_getNormalsAll(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getNormalsAll()
Traditional C++: void getNormalsAll(Buffer * * Return)
Java: public @Nonnull Buffer getNormalsAll()
Kotlin: fun getNormalsAll(): Buffer
Objective-C: - (easyar_Buffer *)getNormalsAll
Swift: public func getNormalsAll() -> Buffer
C#: public virtual Buffer getNormalsAll()

getIndicesAll

Get the index data in meshAll. Each triangle is composed of three indices (ix, iy, iz). Indices are stored tightly in Buffer by ix1, iy1, iz1, ix2, iy2, iz2,... Each component is of int32 type.

C: void easyar_SceneMesh_getIndicesAll(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getIndicesAll()
Traditional C++: void getIndicesAll(Buffer * * Return)
Java: public @Nonnull Buffer getIndicesAll()
Kotlin: fun getIndicesAll(): Buffer
Objective-C: - (easyar_Buffer *)getIndicesAll
Swift: public func getIndicesAll() -> Buffer
C#: public virtual Buffer getIndicesAll()

getNumOfVertexIncremental

Get the number of vertices in meshUpdated.

C: int easyar_SceneMesh_getNumOfVertexIncremental(easyar_SceneMesh * This)
C++17: int getNumOfVertexIncremental()
Traditional C++: int getNumOfVertexIncremental()
Java: public int getNumOfVertexIncremental()
Kotlin: fun getNumOfVertexIncremental(): Int
Objective-C: - (int)getNumOfVertexIncremental
Swift: public func getNumOfVertexIncremental() -> Int32
C#: public virtual int getNumOfVertexIncremental()

getNumOfIndexIncremental

Get the number of indices in meshUpdated. Since every 3 indices form a triangle, the returned value should be a multiple of 3.

C: int easyar_SceneMesh_getNumOfIndexIncremental(easyar_SceneMesh * This)
C++17: int getNumOfIndexIncremental()
Traditional C++: int getNumOfIndexIncremental()
Java: public int getNumOfIndexIncremental()
Kotlin: fun getNumOfIndexIncremental(): Int
Objective-C: - (int)getNumOfIndexIncremental
Swift: public func getNumOfIndexIncremental() -> Int32
C#: public virtual int getNumOfIndexIncremental()

getVerticesIncremental

Get the position component of the vertices in meshUpdated (in the world coordinate system). The position of a vertex is described by three coordinates (x, y, z) in meters. The position data are stored tightly in Buffer by x1, y1, z1, x2, y2, z2, ... Each component is of float type.

C: void easyar_SceneMesh_getVerticesIncremental(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getVerticesIncremental()
Traditional C++: void getVerticesIncremental(Buffer * * Return)
Java: public @Nonnull Buffer getVerticesIncremental()
Kotlin: fun getVerticesIncremental(): Buffer
Objective-C: - (easyar_Buffer *)getVerticesIncremental
Swift: public func getVerticesIncremental() -> Buffer
C#: public virtual Buffer getVerticesIncremental()

getNormalsIncremental

Get the normal component of vertices in meshUpdated. The normal of a vertex is described by three components (nx, ny, nz). The normal is normalized, that is, the length is 1. Normal data are stored tightly in Buffer by nx1, ny1, nz1, nx2, ny2, nz2,.... Each component is of float type.

C: void easyar_SceneMesh_getNormalsIncremental(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getNormalsIncremental()
Traditional C++: void getNormalsIncremental(Buffer * * Return)
Java: public @Nonnull Buffer getNormalsIncremental()
Kotlin: fun getNormalsIncremental(): Buffer
Objective-C: - (easyar_Buffer *)getNormalsIncremental
Swift: public func getNormalsIncremental() -> Buffer
C#: public virtual Buffer getNormalsIncremental()

getIndicesIncremental

Get the index data in meshUpdated. Each triangle is composed of three indices (ix, iy, iz). Indices are stored tightly in Buffer by ix1, iy1, iz1, ix2, iy2, iz2,... Each component is of int32 type.

C: void easyar_SceneMesh_getIndicesIncremental(easyar_SceneMesh * This, easyar_Buffer * * Return)
C++17: std::shared_ptr<Buffer> getIndicesIncremental()
Traditional C++: void getIndicesIncremental(Buffer * * Return)
Java: public @Nonnull Buffer getIndicesIncremental()
Kotlin: fun getIndicesIncremental(): Buffer
Objective-C: - (easyar_Buffer *)getIndicesIncremental
Swift: public func getIndicesIncremental() -> Buffer
C#: public virtual Buffer getIndicesIncremental()

getBlocksInfoIncremental

Gets the description object of mesh block in meshUpdate. The return value is an array of BlockInfo elements, each of which is a detailed description of a mesh block.

C: void easyar_SceneMesh_getBlocksInfoIncremental(easyar_SceneMesh * This, easyar_ListOfBlockInfo * * Return)
C++17: std::vector<BlockInfo> getBlocksInfoIncremental()
Traditional C++: void getBlocksInfoIncremental(ListOfBlockInfo * * Return)
Java: public java.util.@Nonnull ArrayList<@Nonnull BlockInfo> getBlocksInfoIncremental()
Kotlin: fun getBlocksInfoIncremental(): ArrayList<BlockInfo>
Objective-C: - (NSArray<easyar_BlockInfo *> *)getBlocksInfoIncremental
Swift: public func getBlocksInfoIncremental() -> [BlockInfo]
C#: public virtual List<BlockInfo> getBlocksInfoIncremental()

getBlockDimensionInMeters

Get the edge length of a mesh block in meters.

C: float easyar_SceneMesh_getBlockDimensionInMeters(easyar_SceneMesh * This)
C++17: float getBlockDimensionInMeters()
Traditional C++: float getBlockDimensionInMeters()
Java: public float getBlockDimensionInMeters()
Kotlin: fun getBlockDimensionInMeters(): Float
Objective-C: - (float)getBlockDimensionInMeters
Swift: public func getBlockDimensionInMeters() -> Float
C#: public virtual float getBlockDimensionInMeters()