NavMap
Loading...
Searching...
No Matches
Positions Struct Reference

Structure-of-arrays for storing 3D vertex positions. More...

#include <NavMap.hpp>

Collaboration diagram for Positions:

Public Member Functions

Eigen::Vector3f at (PointId id) const
 Returns vertex id as a 3D vector.
 
size_t size () const
 

Public Attributes

std::vector< float > x
 X coordinates (meters)
 
std::vector< float > y
 Y coordinates (meters)
 
std::vector< float > z
 Z coordinates (meters)
 

Detailed Description

Structure-of-arrays for storing 3D vertex positions.

Positions are stored in separate x/y/z arrays for cache-friendly access and easy interop. Use navmap::Positions::at() to read a vertex as an Eigen vector.

Invariant
size() == x.size() == y.size() == z.size()

Member Function Documentation

◆ at()

Eigen::Vector3f at ( PointId id) const

Returns vertex id as a 3D vector.

Parameters
idVertex index (0-based).
Returns
Eigen::Vector3f with (x,y,z).
Warning
No bounds checking is performed.

◆ size()

size_t size ( ) const
Returns
Number of vertices stored.

Member Data Documentation

◆ x

std::vector<float> x

X coordinates (meters)

◆ y

std::vector<float> y

Y coordinates (meters)

◆ z

std::vector<float> z

Z coordinates (meters)


The documentation for this struct was generated from the following file: