Editing User:Vladbogolin/Proposal/DisplayManager

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 18: Line 18:
  
  
===Projects===
+
Projects
  
 
*Labirinth: it's a game in which the character is trapped in a maze and he has to find the portal that takes him out.
 
*Labirinth: it's a game in which the character is trapped in a maze and he has to find the portal that takes him out.
Line 40: Line 40:
  
 
This was a first step in order to understand the code. In order to implement it the first step was to see how libdm works and how are display managers related to mged. After, inspecting mged/attach.c and modifying it, it was possible to select the new display manager (txt). All I had to do after this, was to make the callback functions from libdm print a particular message.
 
This was a first step in order to understand the code. In order to implement it the first step was to see how libdm works and how are display managers related to mged. After, inspecting mged/attach.c and modifying it, it was possible to select the new display manager (txt). All I had to do after this, was to make the callback functions from libdm print a particular message.
While working at the second patch, I have discovered an improvement that can be done, but unfortunately I didn't have time to implement it because of my exams period. Now, in order to select the txt dm, I have added an if clause. This is not the best approach. A better approach would be to create a init function (attach.c) in which the open method that returns the struct dm needs to be called.
 
 
*Refactor X_open_dm from dm-generic.c. The code can be found at the following link:
 
**https://sourceforge.net/p/brlcad/patches/179/
 
In order to remove the #ifdef from dm-generic.c, I have added a new callback function dm_open in struct_dm. Also, I have created a new function dm_select (defined in dm-generic.c) which selects the dm. At the moment, it only selects X dm. The function returns the primary dm struct (dm_X) and then there is necessary to call the open method from struct_dm.
 
To refactor all dm’s it is necessary just to add the open function to struct dm(now it’s NULL) and to call it in mged/dm-*.c.
 
 
*Eliminated some warnings from brep.cpp. The code can be found at the following link:
 
**https://sourceforge.net/p/brlcad/patches/184/
 
  
 
=Project Information=
 
=Project Information=
Line 57: Line 48:
 
==Brief project summary==
 
==Brief project summary==
  
The purpose of this project is to create a new cross-platform 3D display manager. A display manager is the primary means with which BRL-CAD interacts graphically with geometry. The framework used in implementation will be Qt. The project will be structured as an extension to BRL-CAD's libdm library.
+
Create a new cross-platform 3D display manager. A display manager is the primary means with which BRL-CAD interacts graphically with geometry. Basically the project’s purpose is to implement a new display manager using Qt/OGRE. This should be done as an extension to BRL-CAD's libdm library.
==Description==
+
Description
===Basic steps===
+
Basic steps
  
 
Even though the purpose of this project is to create a new display manager interface, this cannot be done without being careful about all the features that a DM should support in order to maintain previous functionalities. So this is one of the most important things I plan to have in mind while implementing the new DM (for features to be supported see "Features"). After this, I can start working effectively and the next step would be to embed Qt in Tk window (for more information see Embed Qt in Tk windows).
 
Even though the purpose of this project is to create a new display manager interface, this cannot be done without being careful about all the features that a DM should support in order to maintain previous functionalities. So this is one of the most important things I plan to have in mind while implementing the new DM (for features to be supported see "Features"). After this, I can start working effectively and the next step would be to embed Qt in Tk window (for more information see Embed Qt in Tk windows).
Line 65: Line 56:
 
When all this is done, I can start working on the actual operations that need to be supported. Finally, last step would be testing.
 
When all this is done, I can start working on the actual operations that need to be supported. Finally, last step would be testing.
  
===Concepts===
+
==Concepts==
  
 
Implementing a display manager is strongly related to a lot of concepts that BRL-CAD uses. In order to make a better image about the whole project I decided to make a short list of concepts that are related to display manager and to point out in some case some relevant source code.
 
Implementing a display manager is strongly related to a lot of concepts that BRL-CAD uses. In order to make a better image about the whole project I decided to make a short list of concepts that are related to display manager and to point out in some case some relevant source code.
====Display Manager====
+
===Display Manager===
  
 
A display manager is a tool that is used for starting a new session of a graphical server. For BRL-CAD the DM is the primary means with which it interacts with geometry. DM-s are implemented as a library: libdm. Display managers can be controlled using dm objects (dm-obj.c)
 
A display manager is a tool that is used for starting a new session of a graphical server. For BRL-CAD the DM is the primary means with which it interacts with geometry. DM-s are implemented as a library: libdm. Display managers can be controlled using dm objects (dm-obj.c)
  
