package ipp.imse.fusionOptics.apps.mse;

import ipp.imse.fusionOptics.mse.AugMSESystem;
import fusionOptics.drawing.VRMLDrawer;
import fusionOptics.interfaces.NullInterface;
import fusionOptics.surfaces.Triangle;

public class MakeTilesVRML {
	public static void main(String[] args) {
		VRMLDrawer vrmlOut = new VRMLDrawer("/work/ipp/augddd-models/PSLTiles.vrml", 0.005);
		vrmlOut.addVRML(AugMSESystem.vrmlScaleToAUGDDD);
		vrmlOut.setDrawPolarisationFrames(false);
		
		vrmlOut.startGroup("tiles");
		for(int i=0; i < 4; i++){
			double c1[] = AugMSESystem.pslTilePos[i];
			double c2[] = AugMSESystem.pslTilePos[i+1];
			double top[] = AugMSESystem.pslTilePos[5+1+i];
			
			Triangle tile = new Triangle("pslTile" + i, c1, top, c2, NullInterface.ideal());
			vrmlOut.drawSurface(tile);			
		}		
		vrmlOut.endGroup();
		
		vrmlOut.addVRML("}");
		vrmlOut.destroy();
	}
}
