- Implemented methods for determining amount of scene that has streamed in. (KRScene::getStreamLevel, KRNode::getStreamLevel, KRModel::getStreamLevel, KRMaterial::getStreamLevel, and KRTexture::getStreamLevel
- Implemented connection between LOD groups and texture streaming, which delays the switch to a new LOD group until the required textures have completed streaming in. - Corrected bug in KRMaterial that resulted in reflection cube texture names being formatted incorrectly in the mtl file - Scene graph now requires that lod_group nodes only be contained within lod_set nodes. - Scene graph group nodes that do not have a LOD minimum or maximum distance are now stored as "node" rather than as "lod_group" nodes. - IMPORTANT! Scenes exported with this version will not be backwards compatible with earlier versions due to the requirement of lod_set nodes. --HG-- branch : nfb extra : rebase_source : 1ff640b85338a794841ebbb2bf0087306ff59143
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#include "KRLODGroup.h"
|
||||
#include "KRLODSet.h"
|
||||
#include "KRContext.h"
|
||||
|
||||
KRLODGroup::KRLODGroup(KRScene &scene, std::string name) : KRNode(scene, name)
|
||||
@@ -128,22 +129,6 @@ bool KRLODGroup::getLODVisibility(const KRViewport &viewport)
|
||||
}
|
||||
}
|
||||
|
||||
void KRLODGroup::updateLODVisibility(const KRViewport &viewport)
|
||||
{
|
||||
bool new_visibility = getLODVisibility(viewport);
|
||||
if(!new_visibility) {
|
||||
hideLOD();
|
||||
} else {
|
||||
if(!m_lod_visible) {
|
||||
getScene().notify_sceneGraphCreate(this);
|
||||
m_lod_visible = true;
|
||||
}
|
||||
for(std::set<KRNode *>::iterator itr=m_childNodes.begin(); itr != m_childNodes.end(); ++itr) {
|
||||
(*itr)->updateLODVisibility(viewport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float KRLODGroup::getMinDistance()
|
||||
{
|
||||
return m_min_distance;
|
||||
|
||||
Reference in New Issue
Block a user