Modern open source game engine

 
metric_tensor
Topic Author
Posts: 20
Joined: Wed Jan 11, 2017 7:58 pm

Data Visualization

Thu Feb 15, 2018 10:22 pm

I would like to use Banshee for some real time data visualization.  Do you have any recommendations on the best way (from a performance standpoint) to implement a strip-chart type of graph in Banshee.  It is basically viewing a window of the data as a line graph with new points entering on one end and old points leaving the other end.
 
User avatar
BearishSun
Banshee Developer
Posts: 87
Joined: Fri Sep 23, 2016 9:52 am

Re: Data Visualization

Thu Feb 15, 2018 10:49 pm

You can use the GUICanvas element, it allows drawing or arbitrary lines and shapes (along with text and images). Animation window in the editor uses it to display animation curves which I suspect is quite similar to your use-case.

Optionally, as a more complex alternative, you can write your own RendererExtension, which then draws elements by calling the low-level rendering API directly. You can take a look at GUIManager and how it implements one for general-purpose GUI rendering. But this might be an overkill (but gives you complete freedom).
 
metric_tensor
Topic Author
Posts: 20
Joined: Wed Jan 11, 2017 7:58 pm

Re: Data Visualization

Thu Feb 15, 2018 11:05 pm

Thanks!  I will dig into it.
 
metric_tensor
Topic Author
Posts: 20
Joined: Wed Jan 11, 2017 7:58 pm

Re: Data Visualization

Fri Feb 16, 2018 5:43 am

I am a little confused with the GUICanvas drawLine command.  I have the following:

canvas->drawLine(Vector2I(0, 0), Vector2I(canvas->getBounds().width/2, canvas->getBounds().height/2), Color::Red);


According to the docs the start and end points are relative to the canvas top-left point.  I get a red line from the lower left of the window to the center.  I would expect it go from the upper left corner to the center.  What am I missing?

note: I am using the Vulkan renderer.
 
metric_tensor
Topic Author
Posts: 20
Joined: Wed Jan 11, 2017 7:58 pm

Re: Data Visualization

Fri Feb 16, 2018 6:08 am

Another newbie question, how do I know when to update the canvas?  Do I need to override Application::postUpdate() or is there a better way to do it?

Who is online

Users browsing this forum: No registered users and 1 guest