C++/Cli libraries for visualizing non-oriented graph? - c++

I have a project in university called "Finding loops in graph". Only problem, I have to do it on C++ windows forms.
I have made several attemps on creating at least graph visualizer, but it seems I failed to create myself the classes to visualize and store information about graph. And I need to make it quick.
I have worked only with c++/cli, but if there's any other options for c++ forms, I will be glad to learn. But it has to be only on Visual Studio.
Is there any libraries, which I can use classes to define a non-oriented graph (for start) and visualize it, let's say, on any canvas?

Related

Visualizing Bin packing with FF using C++

I'm new here so I will try my best. I want to visualize the Bin packing problem in C++ using First Fit. What I want is to create an initial tournament tree (winner) with external nodes as objects with certain capacity where can I put some bins. After inserting those bins, I want to get the finaly tree.
What I've done so far:
I've got the algorithms running properly but simple (not anything special) in dos
I'm using VS 2015 Community and searched how to visualize binary trees with SDK but had no luck (I'm new to programming so my knowledge isn't the best)
I've searched some other external programs to visualize my tree (yEd, Automatic graph layout and graphical binary trees (but as I checked the last two use only C# )
So here is my questions:
Is there any other programm that I can use to visualize Bin packing problem?
Can I use those programs that I mentioned, to visualize C++ and not in C#?
If it's possible to use SDK to visualize my problem I would really need some guide, or some sort of tutorial how to use it in my case.
Thank you in advance.
P.S. I'm a student and this is a project that I try to do.
I strongly suggest that you use Qt for this.
I know this will be a bit of a steep learning curve. But unfortunately there are no "native" tools from microsoft that offer the same. The microsoft SDK alone will not do. You would need something like Expression Blend. But these tools are mainly for C#.
Although there are alternatives to Qt like Wx and Gtk I suggest you try Qt. It has the following advantages:
it's as close to C++ as it gets
it comes with its own IDE
it fully supports and works together with Visual Studio 2015
it is completely free
it's easy to install and upgrade and automatically finds a Visual Studio installation and uses it

3D and UI toolkit

