class DeviceMapAccessController
(Niantic.Lightship.AR.Mapping.DeviceMapAccessController)
Overview
Class to access primitive device map data and configs
class DeviceMapAccessController {
public:
// properties
DeviceMapAccessController Instance;
OutputEdgeType OutputEdgeType;
// methods
void ClearDeviceMap();
void AddMapNode(byte[] dataBytes);
void AddSubGraph(byte[] dataBytes);
bool GetMapNodes(out MapNode[] maps);
bool GetSubGraphs(out MapSubGraph[] blobs);
bool CreateAnchorFromMapNode(
MapNode map,
Matrix4x4 pose,
out byte[] anchorPayload
);
bool MergeSubGraphs(
MapSubGraph[] subgraphs,
bool onlyKeepLatestEdges,
out MapSubGraph mergedSubgraph
);
void ExtractMapMetaData(
byte[] mapBlob,
out Vector3[] points,
out float[] errors,
out Vector3 center,
out string mapType
);
};
Detailed Documentation
Class to access primitive device map data and configs
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Properties
OutputEdgeType
OutputEdgeType OutputEdgeType
Specifies what type of edges will be output by GetSubGraphs() When set, this config takes in effect immediately
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Methods
ClearDeviceMap
void ClearDeviceMap()
Clear map/graph node locally registered in the localizer
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
AddMapNode
void AddMapNode(byte[] dataBytes)
Add a map node to the localizer
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
dataBytes
- map node blob data as a byte array
AddSubGraph
void AddSubGraph(byte[] dataBytes)
Add graph(s) to the localizer
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
dataBytes
- graph blob data as a byte array
GetMapNodes
bool GetMapNodes(out MapNode[] maps)
Get the map data generated
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
maps
- an array of map data
Returns:
True if any maps generated. False if no map has been generated so far
GetSubGraphs
bool GetSubGraphs(out MapSubGraph[] blobs)
Get graph data of map nodes
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
blobs
- an array of graphs
Returns:
True if any graph generated. False if no graph has been generated so far
CreateAnchorFromMapNode
bool CreateAnchorFromMapNode(
MapNode map,
Matrix4x4 pose,
out byte[] anchorPayload
)
Generates Anchor (as payload) from MapNode
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
map
- A map node, device map
pose
- A local pose of the anchor to create
anchorPayload
- anchor payload as byte array
Returns:
True if byte array representing the anchor that can be wrapped by namespace Niantic.Lightship.AR.PersistentAnchors
MergeSubGraphs
bool MergeSubGraphs(
MapSubGraph[] subgraphs,
bool onlyKeepLatestEdges,
out MapSubGraph mergedSubgraph
)
Merges Map Subgraphs
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
subgraphs
- Array of subgraphs to merge
onlyKeepLatestEdges
- If true, it only keeps latest edge between two given nodes
mergedSubgraph
- Output merged subgraph
Returns:
True if merge succeeded
ExtractMapMetaData
void ExtractMapMetaData(
byte[] mapBlob,
out Vector3[] points,
out float[] errors,
out Vector3 center,
out string mapType
)
Extract map metadata from the map blob data
Parameters:
mapBlob
- map blob data as byte array
points
- feature points relative to the map center
errors
- error of each points
center
- map center in the mapping coordinate system
mapType
- indicate type of the map data