Fixed indentation
This commit is contained in:
parent
ae9f281976
commit
2f7dbe54dc
@ -155,35 +155,35 @@ public class TangentBinormalGenerator {
|
|||||||
|
|
||||||
public static void generateParallel(Spatial scene, ExecutorService executor) {
|
public static void generateParallel(Spatial scene, ExecutorService executor) {
|
||||||
final Set<Mesh> meshes = new HashSet<Mesh>();
|
final Set<Mesh> meshes = new HashSet<Mesh>();
|
||||||
scene.breadthFirstTraversal(new SceneGraphVisitor(){
|
scene.breadthFirstTraversal(new SceneGraphVisitor() {
|
||||||
@Override
|
@Override
|
||||||
public void visit(Spatial spatial) {
|
public void visit(Spatial spatial) {
|
||||||
if ( spatial instanceof Geometry ) {
|
if (spatial instanceof Geometry) {
|
||||||
Geometry geom = (Geometry) spatial;
|
Geometry geom = (Geometry) spatial;
|
||||||
Mesh mesh = geom.getMesh();
|
Mesh mesh = geom.getMesh();
|
||||||
|
|
||||||
// Check to ensure mesh has texcoords and normals before generating
|
// Check to ensure mesh has texcoords and normals before generating
|
||||||
if (mesh.getBuffer(Type.TexCoord) != null
|
if (mesh.getBuffer(Type.TexCoord) != null
|
||||||
&& mesh.getBuffer(Type.Normal) != null){
|
&& mesh.getBuffer(Type.Normal) != null) {
|
||||||
meshes.add(mesh);
|
meshes.add(mesh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List<Future<?>> futures = new ArrayList<Future<?>>();
|
List<Future<?>> futures = new ArrayList<Future<?>>();
|
||||||
for ( final Mesh m : meshes ) {
|
for (final Mesh m : meshes) {
|
||||||
futures.add(executor.submit(new Runnable() {
|
futures.add(executor.submit(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
generate(m,true,false);
|
generate(m, true, false);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
for ( Future<?> f : futures ) {
|
for (Future<?> f : futures) {
|
||||||
try {
|
try {
|
||||||
f.get();
|
f.get();
|
||||||
} catch (Exception exc) {
|
} catch (Exception exc) {
|
||||||
log.log(Level.WARNING,"Error while computing tangents",exc);
|
log.log(Level.WARNING, "Error while computing tangents", exc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user