I have to develop a basic inventory system, and my client wants to see all the objects in the inventory in 3D and their positions in the warehouse. The thing is that I have to develop this as soon as possible, delivery time is my priority here. So I came to the conclusion that I would need a powerful 3D graphics engine and an UI toolkit that can be easily integrated with it. I've plenty of experience with C++, Qt, OpenGL, VTK, C# and WinForms. In my experience, VTK is not so good with textures and it would involve more work to add the eye candy my client wants (like animations, visual effects, etc). I've tried Axiom with WinForms. I went through hell making a sample load and run (framework incompatibilities, rendering engines not found, codec native dependencies missing, etc).
I have been evaluating different options:
Qt + Ogre (C++)
WinForms + Axiom (.NET)
Qt + Irrlicht (C++)
Which do you think would be the best option? Could you recommend me some other possibility?
Thanks in advance!
I spent a heap of time developing with Mogre (a C# wrapper around Ogre) and WinForms. In my opinion it's a good combination because you can develop the GUI much faster in C# WinForms than any of the C++ options.
If you don't mind using a C# wrapper around the C++ Ogre library I recommend using Mogre rather than Axiom. It is very stable, has some good maintainers and keeps up with the latest version of Ogre pretty well. Any code on the Ogre forums can easily be ported to C# because most of the API is identical.
Axiom is a pure .NET port of Ogre, although it lags a few versions behind and may have some missing features. I haven't spent a lot of time with it but I believe it's main strength is that it's all managed code, if that's important to you.
There's an open source project called Glue Editor that I started a while ago. It's no longer maintained but it has a lot of code you can use to get Mogre working with WinForms. You should be able to download the repository and compile it out of the box. You're welcome to take the code and use it however you like.
https://bitbucket.org/glue/glueeditor/src
If you decide to go down the Qt + Ogre path there's a project called Ogitor you might want to check out.
https://bitbucket.org/jacmoe/ogitor/src
You might also want to check out XNA and MonoGame. XNA is Microsofts framework for making games in C#. It is fairly bare bones but it has a much lower learning curve than Ogre, Mogre or Axiom. MonoGame is an open source implementation of the XNA framework that works on non-Microsoft platforms (e.g. Android, iOS, Linux).
http://monogame.codeplex.com/
I recommend Qt + Ogre (C++), although I have to confess this is the only combination from your list I have much experience with. The good thing about Ogre is the amount of documentation and the active community. So many questions are answered and documented. The graphics itself can probably be created in all library combinations. However, I like the easy intergration of object interaction in Ogre. The standard is based on bounding boxes, however there is code available for triangle intersection as well. Wish you luck!

I'm trying to integrate a 3D model viewer into my GUI, but have not found a single library that will allow me to do this easily. Any suggestions?

I've tried with VTK, PCL and Qt (using the QVTKWidget.h), however, using CMake is incredibly inconvenient, as the second I update any one of the many libraries that my GUI uses, I have to spend at least another day trying to sort out the linker issues. Additionally, a lot of the time, a lot of information is lost from the 3D models using these libraries.
Note: I am focusing on using PLY as it holds color and geometry information in the same file, but any other format that does the same would be fine
I am currently trying to create a Meshlab plugin, but the support for this library is sparse, and I am yet to successfully compile the Meshlab source.
Any input or direction would be really appreciated. If you guys want to know anything more, please do let me know.
If it wasn't clear in the beginning, I am using Qt (C++) to create the GUI.
Use the QT OpenGL widget and write some OpenGL code to display your model.
PLY textural format is really simple and you can write a parser yourself.
Have you tried Coin3D? This is a Free implementation of OpenInventor wich was made by SGI back in the day as a C++ wrapper around OpenGL.
As for integration with Qt there is a library called SoQt (in the same site). They also have a newer library called Quarter that integrates more like a Qt component.
I've had greatest success with Coin + SoQt + Qt.

How to load an entire Visual c++ project into Enterprise Architect to reverse engineer it?

Is there a way to load the DSW file for EA to then load the entire Visual C++ project?
AFAIK you can reverse engineer C++ code only from source code (header files) into EA.
There's also a VS AddIn available: MDG Integration for Visual Studio, but that comes at extra cost.
The best way to get around the 'spaghetti mess wiring' is to draw diagrams for the classes of your interest manually. You can use the 'Add related elements' command from the (diagram) context menu of the classes you pick, this might be helpful.
Don't expect to get into programming against a complex legacy library API just from class diagrams without further documentation, but class diagrams can be helpful though to get a bird's view of the API structure.

Stock Charts in C++

I am trying to create some charts of data (eg http://www.amibroker.com/). Is there a C++ library that can do this without a lot of extra work? I'm thinking Qt or wxWindows would have something like it, but it wasn't immediately obvious.
Thanks!
FLTK is a light and portable C++ toolkit for GUI. There's a chart class. Sample.
Qwt does at least some of the things you are trying to achieve (basic plots, bar charts and so on), and integrates well with Qt.
I think you need to pick your GUI framework first, then find a charting control for the given framework, since that affects what charting controls you could feasibly use. For example, must this be portable?
For the project I'm working on (a large MFC application) we use Cedric Moonen's ChartCtrl. We've had a pretty good experience with it so far.
I've done some graph plotting with gnuplot lately, which is quite powerful. Although I think it is Linux only, which may or may not be a problem.
Also, believe it or not, some amazing things can be done with LaTeX. I've used the tkz (tikz) library to produce some awesome graphs.
Both solutions plot to a file which you can include in your interface.
They aren't C++ libraries but you can easily create the datafiles and call the necessary programs from within your C++ program (Being creative with system() and possible some shell scripts).