// Path: src/net/sourceforge/arbaro/params/FloatFormat.java
// public class FloatFormat {
// 
//     public static NumberFormat getInstance() {
// 	NumberFormat form = NumberFormat.getNumberInstance(Locale.US);
// 	form.setMaximumFractionDigits(5);
// 	form.setMinimumFractionDigits(0);
// 	return form;
//     }
// }
// 
// Path: src/net/sourceforge/arbaro/tree/Tree.java
// public interface Tree {
// 
// 	/**
// 	 * used with the TreeTraversal interface
// 	 *
// 	 * @param traversal
// 	 * @return when false stop travers the tree
// 	 */
// 	abstract boolean traverseTree(TreeTraversal traversal);
// 
// 	/**
// 	 *
// 	 * @return the number of all stems of all levels of the tree
// 	 */
// 	public abstract long getStemCount();
// 
// 	/**
// 	 *
// 	 * @return the number of leaves of the tree
// 	 */
// 	public abstract long getLeafCount();
// 
// 	/**
// 	 *
// 	 * @return a vector with the highest coordinates of the tree.
// 	 * (Considering all stems of all levels)
// 	 */
// 	public abstract Vector getMaxPoint();
// 
// 	/**
// 	 *
// 	 * @return a vector with the lowest coordinates of the tree.
// 	 * (Considering all stems of all levels)
// 	 */
// 	public abstract Vector getMinPoint();
// 
// 	/**
// 	 *
// 	 * @return the seed of the tree. It is used for randomnization.
// 	 */
// 	public int getSeed();
// 
// 	/**
// 	 *
// 	 * @return the height of the tree (highest z-coordinate)
// 	 */
// 	public double getHeight();
// 
// 	/**
// 	 *
// 	 * @return the widht of the tree (highest value of sqrt(x*x+y*y))
// 	 */
// 	public double getWidth();
// 
// 	/**
// 	 * Writes the trees parameters to a stream
// 	 * @param w
// 	 */
// 	public void paramsToXML(PrintWriter w);
// 
// 	/**
// 	 *
// 	 * @return the tree species name
// 	 */
// 	public String getSpecies();
// 
// 	/**
// 	 *
// 	 * @return the tree scale
// 	 */
// 	public double getScale();
// 
// 	/**
// 	 *
// 	 * @return the tree stem levels
// 	 */
// 	public int getLevels();
// 
// 	/**
// 	 *
// 	 * @return the leaf shape name
// 	 */
// 	public String getLeafShape();
// 
// 	/**
// 	 *
// 	 * @return the leaf width
// 	 */
// 	public double getLeafWidth();
// 
// 	/**
// 	 *
// 	 * @return the leaf length
// 	 */
// 	public double getLeafLength();
// 
// 	/**
// 	 *
// 	 * @return the virtual leaf stem length, i.e. the distance of
// 	 * the leaf from the stem center line
// 	 */
// 	public double getLeafStemLength();
// 
// 	/**
// 	 * Use this for verbose output when generating a mesh or
// 	 * exporting a tree
// 	 *
// 	 * @param level
// 	 * @return an information string with the number of section
// 	 * points for this stem level and if smoothing should be used
// 	 */
// 	public String getVertexInfo(int level);
// 
// }


import java.io.File;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import net.sourceforge.arbaro.params.FloatFormat;
import net.sourceforge.arbaro.tree.Tree;

//#**************************************************************************
//#
//#    Copyright (C) 2008  Moritz Moeller
//#
//#    This program is free software; you can redistribute it and/or modify
//#    it under the terms of the GNU General Public License as published by
//#    the Free Software Foundation; either version 2 of the License, or
//#    (at your option) any later version.
//#
//#    This program is distributed in the hope that it will be useful,
//#    but WITHOUT ANY WARRANTY; without even the implied warranty of
//#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#    GNU General Public License for more details.
//#
//#    You should have received a copy of the GNU General Public License
//#    along with this program; if not, write to the Free Software
//#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//#
//#    Send comments and bug fixes to arbaro@virtualritz.com or
//#    diestel@steloj.de
//#
//#**************************************************************************/

package net.sourceforge.arbaro.export;




/**
 * Creates a RenderMan scene file with the rendered tree
 * included.
 *
 */
