NavMap
Loading...
Searching...
No Matches
test_links.cpp File Reference
#include <gtest/gtest.h>
#include <algorithm>
#include <cstdint>
#include <vector>
#include "navmap_core/NavMap.hpp"
Include dependency graph for test_links.cpp:

Typedefs

using NavCelId
 Index of a triangle (NavCel) within the global mesh.

Enumerations

enum class  LinkType
 Main container for navigable surfaces, geometry, and layers. More...

Functions

 TEST (GeometryId, EqualForEqualGeometryAndFollowsEdits)
 TEST (Links, AddQueryAndDefaultLength)
 TEST (Links, CopiesAndAssignmentsCarryTheLinks)
 TEST (Links, InvalidLinksAreRejected)
 TEST (Links, RemoveAndClearKeepTheIndexConsistent)

Typedef Documentation

◆ NavCelId

using NavCelId

Index of a triangle (NavCel) within the global mesh.

Enumeration Type Documentation

◆ LinkType

enum class LinkType : uint8_t
strong

Main container for navigable surfaces, geometry, and layers.

A navmap::NavMap aggregates vertex positions, a list of navmap::NavCel triangles (global indexing), one or more navmap::Surface partitions, and a navmap::LayerRegistry with arbitrary per-NavCel scalar attributes.

Typical workflow

  • Fill positions, navcels, and surfaces.
  • Call rebuild_geometry_accels() to compute normals, areas, adjacency, and build per-surface BVHs.
  • Create layers via LayerRegistry::add_or_get() sized to navcels.size().
  • Query with locate_navcel(), raycast(), or closest_navcel(). Kind of a link between NavCels that are not adjacent in the mesh.

Function Documentation

◆ TEST() [1/5]

TEST ( GeometryId ,
EqualForEqualGeometryAndFollowsEdits  )

◆ TEST() [2/5]

TEST ( Links ,
AddQueryAndDefaultLength  )

◆ TEST() [3/5]

TEST ( Links ,
CopiesAndAssignmentsCarryTheLinks  )

◆ TEST() [4/5]

TEST ( Links ,
InvalidLinksAreRejected  )

◆ TEST() [5/5]

TEST ( Links ,
RemoveAndClearKeepTheIndexConsistent  )