one.empty3.library.core.physics.ListingTableau Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of empty3-library-3d Show documentation
Show all versions of empty3-library-3d Show documentation
3D rendering engine. Plus modeling. Expected glsl textures 3d and 2d rendering
/*
* Copyright (c) 2016. Tous les fichiers dans ce programme sont soumis à la License Publique Générale GNU créée par la Free Softxware Association, Boston.
* La plupart des licenses de parties tièrces sont compatibles avec la license principale.
* Les parties tierces peuvent être soumises à d'autres licenses.
* Montemedia : Creative Commons
* ECT : Tests à valeur artistique ou technique.
* La partie RayTacer a été honteusement copiée sur le Net. Puis traduite en Java et améliorée.
* Java est une marque de la société Oracle.
*
* Pour le moment le programme est entièrement accessible sans frais supplémentaire. Get the sources, build it, use it, like it, share it.
*/
/*
package one.empty3.library.core.physics;
import one.empty3.library.Point3D;
import java.awt.*;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
public class ListingTableau {
private Move f;
public static void main(String[] args) {
OutputStream out = null;
try {
out = new FileOutputStream("listing-positions-1.txt");
} catch (FileNotFoundException e) {
System.exit(1);
}
Move f = new Move();
ArrayList billes = billeConfig();
f.configurer(billes);
int frameMax = Integer.parseInt(args[0]);
int frame = 1;
while (frame < frameMax) {
for (int i = 0; i < billes.size(); i++) {
try {
out.write((
"" + frame
+ "\t" + frameMax +
"\t" + i + "\t"
+ billes[i].position.get(0) + "\t"
+ billes[i].position.get(1) + "\t"
+ billes[i].position.get(2) + "\t"
+ "\n"
).getBytes());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
f.calculer();
Logger.getAnonymousLogger().log(Level.INFO, frame);
frame++;
}
}
private static ArrayList billeConfig() {
int X, Y, Z;
X = Y = Z = 5;
ArrayList billes = new ArrayList(X * Y * Z);
for(int i=0; i