changed code style

This commit is contained in:
2025-05-03 20:31:59 +03:00
parent fd37a252f8
commit 4406e1e461
70 changed files with 1258 additions and 1312 deletions

View File

@@ -3,9 +3,9 @@
//
#pragma once
#include <vector>
#include "omath/pathfinding/navigation_mesh.hpp"
#include "omath/vector3.hpp"
#include <vector>
namespace omath::pathfinding
{
@@ -14,17 +14,17 @@ namespace omath::pathfinding
{
public:
[[nodiscard]]
static std::vector<Vector3<float>> FindPath(const Vector3<float>& start, const Vector3<float>& end,
const NavigationMesh& navMesh);
static std::vector<Vector3<float>> find_path(const Vector3<float>& start, const Vector3<float>& end,
const NavigationMesh& nav_mesh);
private:
[[nodiscard]]
static std::vector<Vector3<float>>
ReconstructFinalPath(const std::unordered_map<Vector3<float>, PathNode>& closedList,
const Vector3<float>& current);
reconstruct_final_path(const std::unordered_map<Vector3<float>, PathNode>& closed_list,
const Vector3<float>& current);
[[nodiscard]]
static auto GetPerfectNode(const std::unordered_map<Vector3<float>, PathNode>& openList,
const Vector3<float>& endVertex);
static auto get_perfect_node(const std::unordered_map<Vector3<float>, PathNode>& open_list,
const Vector3<float>& endVertex);
};
} // namespace omath::pathfinding

View File

@@ -4,10 +4,10 @@
#pragma once
#include "omath/vector3.hpp"
#include <expected>
#include <string>
#include <vector>
#include "omath/vector3.hpp"
namespace omath::pathfinding
{
@@ -21,18 +21,18 @@ namespace omath::pathfinding
{
public:
[[nodiscard]]
std::expected<Vector3<float>, std::string> GetClosestVertex(const Vector3<float>& point) const;
std::expected<Vector3<float>, std::string> get_closest_vertex(const Vector3<float>& point) const;
[[nodiscard]]
const std::vector<Vector3<float>>& GetNeighbors(const Vector3<float>& vertex) const;
const std::vector<Vector3<float>>& get_neighbors(const Vector3<float>& vertex) const;
[[nodiscard]]
bool Empty() const;
bool empty() const;
[[nodiscard]] std::vector<uint8_t> Serialize() const;
[[nodiscard]] std::vector<uint8_t> serialize() const;
void Deserialize(const std::vector<uint8_t>& raw);
void deserialize(const std::vector<uint8_t>& raw);
std::unordered_map<Vector3<float>, std::vector<Vector3<float>>> m_verTextMap;
std::unordered_map<Vector3<float>, std::vector<Vector3<float>>> m_vertex_map;
};
} // namespace omath::pathfinding