initial version
[lsystem3d.git] / src / lsystem3d.cpp
diff --git a/src/lsystem3d.cpp b/src/lsystem3d.cpp
new file mode 100644 (file)
index 0000000..f485826
--- /dev/null
@@ -0,0 +1,58 @@
+// Copyright (C) 2006 Erik Dahlberg
+// 
+// This file is part of LSystem3d.
+// 
+// LSystem3D 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.
+// 
+// LSystem3D 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 LSystem3D; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+
+
+#include "fx.h"
+
+#include "gui.h"
+#include "lindenmayersystem.h"
+#include "lsystem3d.h"
+#include "model.h"
+#include "renderingsurface.h"
+
+
+
+/**
+ * Constructor
+ */
+LSystem3D::LSystem3D(int argc, char *argv[])
+{
+    // create the FOX application object
+    FXApp *application = new FXApp("LSystem3D");
+    application->init(argc, argv);
+    
+    Model model;
+    LindenmayerSystem lsystem(&model);
+    
+    // create the windows and run the application
+    RenderingSurface *surface = new RenderingSurface(application, &lsystem);
+    new GUI(application, surface, &lsystem);
+    application->create();
+    application->run();
+}
+
+
+
+/**
+ * Destructor
+ */
+LSystem3D::~LSystem3D()
+{
+}