====Framebuffer====
+
===Framebuffer===
  
 
A framebuffer is a video device that displays from a memory buffer containing a complete frame of data. Contrary to the previous solution(vector displays) where only the vertices of the graphics primitives were stored, in a framebuffer there is at least one bit for each pixel. In order to emulate the functions of a framebuffer for compatibility reasons a virtual framebuffer can be created. In BRL-CAD there is a generic framebuffer library: libfb and also a framebuffer server: fbserv which actually opens the framebuffer. Also, in order to control the fb a framebuffer object (fb_obj.c) can be used. Another useful tool when it comes to framebuffer is fbhelp which displays info about framebuffer devices available to libfb, gives details about choices of frame buffers and gives detailed info about any option the currently device may have.
 
A framebuffer is a video device that displays from a memory buffer containing a complete frame of data. Contrary to the previous solution(vector displays) where only the vertices of the graphics primitives were stored, in a framebuffer there is at least one bit for each pixel. In order to emulate the functions of a framebuffer for compatibility reasons a virtual framebuffer can be created. In BRL-CAD there is a generic framebuffer library: libfb and also a framebuffer server: fbserv which actually opens the framebuffer. Also, in order to control the fb a framebuffer object (fb_obj.c) can be used. Another useful tool when it comes to framebuffer is fbhelp which displays info about framebuffer devices available to libfb, gives details about choices of frame buffers and gives detailed info about any option the currently device may have.
====Qt====
+
===Qt===
  
 
Qt is a cross-platform application framework used for developing applications with a graphical user interface using C++. Besides having one of the best GUI designer tools, another major advantage is C++ that gives the possibility to work with lots of libraries including STL. I must say that I do not experienced Qt before, but during the application process I had looked over some small applications in order to get used to it.
 
Qt is a cross-platform application framework used for developing applications with a graphical user interface using C++. Besides having one of the best GUI designer tools, another major advantage is C++ that gives the possibility to work with lots of libraries including STL. I must say that I do not experienced Qt before, but during the application process I had looked over some small applications in order to get used to it.
  
====Tcl/Tk====
+
===Tcl/Tk===
  
 
Tk is a library of basic elements for building a graphical user interface. It is actually an extension for Tcl scripting language having the following characteristics: platform-independent, customizable, configurable.
 
Tk is a library of basic elements for building a graphical user interface. It is actually an extension for Tcl scripting language having the following characteristics: platform-independent, customizable, configurable.
  
====Raytracing====
+
===Raytracing===
  
 
Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. Raytracing isn’t particularly related to this entire project, it’s only related to the “embedding a framebuffer window”. In BRL-CAD raytracing is implemented as rt which does the actual raytrace. There is also a raytrace library (librt - library for raytracing a mged database).
 
Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. Raytracing isn’t particularly related to this entire project, it’s only related to the “embedding a framebuffer window”. In BRL-CAD raytracing is implemented as rt which does the actual raytrace. There is also a raytrace library (librt - library for raytracing a mged database).
 
 
==Features==
 
==Features==
 
===Actual features===
 
===Actual features===
Line 165: Line 155:
 
Finally, I will focus just on testing so that there would be a functional display manager at the end.
 
Finally, I will focus just on testing so that there would be a functional display manager at the end.
  
=Schedule=
+
==Schedule==
  
 
This is a rough plan that I am I sure I will be able to follow. I hope that every feature will be ready before the scheduled time. After researching, I am sure that this is a realist schedule that I definitely can follow. In the schedule below I have also included time for unexpected delays or some breaks but I haven’t explicitly mention that. As planned the project has to be ready with at least 2 weeks before the final deadline and I will make any necessary efforts for this to happen.
 
This is a rough plan that I am I sure I will be able to follow. I hope that every feature will be ready before the scheduled time. After researching, I am sure that this is a realist schedule that I definitely can follow. In the schedule below I have also included time for unexpected delays or some breaks but I haven’t explicitly mention that. As planned the project has to be ready with at least 2 weeks before the final deadline and I will make any necessary efforts for this to happen.
Line 187: Line 177:
  
 
At the end of each time slice the particular functionality should be implemented and tested.
 
At the end of each time slice the particular functionality should be implemented and tested.
=Time availability=
+
==Time availability==
  
 
I can say without any doubt that I can fulfil the minimum required time of 40 hours / week. As I understood after talking with the community this is quite a complex project so if it will be necessary I could work more. This project is really interesting to me so I will invest as much time as it needs in order to finalize it.
 
I can say without any doubt that I can fulfil the minimum required time of 40 hours / week. As I understood after talking with the community this is quite a complex project so if it will be necessary I could work more. This project is really interesting to me so I will invest as much time as it needs in order to finalize it.
==Known commitments==
+
===Known commitments===
  
 
*Exams: my exam period ends on 14 June so it does not overlap with the official schedule, but I must say that until then I won't be able to start working 100%.
 
*Exams: my exam period ends on 14 June so it does not overlap with the official schedule, but I must say that until then I won't be able to start working 100%.

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)