layers.add(new Layer(materials.get(rightMaterialIndex), 0.1));
totalThickness += 0.1;
// Create regions
MultiPlaneShape shape;
double[] surfaceNormal = Math2.Z_AXIS;
double[] layerNormal = Math2.MINUS_X_AXIS;
double[] origin = Math2.ORIGIN_3D;
double[] point =
Math2.multiply(-totalThickness / 2.0, Math2.X_AXIS);
int layerIndex = 0;
for (Layer layer : layers) {
// FIXME: Depth not considered
shape =
MultiPlaneShape.createFilm(layerNormal, point,
layer.thickness);
shape.addPlane(surfaceNormal, origin); // surface
new IndexedRegion(chamber, layer.material, shape, ++layerIndex);
// Calculate next point
point =
Math2.plus(point,