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:
@@ -83,40 +83,4 @@ void KRContext::loadResource(std::string path) {
|
||||
} else {
|
||||
fprintf(stderr, "KRContext::loadResource - Unknown resource file type: %s\n", path.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void KRContext::registerNotified(KRNotified *pNotified)
|
||||
{
|
||||
m_notifiedObjects.insert(pNotified);
|
||||
for(std::set<KRNode *>::iterator itr=m_allNodes.begin(); itr != m_allNodes.end(); itr++) {
|
||||
pNotified->notify_sceneGraphCreate(*itr);
|
||||
}
|
||||
}
|
||||
|
||||
void KRContext::unregisterNotified(KRNotified *pNotified)
|
||||
{
|
||||
m_notifiedObjects.erase(pNotified);
|
||||
}
|
||||
|
||||
void KRContext::notify_sceneGraphCreate(KRNode *pNode)
|
||||
{
|
||||
m_allNodes.insert(pNode);
|
||||
for(std::set<KRNotified *>::iterator itr = m_notifiedObjects.begin(); itr != m_notifiedObjects.end(); itr++) {
|
||||
(*itr)->notify_sceneGraphCreate(pNode);
|
||||
}
|
||||
}
|
||||
|
||||
void KRContext::notify_sceneGraphDelete(KRNode *pNode)
|
||||
{
|
||||
for(std::set<KRNotified *>::iterator itr = m_notifiedObjects.begin(); itr != m_notifiedObjects.end(); itr++) {
|
||||
(*itr)->notify_sceneGraphDelete(pNode);
|
||||
}
|
||||
m_allNodes.erase(pNode);
|
||||
}
|
||||
|
||||
void KRContext::notify_sceneGraphModify(KRNode *pNode)
|
||||
{
|
||||
for(std::set<KRNotified *>::iterator itr = m_notifiedObjects.begin(); itr != m_notifiedObjects.end(); itr++) {
|
||||
(*itr)->notify_sceneGraphModify(pNode);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user