mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-25 13:58:55 -05:00
304304e6bc
Co-Authored-By: Emil Wallberg <49481622+EmilWallberg@users.noreply.github.com>
32 lines
641 B
C++
32 lines
641 B
C++
#ifndef __OPENSPACE_MODULE_BLACKHOLE___KDTREE___H__
|
|
#define __OPENSPACE_MODULE_BLACKHOLE___KDTREE___H__
|
|
#include <glm/glm.hpp>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
namespace openspace {
|
|
namespace kdtree{}
|
|
class KDTree {
|
|
public:
|
|
KDTree() {};
|
|
|
|
size_t size() { return tree.size() * 6; };
|
|
|
|
void build(std::string const& filePath, glm::vec3 const & origin);
|
|
|
|
std::vector<float> flatTree() const;
|
|
|
|
private:
|
|
struct Node {
|
|
glm::fvec3 position;
|
|
float color;
|
|
float lum;
|
|
float absMag;
|
|
};
|
|
|
|
std::vector<Node> tree{};
|
|
};
|
|
}
|
|
|
|
#endif
|