public String toString() { String ret = "\t\t\t<Add3DSFile>\n\t\t\t\t<Name>" + fileName + "</Name>\n"; if (getAppearance() != null) ret += getAppearance().toString(); ret += "\t\t\t</Add3DSFile>\n"; return ret; } }
public String toString() { String ret = "\t\t\t<Add3DSFile>\n\t\t\t\t<Name>" + fileName + "</Name>\n"; if (getAppearance() != null) ret += getAppearance().toString(); ret += "\t\t\t</Add3DSFile>\n"; return ret; } }
@Override protected void doAddModelFileInstruction(Graphics3DAddModelFileInstruction graphics3dObjectAddModelFile) { // jmeAssetLocator.registerAssetDirectories(graphics3dObjectAddModelFile.getResourceDirectories()); Spatial spatial = createGraphics3DObjectFromModel(graphics3dObjectAddModelFile.getFileName(), graphics3dObjectAddModelFile.getSubmesh(), graphics3dObjectAddModelFile.centerSubmesh(), graphics3dObjectAddModelFile.getAppearance(), assetManager); currentNode.attachChild(spatial); if (graphics3dObjectAddModelFile.getAppearance() != null) { addAppearanceChangedListener(graphics3dObjectAddModelFile, spatial); } }
@Override protected void doAddModelFileInstruction(Graphics3DAddModelFileInstruction graphics3dObjectAddModelFile) { // jmeAssetLocator.registerAssetDirectories(graphics3dObjectAddModelFile.getResourceDirectories()); Spatial spatial = createGraphics3DObjectFromModel(graphics3dObjectAddModelFile.getFileName(), graphics3dObjectAddModelFile.getSubmesh(), graphics3dObjectAddModelFile.centerSubmesh(), graphics3dObjectAddModelFile.getAppearance(), jmeAssetLocator); currentNode.attachChild(spatial); if (graphics3dObjectAddModelFile.getAppearance() != null) { addAppearanceChangedListener(graphics3dObjectAddModelFile, spatial); } }
@Override protected void doAddModelFileInstruction(Graphics3DAddModelFileInstruction graphics3DAddModelFile) { MeshView[] outputModelMeshes = new MeshView[0]; try { outputModelMeshes = JAssImpJavaFXTools.getJavaFxMeshes(graphics3DAddModelFile.getFileName()); } catch (URISyntaxException | IOException e) { e.printStackTrace(); } if (graphics3DAddModelFile.getAppearance() != null) { Material outputMaterial = convertMaterial(graphics3DAddModelFile.getAppearance()); for (int i = 0; i < outputModelMeshes.length; i++) { outputModelMeshes[i].setMaterial(outputMaterial); } } Group meshGroup = new Group(outputModelMeshes); currentGroup.getChildren().add(meshGroup); currentGroup = meshGroup; }