39 lines
925 B
C++
39 lines
925 B
C++
#pragma once
|
|
|
|
#include "mapcollider.h"
|
|
|
|
namespace navmesh
|
|
{
|
|
class vertex;
|
|
}
|
|
|
|
namespace mt
|
|
{
|
|
|
|
class MapCollider
|
|
{
|
|
protected:
|
|
static std::vector<std::shared_ptr<MapCollider>> raw_list;
|
|
static std::map<std::string, std::shared_ptr<MapCollider>> name_hash;
|
|
|
|
public:
|
|
|
|
static std::shared_ptr<MapCollider> GetByName(const std::string& name);
|
|
static void StaticPostInit();
|
|
|
|
static void LoadAll();
|
|
|
|
public:
|
|
|
|
void Load(const std::string& filename);
|
|
void LoadTerrain(const std::string& filename);
|
|
void SaveToObjFile(const std::string& filename, const navmesh::vertex& vert_pb);
|
|
std::shared_ptr<mc::ColliderNode> GetNode(const std::string& name);
|
|
std::map<std::string, std::shared_ptr<mc::ColliderNode>>& GetNodes() { return nodes_; };
|
|
|
|
private:
|
|
std::map<std::string, std::shared_ptr<mc::ColliderNode>> nodes_;
|
|
};
|
|
|
|
}
|