iterative closest points
CEV ICP algorithm library
Loading...
Searching...
No Matches
lidar_view.h
Go to the documentation of this file.
1/*
2 * @author Ethan Uppal
3 * @copyright Copyright (C) 2024 Ethan Uppal. All rights reserved.
4 */
5
6#pragma once
7
8#include <SDL.h>
9#include <vector>
10#include <sdlwrapper/gui/view.h>
11#include <sdlwrapper/util/keyboard.h>
12#include "icp/icp.h"
13
14class LidarView final : public View {
15 std::vector<icp::Vector> source;
16 std::vector<icp::Vector> destination;
17 std::unique_ptr<icp::ICP> icp;
18 Keyboard keyboard;
19 bool is_iterating;
20 size_t iterations;
21
22 void step();
23
24public:
27 LidarView(std::vector<icp::Vector> source, std::vector<icp::Vector> destination,
28 const std::string method, const icp::ICP::Config& config = icp::ICP::Config());
29
30 ~LidarView() noexcept override;
31 void on_event(const SDL_Event& event) override;
32 void draw(SDL_Renderer* renderer, const SDL_Rect* frame, double dtime) override;
33};
void on_event(const SDL_Event &event) override
LidarView(std::vector< icp::Vector > source, std::vector< icp::Vector > destination, const std::string method, const icp::ICP::Config &config=icp::ICP::Config())
Constructs a new lidar view visualizing ICP (by method method) on the given instance (source and dest...
~LidarView() noexcept override
void draw(SDL_Renderer *renderer, const SDL_Rect *frame, double dtime) override
Configuration for ICP instances.
Definition icp.h:92
Definition geo.cpp:9