private Node loadModel(InputStream in,
String name,
boolean applyColladaAxisAndScale,
ThreadSafeColladaImporter.LoaderErrorListener listener) {
Node modelNode;
ThreadSafeColladaImporter importer = new ThreadSafeColladaImporter(name);
importer.setErrorListener(listener);
importer.load(in);
modelNode = importer.getModel();
CullState culls = DisplaySystem.getDisplaySystem().getRenderer().createCullState();
culls.setCullFace(CullState.Face.Back);
modelNode.setRenderState(culls);
if (applyColladaAxisAndScale) {
// Adjust the scene transform to match the scale and axis specified in
// the collada file
float unitMeter = importer.getInstance().getUnitMeter();
modelNode.setLocalScale(unitMeter);
String upAxis = importer.getInstance().getUpAxis();
if ("Z_UP".equals(upAxis)) {
modelNode.setLocalRotation(new Quaternion(new float[] {-(float)Math.PI/2, 0f, 0f}));
} else if ("X_UP".equals(upAxis)) {
modelNode.setLocalRotation(new Quaternion(new float[] {0f, 0f, (float)Math.PI/2}));
} // Y_UP is the Wonderland default
}
importer.cleanUp();
setupBounds(modelNode);
// TreeScan.findNode(modelNode, new ProcessNodeInterface() {
//