Implemented KROctree class to be used by upcoming occlusion culling and physics features

Refactored scene graph notification system structures to be owned by the KRScene object
Merged Mike's changes

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4082
This commit is contained in:
kearwood
2012-08-29 21:43:11 +00:00
parent 43a4ecd2ea
commit f8810110cd
31 changed files with 551 additions and 137 deletions

View File

@@ -42,6 +42,7 @@
#import "KRCamera.h"
#import "KRModelManager.h"
#import "KRNode.h"
#import "KROctree.h"
class KRBoundingVolume;
class KRInstance;
class KRDirectionalLight;
@@ -69,6 +70,14 @@ public:
KRBoundingVolume getExtents(KRContext *pContext);
double sun_pitch, sun_yaw;
void registerNotified(KRNotified *pNotified);
void unregisterNotified(KRNotified *pNotified);
void notify_sceneGraphCreate(KRNode *pNode);
void notify_sceneGraphDelete(KRNode *pNode);
void notify_sceneGraphModify(KRNode *pNode);
private:
KRContext *m_pContext;
KRDirectionalLight *findFirstDirectionalLight(KRNode &node);
@@ -76,6 +85,14 @@ private:
KRNode *m_pRootNode;
KRBoundingVolume *m_pExtents;
KRDirectionalLight *m_pFirstDirectionalLight;
std::set<KRNotified *> m_notifiedObjects;
std::set<KRNode *> m_allNodes;
std::set<KRNode *> m_newNodes;
std::set<KRNode *> m_modifiedNodes;
KROctree m_nodeTree;
void updateOctree();
};