if (modelComponent!=null) {
return modelComponent.loadModel(entity);
}
if (deployedModel!=null) {
ModelLoader loader = deployedModel.getModelLoader();
if (loader==null) {
logger.warning("No loader for model "+deployedModel.getModelURL());
return new Node("No Loader");
}
Node ret = loader.loadDeployedModel(deployedModel, entity);
return ret;
}
ModelLoader loader = LoaderManager.getLoaderManager().getLoader(deployedModelURL);
if (loader==null) {
logger.warning("No loader for model "+deployedModel.getModelURL());
return new Node("No Loader");
}
deployedModel = new DeployedModel(deployedModelURL, loader);
deployedModel.setModelTranslation(modelTranslation);
deployedModel.setModelRotation(modelRotation);
deployedModel.setModelScale(modelScale);
return loader.loadDeployedModel(deployedModel, entity);
} finally {
// record statistics
loadTime.setValue(System.currentTimeMillis() - startTime);
getCell().getCellCache().getStatistics().add(getCell(), loadTime);
}