protected void AddLODSceneObject ( GVRSceneObject currentSceneObject ) { if ( this . transformLODSceneObject != null ) { GVRSceneObject levelOfDetailSceneObject = null ; if ( currentSceneObject . getParent ( ) == this . transformLODSceneObject ) { levelOfDetailSceneObject = currentSceneObject ; } else { GVRSceneObject lodSceneObj = root . getSceneObjectByName ( ( currentSceneObject . getName ( ) + TRANSFORM_TRANSLATION_ ) ) ; if ( lodSceneObj != null ) { if ( lodSceneObj . getParent ( ) == this . transformLODSceneObject ) { levelOfDetailSceneObject = lodSceneObj ; } } if ( levelOfDetailSceneObject == null ) { lodSceneObj = root . getSceneObjectByName ( ( currentSceneObject . getName ( ) + TRANSFORM_ROTATION_ ) ) ; if ( lodSceneObj != null ) { if ( lodSceneObj . getParent ( ) == this . transformLODSceneObject ) { levelOfDetailSceneObject = lodSceneObj ; } } } if ( levelOfDetailSceneObject == null ) { lodSceneObj = root . getSceneObjectByName ( ( currentSceneObject . getName ( ) + TRANSFORM_SCALE_ ) ) ; if ( lodSceneObj != null ) { if ( lodSceneObj . getParent ( ) == this . transformLODSceneObject ) { levelOfDetailSceneObject = lodSceneObj ; } } } } if ( levelOfDetailSceneObject != null ) { final GVRLODGroup lodGroup = ( GVRLODGroup ) this . transformLODSceneObject . getComponent ( GVRLODGroup . getComponentType ( ) ) ; lodGroup . addRange ( this . getMinRange ( ) , levelOfDetailSceneObject ) ; this . increment ( ) ; } } }
Add the currentSceneObject to an active Level - of - Detail