mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-05 13:17:49 +00:00
44 lines
1015 B
C++
44 lines
1015 B
C++
#pragma once
|
|
|
|
#include "FastCluster.h"
|
|
|
|
namespace RBX
|
|
{
|
|
namespace Graphics
|
|
{
|
|
|
|
class FastCluster;
|
|
class VisualEngine;
|
|
|
|
// TODO: remove debug stuff!
|
|
class SuperCluster
|
|
{
|
|
public:
|
|
SuperCluster(VisualEngine* ve, SpatialGrid<SuperCluster>* grid, const SpatialGridIndex& idx, bool fw);
|
|
~SuperCluster();
|
|
|
|
SpatialGrid<SuperCluster>* getSpatialGrid() const { return spatialGrid; }
|
|
const SpatialGridIndex& getSpatialIndex() const { return spatialIndex; }
|
|
|
|
FastCluster* addPart(const boost::shared_ptr<PartInstance>& part);
|
|
void checkCluster(FastCluster* fc);
|
|
void destroyFastCluster(FastCluster* fc);
|
|
void invalidateAllFastClusters();
|
|
|
|
private:
|
|
FastCluster* findBestCluster();
|
|
void clear();
|
|
|
|
VisualEngine* visualEngine;
|
|
SpatialGrid<SuperCluster>* spatialGrid;
|
|
SpatialGridIndex spatialIndex;
|
|
std::vector<FastCluster*> clusters;
|
|
FastCluster* lastCluster;
|
|
bool fw;
|
|
};
|
|
|
|
//*/
|
|
|
|
|
|
}}
|