4 * @section org Organization
6 * At a high level this design separates code specific to MeshTex functionality
7 * from code that could apply to Radiant plugins in general, especially plugins
8 * that have similar interface needs (i.e. accept some numbers/choices from user
9 * input and apply to selected objects). Within both of those broad categories,
10 * further separation is enforced between the plugin framework, patch mesh
11 * manipulation, and UI. See the Modules page of this documentation for
14 * @section flow Control Flow
16 * A Radiant plugin is a library that exports only one function:
17 * Radiant_RegisterModules. This returns a function table that Radiant will
18 * use to identify the plugin, populate the main menu for the plugin, and notify
19 * the plugin when one of those menu entries is selected.
21 * When a menu entry is selected, the plugin code is sent a string token that
22 * identifies the entry, and it must use that token to decide what to do.
24 * The MeshTex menu entries lead to three kinds of operations:
25 * - Raise a popup message dialog with fixed text, such as the Help dialog.
26 * - Execute an operation on selected patch mesh entities. This operation is
27 * completely specified by the selected menu entry.
28 * - Raise a window that accepts further input. When the OK or Apply button is
29 * clicked on that window, execute an operation on selected patch mesh
30 * entities, using values read from the window's input widgets as arguments.
32 * Most MeshTex operations follow this general flow:
33 * - Create a visitor object that understands how to execute the operation on
34 * any input that is a valid patch mesh.
35 * - Instantiate the Radiant class UndoableCommand to identify the operation.
36 * - Use the Radiant function GlobalSelectionSystem().foreachSelected to
37 * iterate over the currently selected objects and pass them to the visitor
39 * - Destroy the UndoableCommand object (implicitly on scope exit).
41 * The visitor object follows these steps when processing a mesh:
42 * - Use the Radiant function GlobalPatchCreator().Patch_undoSave if it is
43 * about to modify the mesh.
44 * - Read mesh characteristics and control point data, and possibly modify
45 * the texture coordinates in the control point data.
46 * - If the mesh was modified, use the Radiant functions
47 * GlobalPatchCreator().Patch_controlPointsChanged and
48 * GlobalPatchCreator().Patch_undoSave.
50 * The complete list of Radiant systems used by MeshTex is defined in the
51 * MeshTexPluginDependencies class declaration.
53 * @section external External Dependences
55 * This version of MeshTex uses types and functions from these other sources:
56 * - GtkRadiant 1.5: https://github.com/TTimo/GtkRadiant/tree/1.5-release
57 * - GTK+ 2 stack: http://www.gtk.org/download/index.php
58 * - STLport 5: http://sourceforge.net/projects/stlport/files/STLport/
60 * The specific minor versions last used to build MeshTex are GtkRadiant 1.5.0,
61 * GTK+ 2.24.10, and STLport 5.2.1.