DarkflameServer/dPhysics/dpWorld.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.0 KiB
C
Raw Permalink Normal View History

#pragma once
#include "Singleton.h"
//Navmesh includes:
#include "Recast.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshBuilder.h"
#include "DetourNavMeshQuery.h"
#include <vector>
#include <map>
#include "dNavMesh.h"
class NiPoint3;
class dpEntity;
class dpGrid;
class dpWorld : public Singleton<dpWorld> {
public:
void Initialize(unsigned int zoneID);
~dpWorld();
bool ShouldUseSP(unsigned int zoneID);
bool IsLoaded() const { return m_NavMesh->GetdtNavMesh() != nullptr; }
void StepWorld(float deltaTime);
void AddEntity(dpEntity* entity);
void RemoveEntity(dpEntity* entity);
dNavMesh* GetNavMesh() { return m_NavMesh; }
2022-09-04 10:47:53 +00:00
std::vector<dpEntity*>* GetStaticEntities() { return &m_StaticEntities; }
std::vector<dpEntity*>* GetDynamicEntities() { return &m_DynamicEntites; }
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;
dNavMesh* m_NavMesh = nullptr;
};