build octree async and reuse tree from last frame (disabled as it breaks physics)
This commit is contained in:
@ -31,22 +31,20 @@ public:
|
||||
public:
|
||||
octree() = default;
|
||||
|
||||
octree(const octree& copy) = delete;
|
||||
auto operator=(const octree& copy) -> octree& = delete;
|
||||
octree(octree&& move) = delete;
|
||||
auto operator=(octree&& move) -> octree& = delete;
|
||||
// octree(const octree& copy) = delete;
|
||||
// auto operator=(const octree& copy) -> octree& = delete;
|
||||
// octree(octree&& move) = delete;
|
||||
// auto operator=(octree&& move) -> octree& = delete;
|
||||
|
||||
public:
|
||||
auto create_empty_leaf(const Vector3& box_min, const Vector3& box_max) -> int;
|
||||
|
||||
[[nodiscard]] auto get_octant(int node_idx, const Vector3& pos) const -> int;
|
||||
|
||||
[[nodiscard]] auto get_child_bounds(int node_idx, int octant) const
|
||||
-> std::pair<Vector3, Vector3>;
|
||||
|
||||
auto create_empty_leaf(const Vector3& box_min, const Vector3& box_max) -> int;
|
||||
auto insert(int node_idx, int mass_id, const Vector3& pos, float mass, int depth) -> void;
|
||||
static auto build_octree(octree& t, const std::vector<Vector3>& positions) -> void;
|
||||
|
||||
[[nodiscard]] auto calculate_force(int node_idx, const Vector3& pos) const -> Vector3;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user