This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
#pragma once
#include "v8World/SpatialHashMultiRes.h"
#include <boost/unordered_set.hpp>
namespace RBX
{
class FrameRateManager;
}
namespace RBX
{
namespace Graphics
{
class VisualEngine;
class CullableSceneNode;
class RenderCamera;
class RenderQueue;
class GfxSpatialHash;
class SpatialHashedScene
{
public:
SpatialHashedScene();
~SpatialHashedScene();
bool isAdmissible(CullableSceneNode* child);
void internalUpdateChild(CullableSceneNode* child);
void internalRemoveChild(CullableSceneNode* child);
GfxSpatialHash* getSpatialHash() const { return spatialHash.get(); }
void queryFrustumOrdered(std::vector<CullableSceneNode*>& nodes, const RenderCamera& camera, const Vector3& pointOfInterest, FrameRateManager* frm);
void querySphere(std::vector<CullableSceneNode*>& nodes, const Vector3& center, float radius, unsigned int flags);
void queryExtents(std::vector<CullableSceneNode*>& nodes, const Extents& extents, unsigned int flags);
std::vector<CullableSceneNode*> getAllNodes() const;
private:
typedef boost::unordered_set<CullableSceneNode*> UnhashedNodes;
static const float maxAdmissibleVolume;
static const float maxAdmissibleLength;
static int globalFrameNumber;
scoped_ptr<GfxSpatialHash> spatialHash;
UnhashedNodes unhashedNodes;
static int getNextFrame();
};
}
}