Skip to content

Commit

Permalink
Fix return data
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Vela <[email protected]>
  • Loading branch information
pvela2017 committed Oct 22, 2024
1 parent 48a91e4 commit d5f800d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class SparsePointCloud3 {

/// Get the unorganized 3D point collection as an Eigen Map<Eigen::Vector3>.
[[nodiscard]] auto points() const {
return ranges::views::iota(0, points_.size()) |
ranges::views::transform([this](int i) { return Eigen::Map<const Eigen::Vector3<T>>(points_.at(i)); });
return ranges::views::iota(0, static_cast<int>(points_.size())) | ranges::views::transform([this](int i) {
return Eigen::Map<const Eigen::Vector3<T>>(points_.data()->data());
});
}

private:
Expand Down

0 comments on commit d5f800d

Please sign in to comment.