File: plugin.xml

package info (click to toggle)
sight 25.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,108 kB
  • sloc: cpp: 306,170; xml: 18,037; ansic: 9,960; python: 1,379; sh: 144; makefile: 33
file content (271 lines) | stat: -rw-r--r-- 12,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<plugin id="tuto15_matrix">
    <requirement id="sight::module::ui" />
    <requirement id="sight::module::viz::scene3d" />
    <requirement id="sight::module::ui::qt" />
    <requirement id="sight::module::service" />

    <extension implements="sight::app::extension::config">
        <id>Tuto15Matrix_AppCfg</id>
        <config>
            <!-- ******************************* Objects declaration ****************************** -->

            <!-- Mesh object associated to the uid 'mesh' -->
            <object uid="mesh" type="sight::data::mesh" />
            <!-- Matrix object associated to the uid 'matrix' -->
            <object uid="matrix" type="sight::data::matrix4" />
            <!-- Translation matrix object associated to the uid 'translationMatrix' -->
            <object uid="translationMatrix" type="sight::data::matrix4" />
            <!-- Rotation matrix object associated to the uid 'rotationMatrix' -->
            <object uid="rotationMatrix" type="sight::data::matrix4" />
            <object uid="transRotMatrix" type="sight::data::matrix4" />
            <object uid="rotTransMatrix" type="sight::data::matrix4" />

            <!-- ******************************* UI declaration *********************************** -->

            <service uid="mainFrame" type="sight::module::ui::frame">
                <gui>
                    <frame>
                        <name>tuto15_matrix</name>
                        <icon>tuto15_matrix/tuto.ico</icon>
                        <minSize width="800" height="600" />
                    </frame>
                    <menubar />
                </gui>
                <registry>
                    <menubar sid="menuBarView" start="true" />
                    <view sid="containerView" start="true" />
                </registry>
            </service>

            <service uid="menuBarView" type="sight::module::ui::menubar">
                <gui>
                    <layout>
                        <menu name="File" />
                    </layout>
                </gui>
                <registry>
                    <menu sid="menuFileView" start="true" />
                </registry>
            </service>

            <service uid="menuFileView" type="sight::module::ui::menu">
                <gui>
                    <layout>
                        <menuItem name="Open mesh" shortcut="Ctrl+M" />
                        <separator />
                        <menuItem name="Quit" specialAction="QUIT" shortcut="Ctrl+Q" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="openMeshAct" start="true" />
                    <menuItem sid="quitAct" start="true" />
                </registry>
            </service>

            <!--
            Default view service:
            The type 'sight::ui::layout::line' represents a layout where the view are aligned
            horizontally or vertically (set orientation value 'horizontal' or 'vertical').
            It is possible to add a 'proportion' attribute for the <view> to defined the proportion
            used by the view compared to the others.
            -->
            <service uid="containerView" type="sight::module::ui::view">
                <gui>
                    <layout type="sight::ui::layout::line">
                        <orientation value="horizontal" />
                        <view proportion="2" />
                        <view proportion="1" backgroundColor="#36393E" />
                    </layout>
                </gui>
                <registry>
                    <view sid="genericSceneSrv" start="true" />
                    <view sid="editorsView" start="true" />
                </registry>
            </service>

            <service uid="editorsView" type="sight::module::ui::view">
                <gui>
                    <layout type="sight::ui::layout::line">
                        <orientation value="vertical" />
                        <view proportion="1" />
                        <view proportion="4" />
                    </layout>
                </gui>
                <registry>
                    <view sid="shhowMeshSrv" start="true" />
                    <view sid="matrixView" start="true" />
                </registry>
            </service>

            <service uid="matrixView" type="sight::module::ui::qt::viz::transform_editor" auto_connect="false">
                <inout key="matrix" uid="matrix" />
                <translation enabled="true" min="-300" />
                <rotation enabled="true" min="-180" max="180" />
            </service>

            <!-- ******************************* Actions ****************************************** -->

            <service uid="openMeshAct" type="sight::module::ui::action" />

            <service uid="quitAct" type="sight::module::ui::quit" />

            <!-- *************************** Begin generic scene *************************** -->

            <!--
            Mesh view:
            This scene display two meshes.
            -->
            <service uid="genericSceneSrv" type="sight::viz::scene3d::render">
                <scene>
                    <background topColor="#36393E" bottomColor="#36393E" />

                    <layer id="default" order="1">
                        <adaptor uid="trackballInteractorAdp" />
                        <adaptor uid="mesh1Adp" />
                        <adaptor uid="mesh2Adp" />
                        <adaptor uid="matrix1Adp" />
                        <adaptor uid="matrix2Adp" />
                        <adaptor uid="axis1Adp" />
                        <adaptor uid="axis2Adp" />
                        <adaptor uid="originAxisAdp" />
                        <adaptor uid="text1Adp" />
                        <adaptor uid="text2Adp" />
                    </layer>
                </scene>
            </service>

            <service uid="trackballInteractorAdp" type="sight::module::viz::scene3d::adaptor::trackball_camera">
                <config priority="0" />
            </service>

            <!-- Mesh adaptors -->
            <service uid="mesh1Adp" type="sight::module::viz::scene3d::adaptor::mesh" auto_connect="true">
                <in key="mesh" uid="mesh" />
                <config transform="transRotMat" />
            </service>

            <service uid="mesh2Adp" type="sight::module::viz::scene3d::adaptor::mesh" auto_connect="true">
                <in key="mesh" uid="mesh" />
                <config transform="rotTransMat" />
            </service>

            <!--
            Defines transform adaptors:
            This adaptor works on a sight::data::matrix4 and manages a vtkTransform. When
            the sight::data::matrix4 is modified, it updates the vtkTransform, and vice
            versa.
            -->
            <service uid="matrix1Adp" type="sight::module::viz::scene3d::adaptor::transform" auto_connect="true">
                <inout key="transform" uid="transRotMatrix" />
                <config transform="transRotMat" />
            </service>

            <service uid="matrix2Adp" type="sight::module::viz::scene3d::adaptor::transform" auto_connect="true">
                <inout key="transform" uid="rotTransMatrix" />
                <config transform="rotTransMat" />
            </service>

            <service uid="axis1Adp" type="sight::module::viz::scene3d::adaptor::axis">
                <config length="10" transform="transRotMat" label="false" origin="true" name="Base" />
                <properties origin_color="#6997BB" />
            </service>

            <service uid="axis2Adp" type="sight::module::viz::scene3d::adaptor::axis">
                <config length="10" transform="rotTransMat" label="false" origin="true" />
                <properties origin_color="#D25252" />
            </service>

            <service uid="originAxisAdp" type="sight::module::viz::scene3d::adaptor::axis">
                <config length="10" label="false" origin="true" />
                <properties origin_color="#000000" />
            </service>

            <service uid="text1Adp" type="sight::module::viz::scene3d::adaptor::text">
                <text>Translation-Rotation transform</text>
                <config color="#FF0000" fontSize="15" hAlign="left" vAlign="bottom" />
            </service>

            <service uid="text2Adp" type="sight::module::viz::scene3d::adaptor::text">
                <text>Rotation-Translation transform</text>
                <config color="#00FF00" fontSize="15" hAlign="right" vAlign="bottom" />
            </service>

            <!-- ******************************* Services ***************************************** -->

            <service uid="meshReaderSrv" type="sight::module::ui::io::selector">
                <inout key="data" uid="mesh" />
                <type mode="reader" />
            </service>

            <!--
            Defines matrixDecomposerAdp service:
            This service decompose a matrix into a rotation matrix and a translation matrix
            -->
            <service uid="matrixDecomposerAdp" type="sight::module::geometry::decompose_matrix">
                <in key="source" uid="matrix" auto_connect="true" />
                <inout key="translation" uid="translationMatrix" />
                <inout key="rotation" uid="rotationMatrix" />
            </service>

            <!-- to multiply matrices -->
            <service uid="concatenateTranslationAndRotationArv" type="sight::module::geometry::concatenate_matrices" auto_connect="true">
                <in group="matrix">
                    <key uid="translationMatrix" />
                    <key uid="rotationMatrix" />
                </in>
                <inout key="output" uid="transRotMatrix" />
            </service>

            <!-- to multiply matrices -->
            <service uid="concatenateRotationAndTranslationSrv" type="sight::module::geometry::concatenate_matrices" auto_connect="true">
                <in group="matrix">
                    <key uid="rotationMatrix" />
                    <key uid="translationMatrix" />
                </in>
                <inout key="output" uid="rotTransMatrix" />
            </service>

            <service uid="shhowMeshSrv" type="sight::module::ui::qt::parameters">
                <parameters>
                    <param type="bool" name="Show/Hide Mesh" key="boolParam" defaultValue="true" />
                </parameters>
            </service>

            <!-- ******************************* Connections ***************************************** -->

            <connect>
                <signal>shhowMeshSrv/bool_changed</signal>
                <slot>mesh1Adp/update_visibility</slot>
                <slot>mesh2Adp/update_visibility</slot>
            </connect>

            <connect>
                <signal>trackballInteractorAdp/started</signal>
                <slot>genericSceneSrv/reset_cameras</slot>
            </connect>

            <connect>
                <signal>openMeshAct/clicked</signal>
                <slot>meshReaderSrv/update</slot>
            </connect>

            <!-- ******************************* Start services ***************************************** -->

            <start uid="mainFrame" />
            <start uid="matrixDecomposerAdp" />
            <start uid="concatenateTranslationAndRotationArv" />
            <start uid="concatenateRotationAndTranslationSrv" />
            <start uid="mesh1Adp" />
            <start uid="mesh2Adp" />
            <start uid="matrix1Adp" />
            <start uid="matrix2Adp" />
            <start uid="axis1Adp" />
            <start uid="axis2Adp" />
            <start uid="originAxisAdp" />
            <start uid="text1Adp" />
            <start uid="text2Adp" />
            <start uid="trackballInteractorAdp" />
            <start uid="meshReaderSrv" />
        </config>
    </extension>
</plugin>