2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
2022-08-02 05:30:19 +00:00
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
#include "Singleton.h"
|
|
|
|
|
|
|
|
//Navmesh includes:
|
|
|
|
#include "Recast.h"
|
|
|
|
#include "DetourNavMesh.h"
|
|
|
|
#include "DetourNavMeshBuilder.h"
|
|
|
|
#include "DetourNavMeshQuery.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
|
|
|
|
2022-08-02 05:30:19 +00:00
|
|
|
#include "dNavMesh.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
class NiPoint3;
|
|
|
|
class dpEntity;
|
|
|
|
class dpGrid;
|
|
|
|
|
|
|
|
class dpWorld : public Singleton<dpWorld> {
|
|
|
|
public:
|
|
|
|
void Initialize(unsigned int zoneID);
|
|
|
|
|
|
|
|
~dpWorld();
|
|
|
|
|
|
|
|
bool ShouldUseSP(unsigned int zoneID);
|
2022-08-02 05:30:19 +00:00
|
|
|
bool IsLoaded() const { return m_NavMesh != nullptr; }
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
void StepWorld(float deltaTime);
|
|
|
|
|
|
|
|
void AddEntity(dpEntity* entity);
|
|
|
|
void RemoveEntity(dpEntity* entity);
|
|
|
|
|
2022-08-02 05:30:19 +00:00
|
|
|
dNavMesh* GetNavMesh() { return m_NavMesh; }
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
|
|
|
dpGrid* m_Grid;
|
|
|
|
bool phys_spatial_partitioning = 1;
|
|
|
|
int phys_sp_tilesize = 205;
|
|
|
|
int phys_sp_tilecount = 12;
|
|
|
|
|
|
|
|
std::vector<dpEntity*> m_StaticEntities;
|
|
|
|
std::vector<dpEntity*> m_DynamicEntites;
|
|
|
|
|
2022-08-04 13:54:14 +00:00
|
|
|
dNavMesh* m_NavMesh = nullptr;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|