Pathfinding with the SDK
Pathfinding is the process of finding the shortest path between two points. With pathfinding now available with the SDK, capabilities to guide users through a space or visualize a path can be built to enhance the user’s navigation or visual experience.
The new SDK addition can leverage a Matterport model’s information to generate a generalized graph and perform a pathfinding algorithm. Pathing between scan points, rooms, custom-placed models, and more can be achieved through the newest added namespace - Graph.
Check out interactive pathfinding on Matterport Labs!
The Graph Namespace
The Graph namespace provides generalized methods to both generate a directional graph and run the A* algorithm on it to find the shortest path between two vertices. Showcase SDK graphs allow for customizations around what data the vertices represent and hold, custom edge weights, and custom observers for any changes to the graph. The A* algorithm can be run with custom heuristic and cost functions, depending on the paths requirements.
Get started with pathfinding with the SDK!
Need a Quick Sweep Graph?
A new method, Sweep.createGraph, has been added to the Sweep namespace to assist with common scan point paths. This method provides most of the overhead work for generating a graph based on the scan points within a model.
Questions or feedback? Email our team at firstname.lastname@example.org.