WIP
This commit is contained in:
parent
5a5b58e8c2
commit
c2a3ebffc3
@ -37,7 +37,7 @@ import java.util.List;
|
||||
/**
|
||||
* Default implementation of an Mtl (material)
|
||||
*/
|
||||
final class DefaultMtl implements Mtl {
|
||||
public final class DefaultMtl implements Mtl {
|
||||
/**
|
||||
* The name of this material
|
||||
*/
|
||||
@ -210,7 +210,7 @@ final class DefaultMtl implements Mtl {
|
||||
*
|
||||
* @param name The name of this material
|
||||
*/
|
||||
DefaultMtl(String name) {
|
||||
public DefaultMtl(String name) {
|
||||
this.name = name;
|
||||
this.reflOptions = new ArrayList<TextureOptions>();
|
||||
}
|
||||
|
@ -79,9 +79,11 @@ public class DefaultMtlWriter {
|
||||
*
|
||||
* @param mtl The {@link Mtl}
|
||||
* @param writer The writer
|
||||
* @throws IOException If an IO error occurs
|
||||
* @throws IOExcept
|
||||
*
|
||||
* ion If an IO error occurs
|
||||
*/
|
||||
private static void write(Mtl mtl, Writer writer)
|
||||
public static void write(Mtl mtl, Writer writer)
|
||||
throws IOException {
|
||||
writer.write(createString(mtl));
|
||||
writer.flush();
|
||||
|
@ -36,7 +36,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* Default implementation of {@link TextureOptions}
|
||||
*/
|
||||
final class DefaultTextureOptions implements TextureOptions {
|
||||
public final class DefaultTextureOptions implements TextureOptions {
|
||||
/**
|
||||
* The file name
|
||||
*/
|
||||
@ -110,7 +110,7 @@ final class DefaultTextureOptions implements TextureOptions {
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
DefaultTextureOptions() {
|
||||
public DefaultTextureOptions() {
|
||||
// Default constructor
|
||||
}
|
||||
|
||||
|
@ -160,22 +160,27 @@ public class OBJExporterFactoryTest {
|
||||
Path tempFile = Files.createTempFile("testExport", ".obj");
|
||||
String filePath = tempFile.toAbsolutePath().toString();
|
||||
|
||||
|
||||
filePath = "/Users/SiboVanGool/Downloads/testExport.obj"; // TODO: remove this line
|
||||
|
||||
|
||||
// Do the exporting
|
||||
CoordTransform transformer = new DefaultCoordTransform(rocket.getLength());
|
||||
OBJExporterFactory exporterFactory = new OBJExporterFactory(components, rocket.getSelectedConfiguration(), true, false, true,
|
||||
transformer, filePath);
|
||||
OBJExportOptions options = new OBJExportOptions(rocket);
|
||||
options.setScaling(30);
|
||||
options.setExportChildren(true);
|
||||
OBJExporterFactory exporterFactory = new OBJExporterFactory(components, rocket.getSelectedConfiguration(), filePath, options);
|
||||
exporterFactory.doExport();
|
||||
|
||||
|
||||
// Test with other parameters
|
||||
noseCone.setShoulderCapped(false);
|
||||
/*noseCone.setShoulderCapped(false);
|
||||
railButton.setScrewHeight(0);
|
||||
bodyTube.setFilled(true);
|
||||
|
||||
transformer = new DefaultCoordTransform(rocket.getLength());
|
||||
exporterFactory = new OBJExporterFactory(components, rocket.getSelectedConfiguration(), false, false, true,
|
||||
exporterFactory = new OBJExporterFactory(components, rocket.getSelectedConfiguration(), true, false, false,
|
||||
transformer, filePath);
|
||||
exporterFactory.doExport();
|
||||
exporterFactory.doExport();*/
|
||||
|
||||
// Clean up
|
||||
Files.delete(tempFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user