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 Graphics3DAddModelFileInstruction addModelFile(String fileName, String submesh, boolean centerSubmesh, List<String> resourceDirectories, AppearanceDefinition app) { Graphics3DAddModelFileInstruction graphics3dAddModelFileInstruction = new Graphics3DAddModelFileInstruction(fileName, submesh, centerSubmesh, app, resourceDirectories); graphics3DInstructions.add(graphics3dAddModelFileInstruction); return graphics3dAddModelFileInstruction; }
public Graphics3DAddModelFileInstruction(String fileName, AppearanceDefinition appearance) { this.fileName = fileName; this.submesh = null; this.centerSubmesh = false; setAppearance(appearance); }
@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 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; }
if (modelFileInstruction.getResourceDirectories().size() > 0) System.err.println("Doesn't handle resource directories: " + instruction.getClass().getSimpleName()); String uri = modelFileInstruction.getFileName(); mesh.setUri(uri); sdfGeometry.setMesh(mesh);
@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); } }
if (modelFileInstruction.getResourceDirectories().size() > 0) System.err.println("Doesn't handle resource directories: " + instruction.getClass().getSimpleName()); String uri = modelFileInstruction.getFileName(); mesh.setUri(uri); sdfGeometry.setMesh(mesh);
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; } }
/** * @param fileName * @param app * @return */ public Graphics3DAddModelFileInstruction addModelFile(String fileName, AppearanceDefinition app) { Graphics3DAddModelFileInstruction graphics3dAddModelFileInstruction = new Graphics3DAddModelFileInstruction(fileName, app); graphics3DInstructions.add(graphics3dAddModelFileInstruction); return graphics3dAddModelFileInstruction; }
public Graphics3DAddModelFileInstruction(String fileName, AppearanceDefinition appearance) { this.fileName = fileName; this.submesh = null; this.centerSubmesh = false; setAppearance(appearance); }
public Graphics3DAddModelFileInstruction addModelFile(String fileName, String submesh, boolean centerSubmesh, List<String> resourceDirectories, AppearanceDefinition app) { Graphics3DAddModelFileInstruction graphics3dAddModelFileInstruction = new Graphics3DAddModelFileInstruction(fileName, submesh, centerSubmesh, app, resourceDirectories); graphics3DInstructions.add(graphics3dAddModelFileInstruction); return graphics3dAddModelFileInstruction; }
public Graphics3DAddModelFileInstruction(String fileName, String submesh, boolean centerSubmesh, AppearanceDefinition appearance, List<String> resourceDirectories) { this.fileName = fileName; this.submesh = submesh; this.centerSubmesh = centerSubmesh; setAppearance(appearance); this.resourceDirectories.addAll(resourceDirectories); }
/** * @param fileName * @param app * @return */ public Graphics3DAddModelFileInstruction addModelFile(String fileName, AppearanceDefinition app) { Graphics3DAddModelFileInstruction graphics3dAddModelFileInstruction = new Graphics3DAddModelFileInstruction(fileName, app); graphics3DInstructions.add(graphics3dAddModelFileInstruction); return graphics3dAddModelFileInstruction; }
public Graphics3DAddModelFileInstruction(String fileName, String submesh, boolean centerSubmesh, AppearanceDefinition appearance, List<String> resourceDirectories) { this.fileName = fileName; this.submesh = submesh; this.centerSubmesh = centerSubmesh; setAppearance(appearance); this.resourceDirectories.addAll(resourceDirectories); }