public virtual osg.Group compileIndexOnly(CompileSession cs_interface) { CompileSessionImpl cs = (CompileSessionImpl)cs_interface; // make a profile describing this compilation setup: Profile profile = createProfile(); buildIndex(profile, cs.getOrCreateSceneGraph()); if (cs.getOrCreateSceneGraph() != null) { osgUtil.Optimizer opt; opt.optimize(cs.getOrCreateSceneGraph(), osgUtil.Optimizer.SPATIALIZE_GROUPS | osgUtil.Optimizer.STATIC_OBJECT_DETECTION | osgUtil.Optimizer.SHARE_DUPLICATE_STATE); } return(cs.getOrCreateSceneGraph()); }
public virtual bool finishCompiling(CompileSession cs_interface) { CompileSessionImpl cs = (CompileSessionImpl)cs_interface; cs.clearTaskQueue(); buildIndex(cs.getProfile(), cs.getOrCreateSceneGraph()); if (cs.getOrCreateSceneGraph() != null) { osgUtil.Optimizer opt; opt.optimize(cs.getOrCreateSceneGraph(), osgUtil.Optimizer.SPATIALIZE_GROUPS | osgUtil.Optimizer.STATIC_OBJECT_DETECTION | osgUtil.Optimizer.SHARE_DUPLICATE_STATE); } //osgGIS.notify( osg.NOTICE ) // << "Compilation finished, total time = " << cs.getElapsedTimeSeconds() << " seconds" // << std.endl; return(true); }