Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-04-14 20:19:46 +0000
committerStijn Buys <ingar@osirion.org>2009-04-14 20:19:46 +0000
commita6ecef211a84542b4a68a92e647c8d801fe14a37 (patch)
tree07f9a6689f2ef0d27722210d63dee41114916e41 /src/ui/modelview.cc
parentd5a51db605102e9572d375e720dd016f3b7ff585 (diff)
added ui::ModelView prototype
Diffstat (limited to 'src/ui/modelview.cc')
-rwxr-xr-xsrc/ui/modelview.cc68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
new file mode 100755
index 0000000..4239294
--- /dev/null
+++ b/src/ui/modelview.cc
@@ -0,0 +1,68 @@
+/*
+ ui/modelview.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "auxiliary/functions.h"
+#include "ui/modelview.h"
+#include "ui/paint.h"
+#include "sys/sys.h"
+#include "render/camera.h"
+#include "render/draw.h"
+#include "render/render.h"
+namespace ui
+{
+
+ModelView::ModelView(Widget *parent, const char *modelname) : Widget(parent)
+{
+ set_border(false);
+ set_background(false);
+ set_label("modelview");
+
+ set_modelname(modelname);
+}
+
+ModelView::~ModelView()
+{}
+
+void ModelView::print(const size_t indent) const
+{
+ std::string marker("");
+ con_print << aux::pad_left(marker, indent*2) << label() << " \"" << modelname() << "\"" << std::endl;
+}
+
+void ModelView::set_modelname(const std::string & modelname)
+{
+ modelview_modelname.assign(modelname);
+}
+
+void ModelView::set_modelname(const char *modelname)
+{
+ if (modelname)
+ modelview_modelname.assign(modelname);
+ else
+ modelview_modelname.clear();
+}
+
+void ModelView::set_color(const math::Color & color)
+{
+ modelview_color.assign(color);
+}
+
+void ModelView::draw()
+{
+ if (!modelview_modelname.size())
+ return;
+
+ //model::Model *model = model::Model::find(modelview_modelname);
+
+ // gl 3d mode
+
+
+ // gl 2d mode
+ //render::Camera::ortho();
+}
+
+}
+