Octtree, bounding
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#ifndef HYDRAOCTTREE
|
||||
#define HYDRAOCTTREE
|
||||
|
||||
#include "../engine/HydraEngine.h"
|
||||
#include "../engine/HydraObject.h"
|
||||
#include "HydraOcttreeElement.h"
|
||||
|
||||
class HydraOcttree : public HydraObject
|
||||
{
|
||||
public:
|
||||
void Intialise();
|
||||
void AddEntity(HydraID entity_id);
|
||||
void RemoveEntity(HydraID entity_id);
|
||||
void UpdateEntity(HydraID entity_id);
|
||||
private:
|
||||
HydraOcttreeElement m_root {};
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* HYDRAOCTTREE */
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef HYDRAOCTTREEELEMENT
|
||||
#define HYDRAOCTTREEELEMENT
|
||||
#include "../engine/HydraObject.h"
|
||||
|
||||
struct HydraOcttreeElement
|
||||
{
|
||||
HydraID element_id = INVALID_HYDRA_ID;
|
||||
double origin[4] {};
|
||||
double dimension = 0;
|
||||
};
|
||||
|
||||
#endif /* HYDRAOCTTREEELEMENT */
|
||||
Reference in New Issue
Block a user