writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.DOOR_OR_WINDOW_SASH_END_ANGLE, i, sashEndAngle);
}
}
if (piece instanceof Light) {
// Write properties specific to lights
Light light = (Light)piece;
LightSource [] lightSources = light.getLightSources();
if (lightSources.length > 0) {
String lightSourceX = "";
String lightSourceY = "";
String lightSourceZ = "";
String lightSourceColor = "";
String lightSourceDiameter = null;
for (int lightIndex = 0; lightIndex < lightSources.length; lightIndex++) {
if (lightIndex > 0) {
lightSourceX += " ";
lightSourceY += " ";
lightSourceZ += " ";
lightSourceColor += " ";
if (lightSourceDiameter != null) {
lightSourceDiameter += " ";
}
}
lightSourceX += lightSources [lightIndex].getX() * light.getWidth();
lightSourceY += lightSources [lightIndex].getY() * light.getDepth();
lightSourceZ += lightSources [lightIndex].getZ() * light.getHeight();
lightSourceColor += "#" + Integer.toHexString(lightSources [lightIndex].getColor());
if (lightSources [lightIndex].getDiameter() != null) {
if (lightSourceDiameter == null) {
lightSourceDiameter = "";
}
lightSourceDiameter += lightSources [lightIndex].getDiameter() * light.getWidth();
}
}
writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.LIGHT_SOURCE_X, i, lightSourceX);
writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.LIGHT_SOURCE_Y, i, lightSourceY);
writeProperty(writer, DefaultFurnitureCatalog.PropertyKey.LIGHT_SOURCE_Z, i, lightSourceZ);