KWWidgets/Projects/3DWidgets/Widgets/ChangingArchitecture: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
==Analysis and overview of existing architecture== | ==Analysis and overview of existing architecture== | ||
'''Architecture''' | '''Architecture''' | ||
In order to apply the redesigned architecture regarding the vtk 3D Widgets, I had to first understand the old architecture, then how the new architecture was supposed to work and finally re-write the 3D widgets to match the new architecture. | |||
<br><br> | |||
This I commenced by looking at the vtkSliderWidget and how it interacts with the main classes regarding the restructuring project - the vtkAbstractWidget and vtkWidgetRepresentation classes and their derivatives. | |||
'''Old architecture''' | '''Old architecture''' | ||
After looking at the was the 3D widgets worked under the old architecture, I made my own class diagram to help me understand it (as opposed to just copying the generated diagram from the vtk documentation). | |||
<center>[[Image:3DWidgets_arch_before.jpg]]</center> | <center>[[Image:3DWidgets_arch_before.jpg]]</center> | ||
'''New architecture''' | '''New architecture''' | ||
<center>[[Image:3DWidgets_arch_after.jpg]]</center> | <center>[[Image:3DWidgets_arch_after.jpg]]</center> | ||
==Analysis and overview of new architecture== | |||
'''Differences between the two architectures''' | '''Differences between the two architectures''' | ||
<center>[[Image:3DWidgets_arch_differences.jpg]]</center> | <center>[[Image:3DWidgets_arch_differences.jpg]]</center> | ||
==Comparing the two architectures== | ==Comparing the two architectures== |
Revision as of 17:11, 5 June 2006
Analysis and overview of existing architecture
Architecture
In order to apply the redesigned architecture regarding the vtk 3D Widgets, I had to first understand the old architecture, then how the new architecture was supposed to work and finally re-write the 3D widgets to match the new architecture.
This I commenced by looking at the vtkSliderWidget and how it interacts with the main classes regarding the restructuring project - the vtkAbstractWidget and vtkWidgetRepresentation classes and their derivatives.
Old architecture After looking at the was the 3D widgets worked under the old architecture, I made my own class diagram to help me understand it (as opposed to just copying the generated diagram from the vtk documentation).
New architecture
Analysis and overview of new architecture
Differences between the two architectures
Comparing the two architectures
Methodology
- study both architectures
- study source code; vtkBoxWidget (Old) and vtkSliderWidget (new)
- separate source code into new classes
- study events
- compare vtkBoxWidget Old and New
- methods
* added
* removed
* edited - example code
*changes to original