class RIBSceneExporter extends AbstractExporter {
	Tree tree;
	int renderWidth;
	int renderHeight;
	String namePrefix;
	String archiveFile;
	String image;
	StringIndenter indent=new StringIndenter("  ");

// Path: src/net/sourceforge/arbaro/params/FloatFormat.java
// public class FloatFormat {
// 
//     public static NumberFormat getInstance() {
// 	NumberFormat form = NumberFormat.getNumberInstance(Locale.US);
// 	form.setMaximumFractionDigits(5);
// 	form.setMinimumFractionDigits(0);
// 	return form;
//     }
// }
// 
// Path: src/net/sourceforge/arbaro/tree/Tree.java
// public interface Tree {
// 
// 	/**
// 	 * used with the TreeTraversal interface
// 	 *
// 	 * @param traversal
// 	 * @return when false stop travers the tree
// 	 */
// 	abstract boolean traverseTree(TreeTraversal traversal);
// 
// 	/**
// 	 *
// 	 * @return the number of all stems of all levels of the tree
// 	 */
// 	public abstract long getStemCount();
// 
// 	/**
// 	 *
// 	 * @return the number of leaves of the tree
// 	 */
// 	public abstract long getLeafCount();
// 
// 	/**
// 	 *
// 	 * @return a vector with the highest coordinates of the tree.
// 	 * (Considering all stems of all levels)
// 	 */
// 	public abstract Vector getMaxPoint();
// 
// 	/**
// 	 *
// 	 * @return a vector with the lowest coordinates of the tree.
// 	 * (Considering all stems of all levels)
// 	 */
// 	public abstract Vector getMinPoint();
// 
// 	/**
// 	 *
// 	 * @return the seed of the tree. It is used for randomnization.
// 	 */
// 	public int getSeed();
// 
// 	/**
// 	 *
// 	 * @return the height of the tree (highest z-coordinate)
// 	 */
// 	public double getHeight();
// 
// 	/**
// 	 *
// 	 * @return the widht of the tree (highest value of sqrt(x*x+y*y))
// 	 */
// 	public double getWidth();
// 
// 	/**
// 	 * Writes the trees parameters to a stream
// 	 * @param w
// 	 */
// 	public void paramsToXML(PrintWriter w);
// 
// 	/**
// 	 *
// 	 * @return the tree species name
// 	 */
// 	public String getSpecies();
// 
// 	/**
// 	 *
// 	 * @return the tree scale
// 	 */
// 	public double getScale();
// 
// 	/**
// 	 *
// 	 * @return the tree stem levels
// 	 */
// 	public int getLevels();
// 
// 	/**
// 	 *
// 	 * @return the leaf shape name
// 	 */
// 	public String getLeafShape();
// 
// 	/**
// 	 *
// 	 * @return the leaf width
// 	 */
// 	public double getLeafWidth();
// 
// 	/**
// 	 *
// 	 * @return the leaf length
// 	 */
// 	public double getLeafLength();
// 
// 	/**
// 	 *
// 	 * @return the virtual leaf stem length, i.e. the distance of
// 	 * the leaf from the stem center line
// 	 */
// 	public double getLeafStemLength();
// 
// 	/**
// 	 * Use this for verbose output when generating a mesh or
// 	 * exporting a tree
// 	 *
// 	 * @param level
// 	 * @return an information string with the number of section
// 	 * points for this stem level and if smoothing should be used
// 	 */
// 	public String getVertexInfo(int level);
// 
// }


// Path: src/net/sourceforge/arbaro/export/RIBSceneExporter.java
import java.io.File;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import net.sourceforge.arbaro.params.FloatFormat;
import net.sourceforge.arbaro.tree.Tree;

//#**************************************************************************
//#
//#    Copyright (C) 2008  Moritz Moeller
//#
//#    This program is free software; you can redistribute it and/or modify
//#    it under the terms of the GNU General Public License as published by
//#    the Free Software Foundation; either version 2 of the License, or
//#    (at your option) any later version.
//#
//#    This program is distributed in the hope that it will be useful,
//#    but WITHOUT ANY WARRANTY; without even the implied warranty of
//#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#    GNU General Public License for more details.
//#
//#    You should have received a copy of the GNU General Public License
//#    along with this program; if not, write to the Free Software
//#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//#
//#    Send comments and bug fixes to arbaro@virtualritz.com or
//#    diestel@steloj.de
//#
//#**************************************************************************/

package net.sourceforge.arbaro.export;




/**
 * Creates a RenderMan scene file with the rendered tree
 * included.
 *
 */
class RIBSceneExporter extends AbstractExporter {
	Tree tree;
	int renderWidth;
	int renderHeight;
	String namePrefix;
	String archiveFile;
	String image;
	StringIndenter indent=new StringIndenter("  ");

	NumberFormat frm = FloatFormat.getInstance();
