From 409d3ce47d8a4d48947c7b19fc2460fd801b742c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 29 Nov 2010 13:37:16 +0000 Subject: Added 'testmodel' function, enabled autoscaling on ui::ModelView --- src/ui/modelview.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ui/modelview.h') diff --git a/src/ui/modelview.h b/src/ui/modelview.h index 7cbf76d..c235e99 100755 --- a/src/ui/modelview.h +++ b/src/ui/modelview.h @@ -26,6 +26,14 @@ public: inline math::Color const &color() const { return modelview_color; } + + inline float zoom() const { + return modelview_zoom; + } + + inline float radius() const { + return modelview_radius; + } void set_modelname(const char *modelname); @@ -45,6 +53,10 @@ public: * 1.0 is not zoomed out, 10.0 is zoomed out by a factor of 10 */ void set_zoom(const float zoom); + + inline void set_radius(const float radius) { + modelview_radius = radius; + } protected: /// draw the widget @@ -71,6 +83,7 @@ private: std::string modelview_modelname; math::Color modelview_color; float modelview_zoom; + float modelview_radius; math::Axis modelview_axis; math::Vector2f modelview_cursor; -- cgit v1.2.3