DenseSpatialMap Class¶
This type is an EasyAR Sense API in C#: DenseSpatialMap . Some descriptions may not apply to Unity environment on this page.
This type is partially wrapped into Unity components: DenseSpatialMapBuilderFrameFilter . Members and instances of this type are not required to be used directly in most situations. Use this type by DenseSpatialMapBuilderFrameFilter.Builder instead of creating new instances when a few unwrapped API is desired for use.
Description¶
DenseSpatialMap is used to reconstruct the environment accurately and densely. The reconstructed model is represented by triangle mesh, which is denoted simply by mesh.
DenseSpatialMap occupies 1 buffers of camera.
Methods¶
isAvailable¶
- C#
public static bool isAvailable()
Returns True when the device supports dense reconstruction, otherwise returns False.
inputFrameSink¶
- C#
public virtual InputFrameSink inputFrameSink()
Input port for input frame. For DenseSpatialMap to work, the inputFrame must include image and it’s camera parameters and spatial information (cameraTransform and trackingStatus). See also InputFrameSink .
Note: Both pinhole and fisheye camera are supported. But performance may decrease while using a fisheye camera.
bufferRequirement¶
- C#
public virtual int bufferRequirement()
Camera buffers occupied in this component.
create¶
- C#
public static DenseSpatialMap create()
Create DenseSpatialMap object.
start¶
- C#
public virtual bool start()
Start or continue runninng DenseSpatialMap algorithm.
stop¶
- C#
public virtual void stop()
Pause the reconstruction algorithm. Call start to resume reconstruction.
close¶
- C#
public virtual void close()
Close DenseSpatialMap algorithm.
getMesh¶
- C#
public virtual SceneMesh getMesh()
Get the mesh management object of type SceneMesh . The contents will automatically update after calling the DenseSpatialMap.updateSceneMesh function.
updateSceneMesh¶
- C#
public virtual bool updateSceneMesh(bool updateMeshAll)
Get the lastest updated mesh and save it to the SceneMesh object obtained by DenseSpatialMap.getMesh .
The parameter updateMeshAll indicates whether to perform a full update or an incremental update. When updateMeshAll is True, full update is performed. All meshes are saved to SceneMesh . When updateMeshAll is False, incremental update is performed, and only the most recently updated mesh is saved to SceneMesh .
Full update will take extra time and memory space, causing performance degradation.