<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to CodeArchitecture</title><link>https://sourceforge.net/p/glmixer/wiki/CodeArchitecture/</link><description>Recent changes to CodeArchitecture</description><atom:link href="https://sourceforge.net/p/glmixer/wiki/CodeArchitecture/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 14 Mar 2015 18:33:13 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/glmixer/wiki/CodeArchitecture/feed" rel="self" type="application/rss+xml"/><item><title>CodeArchitecture modified by Anonymous</title><link>https://sourceforge.net/p/glmixer/wiki/CodeArchitecture/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="main-files"&gt;Main files&lt;/h1&gt;
&lt;p&gt;&lt;em&gt;File&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Description&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/main.cpp" rel="nofollow"&gt;main.cpp&lt;/a&gt;&lt;br /&gt;
Creation of the Qt Application, testing of the OpenGL compatibility, instanciation of the 2 windows &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/glmixer.h" rel="nofollow"&gt;glmixer.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/glmixer.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
GLMixer class (Singleton, GUI Qt main window): manages menu and toolbars, actions, embed central view, reads &amp;amp; saves settings, creates all user interfaces and connects all signals and slots between them. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/Source.h" rel="nofollow"&gt;Source.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/Source.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
Source class (base class for all source classes) &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/VideoFile.h" rel="nofollow"&gt;VideoFile.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/VideoFile.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
VideoFile class (QObject): implementation of ffmpeg decoder for all video formats. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/RenderingManager.h" rel="nofollow"&gt;RenderingManager.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/RenderingManager.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
RenderingManager class (Singleton QObject): only object allowed to instanciate Sources, manages the list of sources, controls the GLSL rendering into an OpenGL framebuffer &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/View.h" rel="nofollow"&gt;View.h &lt;/a&gt;&lt;br /&gt;
View class (base class for all View classes): specifies uniform behavior of all Views for user events (mouse and keyboard)&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/ViewRenderWidget.h" rel="nofollow"&gt;ViewRenderWidget.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/ViewRenderWidget.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
ViewRenderWidget class (subclass of glRenderWidget): container for the Views, holds the OpenGL display lists of the graphical objects, manages the views configuration. &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/OutputRenderWindow.h" rel="nofollow"&gt;OutputRenderWindow.h&lt;/a&gt; &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/OutputRenderWindow.cpp" rel="nofollow"&gt;.cpp&lt;/a&gt;&lt;br /&gt;
OutputRenderWindow class (Singleton, subclass of glRenderWidget) Window for displaying the rendered frame buffer. &lt;/p&gt;
&lt;h1 id="source"&gt;Source&lt;/h1&gt;
&lt;p&gt;A source is an object able to be drawn and manipulated in GLMixer. &lt;/p&gt;
&lt;p&gt;The methods to implement in a Source subclass for defining its graphical behavior are: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;virtual&lt;/span&gt; &lt;span class="n"&gt;RTTI&lt;/span&gt; &lt;span class="n"&gt;rtti&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;virtual&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;isPlayable&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;virtual&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;isPlaying&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;virtual&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;virtual&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The properties accessible through the &lt;strong&gt;get&lt;/strong&gt; and &lt;strong&gt;set&lt;/strong&gt; methods are: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Property&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Description&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Type&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Values&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Y &lt;br /&gt;
Vertical coordinate of the center &lt;br /&gt;
double &lt;br /&gt;
visible range: &lt;code&gt;[-1.0 1.0]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;ScaleY &lt;br /&gt;
Vertical multiplying factor for height &lt;br /&gt;
double &lt;br /&gt;
100% of rendering window height with &lt;code&gt;scaleY = 1.0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;X &lt;br /&gt;
Horizontal coordinate of the center &lt;br /&gt;
double &lt;br /&gt;
visible range: &lt;code&gt;[-1.0 1.0] * window aspect ratio&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;ScaleX &lt;br /&gt;
Horizontal multiplying factor for width &lt;br /&gt;
double &lt;br /&gt;
100% of rendering window width with &lt;code&gt;scaleX = window aspect ratio&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Alpha &lt;br /&gt;
Opacity (1 - transparency) &lt;br /&gt;
double &lt;br /&gt;
&lt;code&gt;[0.0 1.0]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;RotationAngle &lt;br /&gt;
Degrees of rotation &lt;br /&gt;
double &lt;br /&gt;
&lt;code&gt;[0.0 360.0]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;TextureCoordinates &lt;br /&gt;
4 UV coordinates for texture mapping &lt;br /&gt;
QRectf &lt;br /&gt;
&lt;code&gt;(0.0, 0.0, 1.0, 1.0)&lt;/code&gt; is default &lt;/p&gt;
&lt;p&gt;Color &lt;br /&gt;
RGB base color &lt;br /&gt;
QColor &lt;br /&gt;
white is default &lt;code&gt;(255, 255, 255)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Brightness &lt;br /&gt;
Brightness filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[-100 100]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Contrast &lt;br /&gt;
Contrast filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[-100 100]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Saturation &lt;br /&gt;
Saturation filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[-100 100]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;HueShift &lt;br /&gt;
Shift in HUE color filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[0 360]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;LuminanceThreshold &lt;br /&gt;
Luminance intensity % for thresholding filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[0 100]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;NumberOfColor &lt;br /&gt;
Number of colors for posterizing filter &lt;br /&gt;
int &lt;br /&gt;
&lt;code&gt;[0 255]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Pixelated &lt;br /&gt;
Whereas to use GL smoothing or not &lt;br /&gt;
bool &lt;br /&gt;
False is smooth rendering &lt;/p&gt;
&lt;p&gt;Example: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;getRotationAngle&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;setRotationAngle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The exceptions are: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Property&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Description&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Type&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Access to values&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Gamma &lt;br /&gt;
Curve of gamma transfert filter &lt;br /&gt;
5 integers&lt;br /&gt;
READ : getGamma(), getGammaMinInput(), getGammaMaxInput(), getGammaMinOuput(), getGammaMaxOutput(), WRITE: setGamma(gamma, mininput, maxinput, minoutput, maxoutput); &lt;/p&gt;
&lt;p&gt;Filter &lt;br /&gt;
Type of the post-processing filter &lt;br /&gt;
Source::filterType &lt;br /&gt;
Use getFilter and setFilter with one of those value : &lt;code&gt;FILTER_NONE = 0, FILTER_BLUR_GAUSSIAN = 1, FILTER_BLUR_MEAN = 2, FILTER_SHARPEN = 3, FILTER_SHARPEN_MORE = 4, FILTER_EDGE_GAUSSIAN = 5, FILTER_EDGE_LAPLACE = 6, FILTER_EDGE_LAPLACE_2 = 7, FILTER_EMBOSS = 8, FILTER_EMBOSS_EDGE = 9, FILTER_EROSION_3X3 = 10, FILTER_EROSION_5X5 = 11, FILTER_EROSION_7X7 = 12, FILTER_DILATION_3X3 = 13, FILTER_DILATION_5X5 = 14, FILTER_DILATION_7X7 = 15&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;InvertMode &lt;br /&gt;
Type of color inversion mode filter &lt;br /&gt;
Source::invertModeType &lt;br /&gt;
Use getInvertMode and setInvertMode with one of those values: &lt;code&gt;INVERT_NONE = 0, INVERT_COLOR = 1, INVERT_LUMINANCE = 2&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Mask &lt;br /&gt;
Type of border masking &lt;br /&gt;
Source::maskType &lt;br /&gt;
Use getMark and setMask with one of those values : &lt;code&gt;NO_MASK = 0, ROUNDCORNER_MASK, CIRCLE_MASK, GRADIENT_CIRCLE_MASK, GRADIENT_SQUARE_MASK, GRADIENT_LEFT_MASK, GRADIENT_RIGHT_MASK, GRADIENT_TOP_MASK, GRADIENT_BOTTOM_MASK, GRADIENT_HORIZONTAL_MASK, GRADIENT_VERTICAL_MASK, ANTIALIASING_MASK&lt;/code&gt;&lt;/p&gt;
&lt;h1 id="rendering-manager"&gt;Rendering Manager&lt;/h1&gt;
&lt;p&gt;The RenderingManager is a singleton. &lt;/p&gt;
&lt;p&gt;The RenderingManager holds a list of sources in the current session. The list is of type &lt;code&gt;SourceSet&lt;/code&gt; (defined in &lt;a class="" href="http://code.google.com/p/glmixer/source/browse/trunk/src/SourceSet.h" rel="nofollow"&gt;SourceSet.h&lt;/a&gt; as a C++ std::set) and is &lt;strong&gt;automatically sorted by depth&lt;/strong&gt; (first is forward). It has several methods for adding new sources to the list, removing them, browsing the list and going from beginning to the end. &lt;/p&gt;
&lt;p&gt;The RenderingManager is also responsible for : &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;keeping a reference (iterator) on the current source &lt;/li&gt;
&lt;li&gt;holding the FBO object in which the rendering is done, and managing the rendering global parameters (resolution and aspect ratio) &lt;/li&gt;
&lt;li&gt;holding a reference to the RenderingEncoder which does the recording &lt;/li&gt;
&lt;li&gt;loading and saving sessions &lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="view"&gt;View&lt;/h1&gt;
&lt;h1 id="view-rendering-widget"&gt;View Rendering Widget&lt;/h1&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 14 Mar 2015 18:33:13 -0000</pubDate><guid>https://sourceforge.net8353c51dfdf21757c776e417d0f379b7c09f84e5</guid></item></channel></rss>