├── .gitignore
├── CMakeLists.txt
├── Data
├── Images
│ ├── IMG_2400.GIF
│ ├── arraw_strip.png
│ ├── color_strip.png
│ ├── water.png
│ └── world.tif
├── Models
│ ├── axes.osgt
│ ├── cow.osg
│ ├── glider.osg
│ └── pipe.osg
├── Shaders
│ ├── texRolling.frag
│ └── texRolling.vert
├── blueStar.earth
├── config
│ └── config.ini
├── path.json
└── skin
│ ├── ModeEdit.qss
│ ├── Titles
│ ├── banner.png
│ ├── exit_0.png
│ ├── exit_1.png
│ ├── menubackground.png
│ ├── spacing.png
│ └── tab_1.png
│ └── melogo.png
├── README.md
├── bin
├── RigelCored.ilk
├── RigelCored.pdb
├── RigelMathd.ilk
├── RigelMathd.pdb
├── RigelMessaged.ilk
├── RigelMessaged.pdb
├── RigelModeld.ilk
├── RigelModeld.pdb
├── RigelQtd.ilk
├── RigelQtd.pdb
├── Rigeld.ilk
└── Rigeld.pdb
├── lib
├── RigelCored.exp
├── RigelMathd.exp
├── RigelModeld.exp
└── RigelQtd.exp
└── src
├── CMakeLists.txt
├── MEPlotting
├── CMakeLists.txt
├── Export.h
├── InputLib.cpp
├── Measure
│ ├── MeasureAngle.cpp
│ ├── MeasureAngle.h
│ ├── MeasureArea.cpp
│ ├── MeasureArea.h
│ ├── MeasureAzimuth.cpp
│ ├── MeasureAzimuth.h
│ ├── MeasureBase.cpp
│ ├── MeasureBase.h
│ ├── MeasureHeight.cpp
│ ├── MeasureHeight.h
│ ├── MeasureLength.cpp
│ ├── MeasureLength.h
│ ├── MeasureMarkSphere.cpp
│ ├── MeasureMarkSphere.h
│ ├── MeasureTool.cpp
│ └── MeasureTool.h
├── Plotting
│ ├── PlottingArrow.cpp
│ ├── PlottingArrow.h
│ ├── PlottingTool.cpp
│ └── PlottingTool.h
├── PosPickHandler.cpp
├── PosPickHandler.h
├── ReadMe.txt
└── Symbols
│ ├── SymbolBase.cpp
│ ├── SymbolBase.h
│ ├── SymbolCuboid.cpp
│ ├── SymbolCuboid.h
│ ├── SymbolFence.cpp
│ ├── SymbolFence.h
│ ├── SymbolPolygon.cpp
│ ├── SymbolPolygon.h
│ ├── SymbolRoad.cpp
│ ├── SymbolRoad.h
│ ├── SymbolStrip.cpp
│ ├── SymbolStrip.h
│ ├── SymbolTool.cpp
│ └── SymbolTool.h
├── ModelEdit
├── CMakeLists.txt
├── InputLib.cpp
├── MainWidget
│ ├── AppHeadeTitle.cpp
│ ├── AppHeadeTitle.h
│ ├── AppHeadeTitle.ui
│ ├── BottomMenu.cpp
│ ├── BottomMenu.h
│ └── BottomMenu.ui
├── MainWindow.cpp
├── MainWindow.h
├── MainWindow.ui
├── ModelEdit.qrc
├── Resources
│ ├── bottom_bg.png
│ ├── dataBase.png
│ ├── dataBase_h.png
│ ├── function.png
│ ├── function_h.png
│ ├── project.png
│ ├── project_h.png
│ ├── query.png
│ └── query_h.png
├── TextureRolling.cpp
├── TextureRolling.h
└── main.cpp
├── Rigel
├── CMakeLists.txt
├── InputLib.cpp
├── Rigel.qrc
├── RigelOSG.cpp
├── RigelOSG.h
├── TopPanel.cpp
├── TopPanel.h
├── TopPanel.qml
├── main.cpp
└── main.qml
├── RigelCore
├── CMakeLists.txt
├── Core.cpp
├── Core.h
├── Export.h
├── FileUtils.cpp
├── FileUtils.h
├── InputLib.cpp
├── SigSlot.cpp
├── SigSlot.h
└── Version.h
├── RigelMath
├── CMakeLists.txt
├── Export.h
├── InputLib.cpp
├── MEMath.cpp
├── MEMath.h
├── Segment.cpp
└── Segment.h
├── RigelMessage
├── CMakeLists.txt
├── Export.h
└── InputLib.cpp
├── RigelModel
├── CMakeLists.txt
├── Export.h
├── GeometryBase.cpp
├── GeometryBase.h
├── GeometryFloor.cpp
├── GeometryFloor.h
├── GeometryLine.cpp
├── GeometryLine.h
├── GeometryPipe.cpp
├── GeometryPipe.h
├── GeometryPolygon.cpp
├── GeometryPolygon.h
├── GeometryStrip.cpp
├── GeometryStrip.h
├── InputLib.cpp
├── Style.cpp
└── Style.h
└── RigelQt
├── CMakeLists.txt
├── DialogBase.cpp
├── DialogBase.h
├── EventAdapter.cpp
├── EventAdapter.h
├── Export.h
├── GraphicsView.cpp
├── GraphicsView.h
├── OSGView.cpp
├── OSGView.h
├── OSGWidget.cpp
├── OSGWidget.h
└── RigelQt.qrc
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 | *.smod
19 |
20 | # Compiled Static libraries
21 | *.lai
22 | *.la
23 | *.a
24 | *.lib
25 |
26 | # Executables
27 | *.exe
28 | *.out
29 | *.app
30 |
31 | #project
32 | Projects
33 | build
34 | bin_x64
35 | lib_x64
36 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # 添加CMakeList头信息,cmake最低版本
2 | cmake_minimum_required(VERSION 2.8.12)
3 |
4 | # 设置解决方案名称
5 | project(RigelGL)
6 |
7 | # 配置需要的第三方库
8 | set(ThirdParty_DIR "" CACHE PATH "third party directory")
9 |
10 | # 如果不配置第三方库,则不进行之后的生成
11 | if(NOT ThirdParty_DIR)
12 | message(FATAL_ERROR "ThirdParty_DIR variable is not set appropriate!")
13 | endif()
14 |
15 | # 判断生成的是32位还是64位
16 | if(${CMAKE_SIZEOF_VOID_P} MATCHES 8)
17 | SET(Platform "x64")
18 | else(${CMAKE_SIZEOF_VOID_P} MATCHES 8)
19 | SET(Platform "win32")
20 | endif(${CMAKE_SIZEOF_VOID_P} MATCHES 8)
21 |
22 | # 设置输出路径
23 | set(OUTPUT_BINDIR ${CMAKE_SOURCE_DIR}/bin)
24 |
25 | # 设置lib库的输出路径
26 | set(OUTPUT_LIBDIR ${CMAKE_SOURCE_DIR}/lib)
27 |
28 | # 对每一个平台,设置其输出路径
29 | foreach(CONF ${CMAKE_CONFIGURATION_TYPES})
30 | string(TOUPPER "${CONF}" CONF_UC)
31 | set("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF_UC}" ${OUTPUT_LIBDIR})
32 | set("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_UC}" ${OUTPUT_BINDIR})
33 | set("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF_UC}" "${OUTPUT_BINDIR}${SEPARATE_FOLDER}")
34 | endforeach()
35 |
36 | # Debug库输出带d,Release不带
37 | set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows")
38 | set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
39 | if(CMAKE_BUILD_TYPE MATCHES "Release")
40 | SET(CMAKE_BUILD_POSTFIX "${CMAKE_RELEASE_POSTFIX}")
41 | elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
42 | SET(CMAKE_BUILD_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
43 | else()
44 | SET(CMAKE_BUILD_POSTFIX "")
45 | endif()
46 |
47 | # 设置第三方头文件与链接库的路径
48 | include_directories(
49 | ${ThirdParty_DIR}/include
50 | ${CMAKE_BINARY_DIR}
51 | ${CMAKE_CURRENT_SOURCE_DIR}/src
52 | )
53 |
54 | link_directories(
55 | ${ThirdParty_DIR}/lib
56 | ${OUTPUT_LIBDIR}
57 | )
58 |
59 | # 添加子项目
60 |
61 | add_subdirectory(src)
62 |
--------------------------------------------------------------------------------
/Data/Images/IMG_2400.GIF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/Images/IMG_2400.GIF
--------------------------------------------------------------------------------
/Data/Images/arraw_strip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/Images/arraw_strip.png
--------------------------------------------------------------------------------
/Data/Images/color_strip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/Images/color_strip.png
--------------------------------------------------------------------------------
/Data/Images/water.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/Images/water.png
--------------------------------------------------------------------------------
/Data/Images/world.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/Images/world.tif
--------------------------------------------------------------------------------
/Data/Models/glider.osg:
--------------------------------------------------------------------------------
1 | Geode {
2 | UniqueID Geode_0
3 | DataVariance DYNAMIC
4 | name "glider.osg"
5 | cullingActive TRUE
6 | num_drawables 6
7 | Geometry {
8 | DataVariance DYNAMIC
9 | StateSet {
10 | UniqueID StateSet_1
11 | DataVariance STATIC
12 | rendering_hint OPAQUE_BIN
13 | renderBinMode INHERIT
14 | GL_BLEND OFF
15 | Material {
16 | DataVariance STATIC
17 | ColorMode AMBIENT_AND_DIFFUSE
18 | ambientColor 0 0 0 1
19 | diffuseColor 0 0 0 1
20 | specularColor 0.622449 0.622449 0.622449 1
21 | emissionColor 0 0 0 1
22 | shininess 6.53
23 | }
24 | textureUnit 0 {
25 | GL_TEXTURE_2D OFF
26 | }
27 | }
28 | useDisplayList FALSE
29 | Primitives 1
30 | {
31 | DrawArrayLengths TRIANGLE_STRIP 0 13
32 | {
33 | 42
34 | 42
35 | 42
36 | 42
37 | 42
38 | 42
39 | 42
40 | 42
41 | 42
42 | 42
43 | 42
44 | 42
45 | 42
46 | }
47 | }
48 | VertexArray 546
49 | {
50 | 0.3326 -1 0.0299
51 | 0.358 -1 0.0315
52 | 0.3455 -0.9265 0.0508
53 | 0.3915 -0.9346 0.0526
54 | 0.3106 -0.8 0.0511
55 | 0.3615 -0.8 0.0517
56 | 0.2759 -0.7 0.0505
57 | 0.3312 -0.7 0.0497
58 | 0.2439 -0.6 0.0492
59 | 0.3034 -0.6 0.0468
60 | 0.2144 -0.5 0.0471
61 | 0.278 -0.5 0.0429
62 | 0.1925 -0.4 0.0443
63 | 0.2602 -0.4 0.038
64 | 0.1705 -0.3 0.0406
65 | 0.2422 -0.3 0.0321
66 | 0.1485 -0.2 0.0362
67 | 0.2241 -0.2 0.0252
68 | 0.1264 -0.1 0.031
69 | 0.2059 -0.1 0.0172
70 | 0.1042 0 0.025
71 | 0.1875 0 0.0083
72 | 0.1264 0.1 0.031
73 | 0.2059 0.1 0.0172
74 | 0.1485 0.2 0.0362
75 | 0.2241 0.2 0.0252
76 | 0.1705 0.3 0.0406
77 | 0.2422 0.3 0.0321
78 | 0.1925 0.4 0.0443
79 | 0.2602 0.4 0.038
80 | 0.2144 0.5 0.0471
81 | 0.278 0.5 0.0429
82 | 0.2439 0.6 0.0492
83 | 0.3034 0.6 0.0468
84 | 0.2759 0.7 0.0505
85 | 0.3312 0.7 0.0497
86 | 0.3106 0.8 0.0511
87 | 0.3615 0.8 0.0517
88 | 0.3455 0.9265 0.0508
89 | 0.3915 0.9346 0.0526
90 | 0.3326 1 0.0299
91 | 0.358 1 0.0315
92 | 0.2923 -1 0.0256
93 | 0.3326 -1 0.0299
94 | 0.2726 -0.9137 0.0448
95 | 0.3455 -0.9265 0.0508
96 | 0.2297 -0.8 0.0467
97 | 0.3106 -0.8 0.0511
98 | 0.1883 -0.7 0.048
99 | 0.2759 -0.7 0.0505
100 | 0.1494 -0.6 0.049
101 | 0.2439 -0.6 0.0492
102 | 0.1132 -0.5 0.0496
103 | 0.2144 -0.5 0.0471
104 | 0.0846 -0.4 0.0497
105 | 0.1925 -0.4 0.0443
106 | 0.0561 -0.3 0.0494
107 | 0.1705 -0.3 0.0406
108 | 0.0276 -0.2 0.0487
109 | 0.1485 -0.2 0.0362
110 | -0.0008 -0.1 0.0475
111 | 0.1264 -0.1 0.031
112 | -0.0292 0 0.0458
113 | 0.1042 0 0.025
114 | -0.0008 0.1 0.0475
115 | 0.1264 0.1 0.031
116 | 0.0276 0.2 0.0487
117 | 0.1485 0.2 0.0362
118 | 0.0561 0.3 0.0494
119 | 0.1705 0.3 0.0406
120 | 0.0846 0.4 0.0497
121 | 0.1925 0.4 0.0443
122 | 0.1132 0.5 0.0496
123 | 0.2144 0.5 0.0471
124 | 0.1494 0.6 0.049
125 | 0.2439 0.6 0.0492
126 | 0.1883 0.7 0.048
127 | 0.2759 0.7 0.0505
128 | 0.2297 0.8 0.0467
129 | 0.3106 0.8 0.0511
130 | 0.2726 0.9137 0.0448
131 | 0.3455 0.9265 0.0508
132 | 0.2923 1 0.0256
133 | 0.3326 1 0.0299
134 | 0.2699 -1 0.0222
135 | 0.2923 -1 0.0256
136 | 0.232 -0.9065 0.0397
137 | 0.2726 -0.9137 0.0448
138 | 0.1846 -0.8 0.0422
139 | 0.2297 -0.8 0.0467
140 | 0.1393 -0.7 0.0445
141 | 0.1883 -0.7 0.048
142 | 0.0967 -0.6 0.0466
143 | 0.1494 -0.6 0.049
144 | 0.0567 -0.5 0.0484
145 | 0.1132 -0.5 0.0496
146 | 0.0243 -0.4 0.0501
147 | 0.0846 -0.4 0.0497
148 | -0.008 -0.3 0.0515
149 | 0.0561 -0.3 0.0494
150 | -0.0402 -0.2 0.0526
151 | 0.0276 -0.2 0.0487
152 | -0.0722 -0.1 0.0535
153 | -0.0008 -0.1 0.0475
154 | -0.1042 0 0.0542
155 | -0.0292 0 0.0458
156 | -0.0722 0.1 0.0535
157 | -0.0008 0.1 0.0475
158 | -0.0402 0.2 0.0526
159 | 0.0276 0.2 0.0487
160 | -0.008 0.3 0.0515
161 | 0.0561 0.3 0.0494
162 | 0.0243 0.4 0.0501
163 | 0.0846 0.4 0.0497
164 | 0.0567 0.5 0.0484
165 | 0.1132 0.5 0.0496
166 | 0.0967 0.6 0.0466
167 | 0.1494 0.6 0.049
168 | 0.1393 0.7 0.0445
169 | 0.1883 0.7 0.048
170 | 0.1846 0.8 0.0422
171 | 0.2297 0.8 0.0467
172 | 0.232 0.9065 0.0397
173 | 0.2726 0.9137 0.0448
174 | 0.2699 1 0.0222
175 | 0.2923 1 0.0256
176 | 0.2627 -1 0.0202
177 | 0.2699 -1 0.0222
178 | 0.2189 -0.9042 0.0365
179 | 0.232 -0.9065 0.0397
180 | 0.17 -0.8 0.0391
181 | 0.1846 -0.8 0.0422
182 | 0.1234 -0.7 0.0415
183 | 0.1393 -0.7 0.0445
184 | 0.0794 -0.6 0.0438
185 | 0.0967 -0.6 0.0466
186 | 0.0381 -0.5 0.046
187 | 0.0567 -0.5 0.0484
188 | 0.0044 -0.4 0.048
189 | 0.0243 -0.4 0.0501
190 | -0.0292 -0.3 0.0498
191 | -0.008 -0.3 0.0515
192 | -0.0626 -0.2 0.0514
193 | -0.0402 -0.2 0.0526
194 | -0.0959 -0.1 0.0529
195 | -0.0722 -0.1 0.0535
196 | -0.1292 0 0.0542
197 | -0.1042 0 0.0542
198 | -0.0959 0.1 0.0529
199 | -0.0722 0.1 0.0535
200 | -0.0626 0.2 0.0514
201 | -0.0402 0.2 0.0526
202 | -0.0292 0.3 0.0498
203 | -0.008 0.3 0.0515
204 | 0.0044 0.4 0.048
205 | 0.0243 0.4 0.0501
206 | 0.0381 0.5 0.046
207 | 0.0567 0.5 0.0484
208 | 0.0794 0.6 0.0438
209 | 0.0967 0.6 0.0466
210 | 0.1234 0.7 0.0415
211 | 0.1393 0.7 0.0445
212 | 0.17 0.8 0.0391
213 | 0.1846 0.8 0.0422
214 | 0.2189 0.9042 0.0365
215 | 0.232 0.9065 0.0397
216 | 0.2627 1 0.0202
217 | 0.2699 1 0.0222
218 | 0.2582 -1 0.0177
219 | 0.2627 -1 0.0202
220 | 0.2106 -0.9028 0.0321
221 | 0.2189 -0.9042 0.0365
222 | 0.1607 -0.8 0.0345
223 | 0.17 -0.8 0.0391
224 | 0.1132 -0.7 0.0369
225 | 0.1234 -0.7 0.0415
226 | 0.0683 -0.6 0.0391
227 | 0.0794 -0.6 0.0438
228 | 0.0261 -0.5 0.0413
229 | 0.0381 -0.5 0.046
230 | -0.0085 -0.4 0.0433
231 | 0.0044 -0.4 0.048
232 | -0.043 -0.3 0.0451
233 | -0.0292 -0.3 0.0498
234 | -0.0774 -0.2 0.0469
235 | -0.0626 -0.2 0.0514
236 | -0.1117 -0.1 0.0485
237 | -0.0959 -0.1 0.0529
238 | -0.1458 0 0.05
239 | -0.1292 0 0.0542
240 | -0.1117 0.1 0.0485
241 | -0.0959 0.1 0.0529
242 | -0.0774 0.2 0.0469
243 | -0.0626 0.2 0.0514
244 | -0.043 0.3 0.0451
245 | -0.0292 0.3 0.0498
246 | -0.0085 0.4 0.0433
247 | 0.0044 0.4 0.048
248 | 0.0261 0.5 0.0413
249 | 0.0381 0.5 0.046
250 | 0.0683 0.6 0.0391
251 | 0.0794 0.6 0.0438
252 | 0.1132 0.7 0.0369
253 | 0.1234 0.7 0.0415
254 | 0.1607 0.8 0.0345
255 | 0.17 0.8 0.0391
256 | 0.2106 0.9028 0.0321
257 | 0.2189 0.9042 0.0365
258 | 0.2582 1 0.0177
259 | 0.2627 1 0.0202
260 | 0.254 -1 0.014
261 | 0.2582 -1 0.0177
262 | 0.2029 -0.9014 0.0255
263 | 0.2106 -0.9028 0.0321
264 | 0.152 -0.8 0.0276
265 | 0.1607 -0.8 0.0345
266 | 0.1035 -0.7 0.0296
267 | 0.1132 -0.7 0.0369
268 | 0.0577 -0.6 0.0315
269 | 0.0683 -0.6 0.0391
270 | 0.0145 -0.5 0.0334
271 | 0.0261 -0.5 0.0413
272 | -0.0211 -0.4 0.0352
273 | -0.0085 -0.4 0.0433
274 | -0.0566 -0.3 0.037
275 | -0.043 -0.3 0.0451
276 | -0.092 -0.2 0.0386
277 | -0.0774 -0.2 0.0469
278 | -0.1273 -0.1 0.0402
279 | -0.1117 -0.1 0.0485
280 | -0.1625 0 0.0417
281 | -0.1458 0 0.05
282 | -0.1273 0.1 0.0402
283 | -0.1117 0.1 0.0485
284 | -0.092 0.2 0.0386
285 | -0.0774 0.2 0.0469
286 | -0.0566 0.3 0.037
287 | -0.043 0.3 0.0451
288 | -0.0211 0.4 0.0352
289 | -0.0085 0.4 0.0433
290 | 0.0145 0.5 0.0334
291 | 0.0261 0.5 0.0413
292 | 0.0577 0.6 0.0315
293 | 0.0683 0.6 0.0391
294 | 0.1035 0.7 0.0296
295 | 0.1132 0.7 0.0369
296 | 0.152 0.8 0.0276
297 | 0.1607 0.8 0.0345
298 | 0.2029 0.9014 0.0255
299 | 0.2106 0.9028 0.0321
300 | 0.254 1 0.014
301 | 0.2582 1 0.0177
302 | 0.2505 -1 0.0079
303 | 0.254 -1 0.014
304 | 0.1962 -0.9002 0.0144
305 | 0.2029 -0.9014 0.0255
306 | 0.1443 -0.8 0.0157
307 | 0.152 -0.8 0.0276
308 | 0.0949 -0.7 0.017
309 | 0.1035 -0.7 0.0296
310 | 0.048 -0.6 0.0182
311 | 0.0577 -0.6 0.0315
312 | 0.0037 -0.5 0.0194
313 | 0.0145 -0.5 0.0334
314 | -0.033 -0.4 0.0206
315 | -0.0211 -0.4 0.0352
316 | -0.0696 -0.3 0.0217
317 | -0.0566 -0.3 0.037
318 | -0.1062 -0.2 0.0229
319 | -0.092 -0.2 0.0386
320 | -0.1427 -0.1 0.0239
321 | -0.1273 -0.1 0.0402
322 | -0.1792 0 0.025
323 | -0.1625 0 0.0417
324 | -0.1427 0.1 0.0239
325 | -0.1273 0.1 0.0402
326 | -0.1062 0.2 0.0229
327 | -0.092 0.2 0.0386
328 | -0.0696 0.3 0.0217
329 | -0.0566 0.3 0.037
330 | -0.033 0.4 0.0206
331 | -0.0211 0.4 0.0352
332 | 0.0037 0.5 0.0194
333 | 0.0145 0.5 0.0334
334 | 0.048 0.6 0.0182
335 | 0.0577 0.6 0.0315
336 | 0.0949 0.7 0.017
337 | 0.1035 0.7 0.0296
338 | 0.1443 0.8 0.0157
339 | 0.152 0.8 0.0276
340 | 0.1962 0.9002 0.0144
341 | 0.2029 0.9014 0.0255
342 | 0.2505 1 0.0079
343 | 0.254 1 0.014
344 | 0.2494 -1 0.0024
345 | 0.2505 -1 0.0079
346 | 0.1939 -0.8998 0.0045
347 | 0.1962 -0.9002 0.0144
348 | 0.1415 -0.8 0.0049
349 | 0.1443 -0.8 0.0157
350 | 0.0915 -0.7 0.0053
351 | 0.0949 -0.7 0.017
352 | 0.0441 -0.6 0.0058
353 | 0.048 -0.6 0.0182
354 | -0.0008 -0.5 0.0062
355 | 0.0037 -0.5 0.0194
356 | -0.0382 -0.4 0.0066
357 | -0.033 -0.4 0.0206
358 | -0.0756 -0.3 0.0071
359 | -0.0696 -0.3 0.0217
360 | -0.1129 -0.2 0.0075
361 | -0.1062 -0.2 0.0229
362 | -0.1502 -0.1 0.0079
363 | -0.1427 -0.1 0.0239
364 | -0.1875 0 0.0083
365 | -0.1792 0 0.025
366 | -0.1502 0.1 0.0079
367 | -0.1427 0.1 0.0239
368 | -0.1129 0.2 0.0075
369 | -0.1062 0.2 0.0229
370 | -0.0756 0.3 0.0071
371 | -0.0696 0.3 0.0217
372 | -0.0382 0.4 0.0066
373 | -0.033 0.4 0.0206
374 | -0.0008 0.5 0.0062
375 | 0.0037 0.5 0.0194
376 | 0.0441 0.6 0.0058
377 | 0.048 0.6 0.0182
378 | 0.0915 0.7 0.0053
379 | 0.0949 0.7 0.017
380 | 0.1415 0.8 0.0049
381 | 0.1443 0.8 0.0157
382 | 0.1939 0.8998 0.0045
383 | 0.1962 0.9002 0.0144
384 | 0.2494 1 0.0024
385 | 0.2505 1 0.0079
386 | 0.25 -1 0
387 | 0.2494 -1 0.0024
388 | 0.195 -0.9 0
389 | 0.1939 -0.8998 0.0045
390 | 0.1425 -0.8 0
391 | 0.1415 -0.8 0.0049
392 | 0.0925 -0.7 0
393 | 0.0915 -0.7 0.0053
394 | 0.045 -0.6 0
395 | 0.0441 -0.6 0.0058
396 | 0 -0.5 0
397 | -0.0008 -0.5 0.0062
398 | -0.0375 -0.4 0
399 | -0.0382 -0.4 0.0066
400 | -0.075 -0.3 0
401 | -0.0756 -0.3 0.0071
402 | -0.1125 -0.2 0
403 | -0.1129 -0.2 0.0075
404 | -0.15 -0.1 0
405 | -0.1502 -0.1 0.0079
406 | -0.1875 0 0
407 | -0.1875 0 0.0083
408 | -0.15 0.1 0
409 | -0.1502 0.1 0.0079
410 | -0.1125 0.2 0
411 | -0.1129 0.2 0.0075
412 | -0.075 0.3 0
413 | -0.0756 0.3 0.0071
414 | -0.0375 0.4 0
415 | -0.0382 0.4 0.0066
416 | 0 0.5 0
417 | -0.0008 0.5 0.0062
418 | 0.045 0.6 0
419 | 0.0441 0.6 0.0058
420 | 0.0925 0.7 0
421 | 0.0915 0.7 0.0053
422 | 0.1425 0.8 0
423 | 0.1415 0.8 0.0049
424 | 0.195 0.9 0
425 | 0.1939 0.8998 0.0045
426 | 0.25 1 0
427 | 0.2494 1 0.0024
428 | 0.2511 -1 -0.0023
429 | 0.25 -1 0
430 | 0.1969 -0.9003 -0.0042
431 | 0.195 -0.9 0
432 | 0.1445 -0.8 -0.0047
433 | 0.1425 -0.8 0
434 | 0.0946 -0.7 -0.0051
435 | 0.0925 -0.7 0
436 | 0.0471 -0.6 -0.0056
437 | 0.045 -0.6 0
438 | 0.0021 -0.5 -0.006
439 | 0 -0.5 0
440 | -0.0355 -0.4 -0.0065
441 | -0.0375 -0.4 0
442 | -0.073 -0.3 -0.007
443 | -0.075 -0.3 0
444 | -0.1106 -0.2 -0.0074
445 | -0.1125 -0.2 0
446 | -0.1482 -0.1 -0.0079
447 | -0.15 -0.1 0
448 | -0.1858 0 -0.0083
449 | -0.1875 0 0
450 | -0.1482 0.1 -0.0079
451 | -0.15 0.1 0
452 | -0.1106 0.2 -0.0074
453 | -0.1125 0.2 0
454 | -0.073 0.3 -0.0069
455 | -0.075 0.3 0
456 | -0.0355 0.4 -0.0065
457 | -0.0375 0.4 0
458 | 0.0021 0.5 -0.006
459 | 0 0.5 0
460 | 0.0471 0.6 -0.0056
461 | 0.045 0.6 0
462 | 0.0946 0.7 -0.0051
463 | 0.0925 0.7 0
464 | 0.1445 0.8 -0.0047
465 | 0.1425 0.8 0
466 | 0.1969 0.9003 -0.0042
467 | 0.195 0.9 0
468 | 0.2511 1 -0.0023
469 | 0.25 1 0
470 | 0.2537 -1 -0.0042
471 | 0.2511 -1 -0.0023
472 | 0.2015 -0.9011 -0.0078
473 | 0.1969 -0.9003 -0.0042
474 | 0.1495 -0.8 -0.0087
475 | 0.1445 -0.8 -0.0047
476 | 0.0998 -0.7 -0.0097
477 | 0.0946 -0.7 -0.0051
478 | 0.0526 -0.6 -0.0106
479 | 0.0471 -0.6 -0.0056
480 | 0.0078 -0.5 -0.0116
481 | 0.0021 -0.5 -0.006
482 | -0.0295 -0.4 -0.0126
483 | -0.0355 -0.4 -0.0065
484 | -0.0668 -0.3 -0.0136
485 | -0.073 -0.3 -0.007
486 | -0.1042 -0.2 -0.0146
487 | -0.1106 -0.2 -0.0074
488 | -0.1417 -0.1 -0.0156
489 | -0.1482 -0.1 -0.0079
490 | -0.1792 0 -0.0167
491 | -0.1858 0 -0.0083
492 | -0.1417 0.1 -0.0156
493 | -0.1482 0.1 -0.0079
494 | -0.1042 0.2 -0.0146
495 | -0.1106 0.2 -0.0074
496 | -0.0668 0.3 -0.0136
497 | -0.073 0.3 -0.0069
498 | -0.0295 0.4 -0.0126
499 | -0.0355 0.4 -0.0065
500 | 0.0078 0.5 -0.0116
501 | 0.0021 0.5 -0.006
502 | 0.0526 0.6 -0.0106
503 | 0.0471 0.6 -0.0056
504 | 0.0998 0.7 -0.0097
505 | 0.0946 0.7 -0.0051
506 | 0.1495 0.8 -0.0087
507 | 0.1445 0.8 -0.0047
508 | 0.2015 0.9011 -0.0078
509 | 0.1969 0.9003 -0.0042
510 | 0.2537 1 -0.0042
511 | 0.2511 1 -0.0023
512 | 0.2592 -1 -0.0053
513 | 0.2537 -1 -0.0042
514 | 0.2113 -0.9029 -0.0102
515 | 0.2015 -0.9011 -0.0078
516 | 0.1603 -0.8 -0.0116
517 | 0.1495 -0.8 -0.0087
518 | 0.1114 -0.7 -0.013
519 | 0.0998 -0.7 -0.0097
520 | 0.065 -0.6 -0.0145
521 | 0.0526 -0.6 -0.0106
522 | 0.021 -0.5 -0.0161
523 | 0.0078 -0.5 -0.0116
524 | -0.0155 -0.4 -0.0178
525 | -0.0295 -0.4 -0.0126
526 | -0.0521 -0.3 -0.0195
527 | -0.0668 -0.3 -0.0136
528 | -0.0889 -0.2 -0.0213
529 | -0.1042 -0.2 -0.0146
530 | -0.1256 -0.1 -0.0231
531 | -0.1417 -0.1 -0.0156
532 | -0.1625 0 -0.025
533 | -0.1792 0 -0.0167
534 | -0.1256 0.1 -0.0231
535 | -0.1417 0.1 -0.0156
536 | -0.0889 0.2 -0.0213
537 | -0.1042 0.2 -0.0146
538 | -0.0521 0.3 -0.0195
539 | -0.0668 0.3 -0.0136
540 | -0.0155 0.4 -0.0178
541 | -0.0295 0.4 -0.0126
542 | 0.021 0.5 -0.0161
543 | 0.0078 0.5 -0.0116
544 | 0.065 0.6 -0.0145
545 | 0.0526 0.6 -0.0106
546 | 0.1114 0.7 -0.013
547 | 0.0998 0.7 -0.0097
548 | 0.1603 0.8 -0.0116
549 | 0.1495 0.8 -0.0087
550 | 0.2113 0.9029 -0.0102
551 | 0.2015 0.9011 -0.0078
552 | 0.2592 1 -0.0053
553 | 0.2537 1 -0.0042
554 | 0.358 -1 0.0315
555 | 0.2592 -1 -0.0053
556 | 0.3915 -0.9346 0.0526
557 | 0.2113 -0.9029 -0.0102
558 | 0.3615 -0.8 0.0517
559 | 0.1603 -0.8 -0.0116
560 | 0.3312 -0.7 0.0497
561 | 0.1114 -0.7 -0.013
562 | 0.3034 -0.6 0.0468
563 | 0.065 -0.6 -0.0145
564 | 0.278 -0.5 0.0429
565 | 0.021 -0.5 -0.0161
566 | 0.2602 -0.4 0.038
567 | -0.0155 -0.4 -0.0178
568 | 0.2422 -0.3 0.0321
569 | -0.0521 -0.3 -0.0195
570 | 0.2241 -0.2 0.0252
571 | -0.0889 -0.2 -0.0213
572 | 0.2059 -0.1 0.0172
573 | -0.1256 -0.1 -0.0231
574 | 0.1875 0 0.0083
575 | -0.1625 0 -0.025
576 | 0.2059 0.1 0.0172
577 | -0.1256 0.1 -0.0231
578 | 0.2241 0.2 0.0252
579 | -0.0889 0.2 -0.0213
580 | 0.2422 0.3 0.0321
581 | -0.0521 0.3 -0.0195
582 | 0.2602 0.4 0.038
583 | -0.0155 0.4 -0.0178
584 | 0.278 0.5 0.0429
585 | 0.021 0.5 -0.0161
586 | 0.3034 0.6 0.0468
587 | 0.065 0.6 -0.0145
588 | 0.3312 0.7 0.0497
589 | 0.1114 0.7 -0.013
590 | 0.3615 0.8 0.0517
591 | 0.1603 0.8 -0.0116
592 | 0.3915 0.9346 0.0526
593 | 0.2113 0.9029 -0.0102
594 | 0.358 1 0.0315
595 | 0.2592 1 -0.0053
596 | }
597 | NormalBinding PER_VERTEX
598 | NormalArray 546
599 | {
600 | -0.0621008 -0.263303 0.962712
601 | -0.0618021 -0.27751 0.958733
602 | -0.0840976 -0.138596 0.986772
603 | -0.0391013 -0.00180006 0.999234
604 | -0.0332004 -0.0086001 0.999412
605 | -0.0120001 0.0156001 0.999806
606 | -0.00709966 0.00679967 0.999952
607 | 0.0140993 0.0330984 0.999353
608 | 0.0190992 0.022799 0.999558
609 | 0.0402988 0.0492986 0.997971
610 | 0.0452008 0.0363007 0.998318
611 | 0.066303 0.0608028 0.995945
612 | 0.0712996 0.0480997 0.996294
613 | 0.0922982 0.0752985 0.99288
614 | 0.0972955 0.0614971 0.993354
615 | 0.118105 0.0897037 0.988941
616 | 0.123194 0.0748964 0.989552
617 | 0.143704 0.104103 0.98413
618 | 0.148902 0.088201 0.984911
619 | 0.169193 0.118295 0.978458
620 | 0.175303 0 0.984515
621 | 0.194601 -0.1225 0.973203
622 | 0.148902 -0.088201 0.984911
623 | 0.169395 -0.108397 0.979569
624 | 0.123194 -0.0748964 0.989552
625 | 0.143901 -0.0941008 0.985108
626 | 0.0972955 -0.0614971 0.993354
627 | 0.118197 -0.0797983 0.989779
628 | 0.0712996 -0.0480997 0.996294
629 | 0.0922983 -0.0653988 0.993581
630 | 0.0452008 -0.0363007 0.998318
631 | 0.0663025 -0.0558021 0.996238
632 | 0.0190992 -0.022799 0.999558
633 | 0.0402988 -0.0403988 0.998371
634 | -0.00709966 -0.00679967 0.999952
635 | 0.0141003 -0.0235006 0.999624
636 | -0.0332004 0.0086001 0.999412
637 | -0.0120002 -0.00430008 0.999919
638 | -0.0840976 0.138596 0.986772
639 | -0.0842952 0.266485 0.960146
640 | -0.0621008 0.263303 0.962712
641 | -0.0618021 0.27751 0.958733
642 | -0.103496 -0.239091 0.965466
643 | -0.0621008 -0.263303 0.962712
644 | -0.129602 -0.153502 0.979612
645 | -0.0840976 -0.138596 0.986772
646 | -0.0764961 -0.0450977 0.996049
647 | -0.0332004 -0.0086001 0.999412
648 | -0.0504007 -0.0321004 0.998213
649 | -0.00709966 0.00679967 0.999952
650 | -0.0241992 -0.0167994 0.999566
651 | 0.0190992 0.022799 0.999558
652 | 0.00189999 -0.00279998 0.999994
653 | 0.0452008 0.0363007 0.998318
654 | 0.028099 0.00889969 0.999566
655 | 0.0712996 0.0480997 0.996294
656 | 0.0542008 0.0207003 0.998315
657 | 0.0972955 0.0614971 0.993354
658 | 0.0803033 0.0325013 0.99624
659 | 0.123194 0.0748964 0.989552
660 | 0.106305 0.0442022 0.993351
661 | 0.148902 0.088201 0.984911
662 | 0.1324 0 0.991196
663 | 0.175303 0 0.984515
664 | 0.106305 -0.0442022 0.993351
665 | 0.148902 -0.088201 0.984911
666 | 0.0803033 -0.0325013 0.99624
667 | 0.123194 -0.0748964 0.989552
668 | 0.0542008 -0.0207003 0.998315
669 | 0.0972955 -0.0614971 0.993354
670 | 0.028099 -0.00889969 0.999566
671 | 0.0712996 -0.0480997 0.996294
672 | 0.00189999 0.00279998 0.999994
673 | 0.0452008 -0.0363007 0.998318
674 | -0.0241992 0.0167994 0.999566
675 | 0.0190992 -0.022799 0.999558
676 | -0.0504007 0.0321004 0.998213
677 | -0.00709966 -0.00679967 0.999952
678 | -0.0764961 0.0450977 0.996049
679 | -0.0332004 0.0086001 0.999412
680 | -0.129602 0.153502 0.979612
681 | -0.0840976 0.138596 0.986772
682 | -0.103496 0.239091 0.965466
683 | -0.0621008 0.263303 0.962712
684 | -0.146207 -0.239012 0.959946
685 | -0.103496 -0.239091 0.965466
686 | -0.21049 -0.188991 0.959154
687 | -0.129602 -0.153502 0.979612
688 | -0.152704 -0.0915025 0.984027
689 | -0.0764961 -0.0450977 0.996049
690 | -0.127106 -0.0776038 0.988849
691 | -0.0504007 -0.0321004 0.998213
692 | -0.101295 -0.0614971 0.992954
693 | -0.0241992 -0.0167994 0.999566
694 | -0.0753963 -0.0446978 0.996151
695 | 0.00189999 -0.00279998 0.999994
696 | -0.0493001 -0.0310001 0.998303
697 | 0.028099 0.00889969 0.999566
698 | -0.0232006 -0.0202005 0.999527
699 | 0.0542008 0.0207003 0.998315
700 | 0.00299986 -0.00929956 0.999952
701 | 0.0803033 0.0325013 0.99624
702 | 0.0290993 0.00149996 0.999575
703 | 0.106305 0.0442022 0.993351
704 | 0.0552983 0 0.99847
705 | 0.1324 0 0.991196
706 | 0.0290993 -0.00149996 0.999575
707 | 0.106305 -0.0442022 0.993351
708 | 0.00299986 0.00929956 0.999952
709 | 0.0803033 -0.0325013 0.99624
710 | -0.0232006 0.0202005 0.999527
711 | 0.0542008 -0.0207003 0.998315
712 | -0.0493001 0.0310001 0.998303
713 | 0.028099 -0.00889969 0.999566
714 | -0.0753963 0.0446978 0.996151
715 | 0.00189999 0.00279998 0.999994
716 | -0.101295 0.0614971 0.992954
717 | -0.0241992 0.0167994 0.999566
718 | -0.127106 0.0776038 0.988849
719 | -0.0504007 0.0321004 0.998213
720 | -0.152704 0.0915025 0.984027
721 | -0.0764961 0.0450977 0.996049
722 | -0.21049 0.188991 0.959154
723 | -0.129602 0.153502 0.979612
724 | -0.146207 0.239012 0.959946
725 | -0.103496 0.239091 0.965466
726 | -0.24911 -0.271511 0.929638
727 | -0.146207 -0.239012 0.959946
728 | -0.3804 -0.2611 0.887199
729 | -0.21049 -0.188991 0.959154
730 | -0.319888 -0.172794 0.931565
731 | -0.152704 -0.0915025 0.984027
732 | -0.296406 -0.156703 0.942119
733 | -0.127106 -0.0776038 0.988849
734 | -0.272495 -0.137497 0.952282
735 | -0.101295 -0.0614971 0.992954
736 | -0.248502 -0.113101 0.962006
737 | -0.0753963 -0.0446978 0.996151
738 | -0.223804 -0.0937019 0.970119
739 | -0.0493001 -0.0310001 0.998303
740 | -0.198605 -0.0834021 0.976525
741 | -0.0232006 -0.0202005 0.999527
742 | -0.173099 -0.0729996 0.982195
743 | 0.00299986 -0.00929956 0.999952
744 | -0.147497 -0.0625987 0.98708
745 | 0.0290993 0.00149996 0.999575
746 | -0.121905 0 0.992542
747 | 0.0552983 0 0.99847
748 | -0.147497 0.0625987 0.98708
749 | 0.0290993 -0.00149996 0.999575
750 | -0.173099 0.0729996 0.982195
751 | 0.00299986 0.00929956 0.999952
752 | -0.198605 0.0834021 0.976525
753 | -0.0232006 0.0202005 0.999527
754 | -0.223804 0.0937019 0.970119
755 | -0.0493001 0.0310001 0.998303
756 | -0.248502 0.113101 0.962006
757 | -0.0753963 0.0446978 0.996151
758 | -0.272495 0.137497 0.952282
759 | -0.101295 0.0614971 0.992954
760 | -0.296406 0.156703 0.942119
761 | -0.127106 0.0776038 0.988849
762 | -0.319888 0.172794 0.931565
763 | -0.152704 0.0915025 0.984027
764 | -0.3804 0.2611 0.887199
765 | -0.21049 0.188991 0.959154
766 | -0.24911 0.271511 0.929638
767 | -0.146207 0.239012 0.959946
768 | -0.455697 -0.344198 0.820895
769 | -0.24911 -0.271511 0.929638
770 | -0.567095 -0.339797 0.750294
771 | -0.3804 -0.2611 0.887199
772 | -0.514076 -0.266288 0.815363
773 | -0.319888 -0.172794 0.931565
774 | -0.495196 -0.247798 0.832693
775 | -0.296406 -0.156703 0.942119
776 | -0.475897 -0.225899 0.849995
777 | -0.272495 -0.137497 0.952282
778 | -0.456907 -0.193503 0.868213
779 | -0.248502 -0.113101 0.962006
780 | -0.436292 -0.167997 0.883983
781 | -0.223804 -0.0937019 0.970119
782 | -0.413608 -0.158703 0.896517
783 | -0.198605 -0.0834021 0.976525
784 | -0.39062 -0.149408 0.908346
785 | -0.173099 -0.0729996 0.982195
786 | -0.367307 -0.139903 0.919518
787 | -0.147497 -0.0625987 0.98708
788 | -0.346484 0 0.938056
789 | -0.121905 0 0.992542
790 | -0.367307 0.139903 0.919518
791 | -0.147497 0.0625987 0.98708
792 | -0.39062 0.149408 0.908346
793 | -0.173099 0.0729996 0.982195
794 | -0.413608 0.158703 0.896517
795 | -0.198605 0.0834021 0.976525
796 | -0.436292 0.167997 0.883983
797 | -0.223804 0.0937019 0.970119
798 | -0.456907 0.193503 0.868213
799 | -0.248502 0.113101 0.962006
800 | -0.475897 0.225899 0.849995
801 | -0.272495 0.137497 0.952282
802 | -0.495196 0.247798 0.832693
803 | -0.296406 0.156703 0.942119
804 | -0.514076 0.266288 0.815363
805 | -0.319888 0.172794 0.931565
806 | -0.567095 0.339797 0.750294
807 | -0.3804 0.2611 0.887199
808 | -0.455697 0.344198 0.820895
809 | -0.24911 0.271511 0.929638
810 | -0.609297 -0.395798 0.687096
811 | -0.455697 -0.344198 0.820895
812 | -0.723383 -0.406791 0.557887
813 | -0.567095 -0.339797 0.750294
814 | -0.691004 -0.353702 0.630404
815 | -0.514076 -0.266288 0.815363
816 | -0.679794 -0.333297 0.653294
817 | -0.495196 -0.247798 0.832693
818 | -0.668071 -0.310386 0.67627
819 | -0.475897 -0.225899 0.849995
820 | -0.658411 -0.272205 0.701712
821 | -0.456907 -0.193503 0.868213
822 | -0.645293 -0.242297 0.724492
823 | -0.436292 -0.167997 0.883983
824 | -0.627289 -0.234996 0.742486
825 | -0.413608 -0.158703 0.896517
826 | -0.608816 -0.227406 0.76002
827 | -0.39062 -0.149408 0.908346
828 | -0.589795 -0.219698 0.777094
829 | -0.367307 -0.139903 0.919518
830 | -0.583506 0 0.812109
831 | -0.346484 0 0.938056
832 | -0.589795 0.219698 0.777094
833 | -0.367307 0.139903 0.919518
834 | -0.608816 0.227406 0.76002
835 | -0.39062 0.149408 0.908346
836 | -0.627289 0.234996 0.742486
837 | -0.413608 0.158703 0.896517
838 | -0.645293 0.242297 0.724492
839 | -0.436292 0.167997 0.883983
840 | -0.658411 0.272205 0.701712
841 | -0.456907 0.193503 0.868213
842 | -0.668071 0.310386 0.67627
843 | -0.475897 0.225899 0.849995
844 | -0.679794 0.333297 0.653294
845 | -0.495196 0.247798 0.832693
846 | -0.691004 0.353702 0.630404
847 | -0.514076 0.266288 0.815363
848 | -0.723383 0.406791 0.557887
849 | -0.567095 0.339797 0.750294
850 | -0.609297 0.395798 0.687096
851 | -0.455697 0.344198 0.820895
852 | -0.773471 -0.449783 0.446583
853 | -0.609297 -0.395798 0.687096
854 | -0.835429 -0.455516 0.307511
855 | -0.723383 -0.406791 0.557887
856 | -0.828142 -0.423822 0.366819
857 | -0.691004 -0.353702 0.630404
858 | -0.826904 -0.402802 0.392402
859 | -0.679794 -0.333297 0.653294
860 | -0.824722 -0.38081 0.418111
861 | -0.668071 -0.310386 0.67627
862 | -0.827477 -0.340091 0.446788
863 | -0.658411 -0.272205 0.701712
864 | -0.825095 -0.308098 0.473597
865 | -0.645293 -0.242297 0.724492
866 | -0.813611 -0.303504 0.495906
867 | -0.627289 -0.234996 0.742486
868 | -0.80164 -0.298715 0.517826
869 | -0.608816 -0.227406 0.76002
870 | -0.789058 -0.293684 0.539571
871 | -0.589795 -0.219698 0.777094
872 | -0.810389 0 0.585892
873 | -0.583506 0 0.812109
874 | -0.789058 0.293684 0.539571
875 | -0.589795 0.219698 0.777094
876 | -0.80164 0.298715 0.517826
877 | -0.608816 0.227406 0.76002
878 | -0.813611 0.303504 0.495906
879 | -0.627289 0.234996 0.742486
880 | -0.825095 0.308098 0.473597
881 | -0.645293 0.242297 0.724492
882 | -0.827477 0.340091 0.446788
883 | -0.658411 0.272205 0.701712
884 | -0.824722 0.38081 0.418111
885 | -0.668071 0.310386 0.67627
886 | -0.826904 0.402802 0.392402
887 | -0.679794 0.333297 0.653294
888 | -0.828142 0.423822 0.366819
889 | -0.691004 0.353702 0.630404
890 | -0.835429 0.455516 0.307511
891 | -0.723383 0.406791 0.557887
892 | -0.773471 0.449783 0.446583
893 | -0.609297 0.395798 0.687096
894 | -0.859884 -0.479191 0.175997
895 | -0.773471 -0.449783 0.446583
896 | -0.880155 -0.474676 -0.00329983
897 | -0.835429 -0.455516 0.307511
898 | -0.889701 -0.456101 0.0201
899 | -0.828142 -0.423822 0.366819
900 | -0.898192 -0.437396 0.0439996
901 | -0.826904 -0.402802 0.392402
902 | -0.905687 -0.418394 0.068399
903 | -0.824722 -0.38081 0.418111
904 | -0.920702 -0.378801 0.0939002
905 | -0.827477 -0.340091 0.446788
906 | -0.929841 -0.348015 0.119505
907 | -0.825095 -0.308098 0.473597
908 | -0.926803 -0.346801 0.1441
909 | -0.813611 -0.303504 0.495906
910 | -0.923236 -0.345313 0.168507
911 | -0.80164 -0.298715 0.517826
912 | -0.919061 -0.343685 0.192892
913 | -0.789058 -0.293684 0.539571
914 | -0.972928 0 0.231107
915 | -0.810389 0 0.585892
916 | -0.919061 0.343685 0.192892
917 | -0.789058 0.293684 0.539571
918 | -0.923236 0.345313 0.168507
919 | -0.80164 0.298715 0.517826
920 | -0.926803 0.346801 0.1441
921 | -0.813611 0.303504 0.495906
922 | -0.929841 0.348015 0.119505
923 | -0.825095 0.308098 0.473597
924 | -0.920702 0.378801 0.0939002
925 | -0.827477 0.340091 0.446788
926 | -0.905687 0.418394 0.068399
927 | -0.824722 0.38081 0.418111
928 | -0.898192 0.437396 0.0439996
929 | -0.826904 0.402802 0.392402
930 | -0.889701 0.456101 0.0201
931 | -0.828142 0.423822 0.366819
932 | -0.880155 0.474676 -0.00329983
933 | -0.835429 0.455516 0.307511
934 | -0.859884 0.479191 0.175997
935 | -0.773471 0.449783 0.446583
936 | -0.852993 -0.469196 -0.228598
937 | -0.859884 -0.479191 0.175997
938 | -0.849578 -0.456588 -0.264093
939 | -0.880155 -0.474676 -0.00329983
940 | -0.856145 -0.438723 -0.273014
941 | -0.889701 -0.456101 0.0201
942 | -0.869785 -0.423993 -0.252396
943 | -0.898192 -0.437396 0.0439996
944 | -0.883009 -0.408404 -0.231302
945 | -0.905687 -0.418394 0.068399
946 | -0.903694 -0.372298 -0.211499
947 | -0.920702 -0.378801 0.0939002
948 | -0.919303 -0.344701 -0.189901
949 | -0.929841 -0.348015 0.119505
950 | -0.923393 -0.346297 -0.165599
951 | -0.926803 -0.346801 0.1441
952 | -0.92693 -0.347611 -0.141305
953 | -0.923236 -0.345313 0.168507
954 | -0.929913 -0.348705 -0.116902
955 | -0.919061 -0.343685 0.192892
956 | -0.995117 0 -0.0987017
957 | -0.972928 0 0.231107
958 | -0.929913 0.348705 -0.116902
959 | -0.919061 0.343685 0.192892
960 | -0.92693 0.347611 -0.141305
961 | -0.923236 0.345313 0.168507
962 | -0.923393 0.346297 -0.165599
963 | -0.926803 0.346801 0.1441
964 | -0.919303 0.344701 -0.189901
965 | -0.929841 0.348015 0.119505
966 | -0.903694 0.372298 -0.211499
967 | -0.920702 0.378801 0.0939002
968 | -0.883009 0.408404 -0.231302
969 | -0.905687 0.418394 0.068399
970 | -0.869785 0.423993 -0.252396
971 | -0.898192 0.437396 0.0439996
972 | -0.856145 0.438723 -0.273014
973 | -0.889701 0.456101 0.0201
974 | -0.849578 0.456588 -0.264093
975 | -0.880155 0.474676 -0.00329983
976 | -0.852993 0.469196 -0.228598
977 | -0.859884 0.479191 0.175997
978 | -0.803001 -0.4445 -0.397
979 | -0.852993 -0.469196 -0.228598
980 | -0.741191 -0.401495 -0.537994
981 | -0.849578 -0.456588 -0.264093
982 | -0.735966 -0.378583 -0.561274
983 | -0.856145 -0.438723 -0.273014
984 | -0.753677 -0.369589 -0.543484
985 | -0.869785 -0.423993 -0.252396
986 | -0.771378 -0.35909 -0.525385
987 | -0.883009 -0.408404 -0.231302
988 | -0.794357 -0.329882 -0.510073
989 | -0.903694 -0.372298 -0.211499
990 | -0.814132 -0.307912 -0.49232
991 | -0.919303 -0.344701 -0.189901
992 | -0.82551 -0.312304 -0.470106
993 | -0.923393 -0.346297 -0.165599
994 | -0.836365 -0.316487 -0.447581
995 | -0.92693 -0.347611 -0.141305
996 | -0.846695 -0.320398 -0.424797
997 | -0.929913 -0.348705 -0.116902
998 | -0.90529 0 -0.424795
999 | -0.995117 0 -0.0987017
1000 | -0.846695 0.320398 -0.424797
1001 | -0.929913 0.348705 -0.116902
1002 | -0.836365 0.316487 -0.447581
1003 | -0.92693 0.347611 -0.141305
1004 | -0.82551 0.312304 -0.470106
1005 | -0.923393 0.346297 -0.165599
1006 | -0.814132 0.307912 -0.49232
1007 | -0.919303 0.344701 -0.189901
1008 | -0.794357 0.329882 -0.510073
1009 | -0.903694 0.372298 -0.211499
1010 | -0.771378 0.35909 -0.525385
1011 | -0.883009 0.408404 -0.231302
1012 | -0.753677 0.369589 -0.543484
1013 | -0.869785 0.423993 -0.252396
1014 | -0.735966 0.378583 -0.561274
1015 | -0.856145 0.438723 -0.273014
1016 | -0.741191 0.401495 -0.537994
1017 | -0.849578 0.456588 -0.264093
1018 | -0.803001 0.4445 -0.397
1019 | -0.852993 0.469196 -0.228598
1020 | -0.560576 -0.324286 -0.761967
1021 | -0.803001 -0.4445 -0.397
1022 | -0.448583 -0.253391 -0.857068
1023 | -0.741191 -0.401495 -0.537994
1024 | -0.437218 -0.228909 -0.869736
1025 | -0.735966 -0.378583 -0.561274
1026 | -0.459802 -0.230801 -0.857504
1027 | -0.753677 -0.369589 -0.543484
1028 | -0.482494 -0.229897 -0.84519
1029 | -0.771378 -0.35909 -0.525385
1030 | -0.506679 -0.215891 -0.834666
1031 | -0.794357 -0.329882 -0.510073
1032 | -0.529926 -0.20601 -0.822641
1033 | -0.814132 -0.307912 -0.49232
1034 | -0.550313 -0.213805 -0.80712
1035 | -0.82551 -0.312304 -0.470106
1036 | -0.570192 -0.221497 -0.791088
1037 | -0.836365 -0.316487 -0.447581
1038 | -0.589624 -0.229009 -0.774531
1039 | -0.846695 -0.320398 -0.424797
1040 | -0.626291 0 -0.779589
1041 | -0.90529 0 -0.424795
1042 | -0.589624 0.229009 -0.774531
1043 | -0.846695 0.320398 -0.424797
1044 | -0.570192 0.221497 -0.791088
1045 | -0.836365 0.316487 -0.447581
1046 | -0.550313 0.213805 -0.80712
1047 | -0.82551 0.312304 -0.470106
1048 | -0.529926 0.20601 -0.822641
1049 | -0.814132 0.307912 -0.49232
1050 | -0.506679 0.215891 -0.834666
1051 | -0.794357 0.329882 -0.510073
1052 | -0.482494 0.229897 -0.84519
1053 | -0.771378 0.35909 -0.525385
1054 | -0.459802 0.230801 -0.857504
1055 | -0.753677 0.369589 -0.543484
1056 | -0.437218 0.228909 -0.869736
1057 | -0.735966 0.378583 -0.561274
1058 | -0.448583 0.253391 -0.857068
1059 | -0.741191 0.401495 -0.537994
1060 | -0.560576 0.324286 -0.761967
1061 | -0.803001 0.4445 -0.397
1062 | -0.198295 -0.146197 -0.969178
1063 | -0.560576 -0.324286 -0.761967
1064 | 0.0506996 -0.00659995 -0.998692
1065 | -0.448583 -0.253391 -0.857068
1066 | 0.0251995 -0.00169997 -0.999681
1067 | -0.437218 -0.228909 -0.869736
1068 | -0.000499992 -0.0151998 -0.999884
1069 | -0.459802 -0.230801 -0.857504
1070 | -0.0262994 -0.0274993 -0.999276
1071 | -0.482494 -0.229897 -0.84519
1072 | -0.0522021 -0.0373015 -0.99794
1073 | -0.506679 -0.215891 -0.834666
1074 | -0.0782003 -0.0454002 -0.995903
1075 | -0.529926 -0.20601 -0.822641
1076 | -0.103905 -0.0554024 -0.993043
1077 | -0.550313 -0.213805 -0.80712
1078 | -0.129503 -0.0654013 -0.98942
1079 | -0.570192 -0.221497 -0.791088
1080 | -0.155005 -0.0754024 -0.985032
1081 | -0.589624 -0.229009 -0.774531
1082 | -0.180997 0 -0.983484
1083 | -0.626291 0 -0.779589
1084 | -0.155005 0.0754024 -0.985032
1085 | -0.589624 0.229009 -0.774531
1086 | -0.129503 0.0654013 -0.98942
1087 | -0.570192 0.221497 -0.791088
1088 | -0.103905 0.0554024 -0.993043
1089 | -0.550313 0.213805 -0.80712
1090 | -0.0782003 0.0454002 -0.995903
1091 | -0.529926 0.20601 -0.822641
1092 | -0.0522021 0.0373015 -0.99794
1093 | -0.506679 0.215891 -0.834666
1094 | -0.0262994 0.0274993 -0.999276
1095 | -0.482494 0.229897 -0.84519
1096 | -0.000499992 0.0151998 -0.999884
1097 | -0.459802 0.230801 -0.857504
1098 | 0.0251995 0.00169997 -0.999681
1099 | -0.437218 0.228909 -0.869736
1100 | 0.0506996 0.00659995 -0.998692
1101 | -0.448583 0.253391 -0.857068
1102 | -0.198295 0.146197 -0.969178
1103 | -0.560576 0.324286 -0.761967
1104 | 0.346589 0.122596 -0.929971
1105 | -0.198295 -0.146197 -0.969178
1106 | 0.33911 0.068802 -0.938227
1107 | 0.0506996 -0.00659995 -0.998692
1108 | 0.29891 0.0724024 -0.951531
1109 | 0.0251995 -0.00169997 -0.999681
1110 | 0.274308 0.0483014 -0.960428
1111 | -0.000499992 -0.0151998 -0.999884
1112 | 0.2493 0.0252 -0.968098
1113 | -0.0262994 -0.0274993 -0.999276
1114 | 0.223896 -0.00789985 -0.974581
1115 | -0.0522021 -0.0373015 -0.99794
1116 | 0.198297 -0.0223997 -0.979886
1117 | -0.0782003 -0.0454002 -0.995903
1118 | 0.172503 -0.0369007 -0.984318
1119 | -0.103905 -0.0554024 -0.993043
1120 | 0.146593 -0.0514977 -0.987855
1121 | -0.129503 -0.0654013 -0.98942
1122 | 0.120601 -0.0660003 -0.990505
1123 | -0.155005 -0.0754024 -0.985032
1124 | 0.0945982 0.0709986 -0.992981
1125 | -0.180997 0 -0.983484
1126 | 0.1206 0.0563999 -0.991098
1127 | -0.155005 0.0754024 -0.985032
1128 | 0.146699 0.0418997 -0.988293
1129 | -0.129503 0.0654013 -0.98942
1130 | 0.172602 0.0273004 -0.984613
1131 | -0.103905 0.0554024 -0.993043
1132 | 0.198292 0.0127995 -0.980059
1133 | -0.0782003 0.0454002 -0.995903
1134 | 0.223908 -0.0185007 -0.974435
1135 | -0.0522021 0.0373015 -0.99794
1136 | 0.249195 -0.0410992 -0.967581
1137 | -0.0262994 0.0274993 -0.999276
1138 | 0.274106 -0.0647014 -0.959521
1139 | -0.000499992 0.0151998 -0.999884
1140 | 0.299204 -0.0598008 -0.952313
1141 | 0.0251995 0.00169997 -0.999681
1142 | 0.345804 -0.123001 -0.93021
1143 | 0.0506996 0.00659995 -0.998692
1144 | 0.346589 -0.122596 -0.929971
1145 | -0.198295 0.146197 -0.969178
1146 | }
1147 | ColorBinding OVERALL
1148 | ColorArray Vec4Array 1
1149 | {
1150 | 0.351 0.2558 0.7322 1
1151 | }
1152 | }
1153 | Geometry {
1154 | DataVariance DYNAMIC
1155 | StateSet {
1156 | UniqueID StateSet_2
1157 | DataVariance STATIC
1158 | rendering_hint OPAQUE_BIN
1159 | renderBinMode INHERIT
1160 | GL_BLEND OFF
1161 | Material {
1162 | DataVariance STATIC
1163 | ColorMode AMBIENT_AND_DIFFUSE
1164 | ambientColor 0.00714286 0.00169011 0 1
1165 | diffuseColor 0.314286 0.0743647 0 1
1166 | specularColor 0.780612 0.691177 0.397036 1
1167 | emissionColor 0 0 0 1
1168 | shininess 13.696
1169 | }
1170 | textureUnit 0 {
1171 | GL_TEXTURE_2D OFF
1172 | }
1173 | }
1174 | useDisplayList FALSE
1175 | Primitives 1
1176 | {
1177 | DrawArrays TRIANGLE_STRIP 0 26
1178 | }
1179 | VertexArray 26
1180 | {
1181 | 0.0332 0 -0.0014
1182 | -0.0076 0.0855 -0.2328
1183 | 0.0322 0.002 -0.0006
1184 | -0.0086 0.0875 -0.2319
1185 | 0.0293 0.0034 0.0005
1186 | -0.0115 0.0889 -0.2309
1187 | 0.0252 0.0039 0.0014
1188 | -0.0155 0.0894 -0.23
1189 | 0.0211 0.0034 0.0019
1190 | -0.0197 0.0889 -0.2294
1191 | 0.018 0.002 0.002
1192 | -0.0228 0.0875 -0.2294
1193 | 0.0168 0 0.0014
1194 | -0.024 0.0855 -0.2299
1195 | 0.0178 -0.002 0.0006
1196 | -0.023 0.0835 -0.2308
1197 | 0.0207 -0.0034 -0.0005
1198 | -0.0201 0.0821 -0.2318
1199 | 0.0248 -0.0039 -0.0014
1200 | -0.016 0.0816 -0.2328
1201 | 0.0289 -0.0034 -0.0019
1202 | -0.0119 0.0821 -0.2333
1203 | 0.032 -0.002 -0.002
1204 | -0.0088 0.0835 -0.2333
1205 | 0.0332 0 -0.0014
1206 | -0.0076 0.0855 -0.2328
1207 | }
1208 | NormalBinding PER_VERTEX
1209 | NormalArray 26
1210 | {
1211 | 0.984816 0 -0.173603
1212 | 0.984816 0 -0.173603
1213 | 0.729012 0.673811 0.120502
1214 | 0.729012 0.673811 0.120502
1215 | 0.346287 0.898167 0.27089
1216 | 0.346287 0.898167 0.27089
1217 | 0.0594 0.939701 0.3368
1218 | 0.0594 0.939701 0.3368
1219 | -0.23279 0.89816 0.372984
1220 | -0.23279 0.89816 0.372984
1221 | -0.64387 0.673769 0.362583
1222 | -0.64387 0.673769 0.362583
1223 | -0.984816 0 0.173603
1224 | -0.984816 0 0.173603
1225 | -0.729012 -0.673811 -0.120502
1226 | -0.729012 -0.673811 -0.120502
1227 | -0.346287 -0.898167 -0.27089
1228 | -0.346287 -0.898167 -0.27089
1229 | -0.0594 -0.939701 -0.3368
1230 | -0.0594 -0.939701 -0.3368
1231 | 0.23279 -0.89816 -0.372984
1232 | 0.23279 -0.89816 -0.372984
1233 | 0.64387 -0.673769 -0.362583
1234 | 0.64387 -0.673769 -0.362583
1235 | 0.984816 0 -0.173603
1236 | 0.984816 0 -0.173603
1237 | }
1238 | ColorBinding OVERALL
1239 | ColorArray Vec4Array 1
1240 | {
1241 | 0.8 0.8 0.8 1
1242 | }
1243 | }
1244 | Geometry {
1245 | DataVariance DYNAMIC
1246 | StateSet {
1247 | UniqueID StateSet_3
1248 | DataVariance STATIC
1249 | rendering_hint DEFAULT_BIN
1250 | renderBinMode INHERIT
1251 | }
1252 | useDisplayList FALSE
1253 | Primitives 1
1254 | {
1255 | DrawArrays TRIANGLE_STRIP 0 26
1256 | }
1257 | VertexArray 26
1258 | {
1259 | 0.0332 0 -0.0014
1260 | -0.0076 -0.0855 -0.2328
1261 | 0.032 0.002 -0.002
1262 | -0.0088 -0.0835 -0.2333
1263 | 0.0289 0.0034 -0.0019
1264 | -0.0119 -0.0821 -0.2333
1265 | 0.0248 0.0039 -0.0014
1266 | -0.016 -0.0816 -0.2328
1267 | 0.0207 0.0034 -0.0005
1268 | -0.0201 -0.0821 -0.2318
1269 | 0.0178 0.002 0.0006
1270 | -0.023 -0.0835 -0.2308
1271 | 0.0168 0 0.0014
1272 | -0.024 -0.0855 -0.2299
1273 | 0.018 -0.002 0.002
1274 | -0.0228 -0.0875 -0.2294
1275 | 0.0211 -0.0034 0.0019
1276 | -0.0197 -0.0889 -0.2294
1277 | 0.0252 -0.0039 0.0014
1278 | -0.0155 -0.0894 -0.23
1279 | 0.0293 -0.0034 0.0005
1280 | -0.0115 -0.0889 -0.2309
1281 | 0.0322 -0.002 -0.0006
1282 | -0.0086 -0.0875 -0.2319
1283 | 0.0332 0 -0.0014
1284 | -0.0076 -0.0855 -0.2328
1285 | }
1286 | NormalBinding PER_VERTEX
1287 | NormalArray 26
1288 | {
1289 | 0.984816 0 -0.173603
1290 | 0.984816 0 -0.173603
1291 | 0.64387 0.673769 -0.362583
1292 | 0.64387 0.673769 -0.362583
1293 | 0.23279 0.89816 -0.372984
1294 | 0.23279 0.89816 -0.372984
1295 | -0.0594 0.939701 -0.3368
1296 | -0.0594 0.939701 -0.3368
1297 | -0.346287 0.898167 -0.27089
1298 | -0.346287 0.898167 -0.27089
1299 | -0.729012 0.673811 -0.120502
1300 | -0.729012 0.673811 -0.120502
1301 | -0.984816 0 0.173603
1302 | -0.984816 0 0.173603
1303 | -0.64387 -0.673769 0.362583
1304 | -0.64387 -0.673769 0.362583
1305 | -0.23279 -0.89816 0.372984
1306 | -0.23279 -0.89816 0.372984
1307 | 0.0594 -0.939701 0.3368
1308 | 0.0594 -0.939701 0.3368
1309 | 0.346287 -0.898167 0.27089
1310 | 0.346287 -0.898167 0.27089
1311 | 0.729012 -0.673811 0.120502
1312 | 0.729012 -0.673811 0.120502
1313 | 0.984816 0 -0.173603
1314 | 0.984816 0 -0.173603
1315 | }
1316 | ColorBinding OVERALL
1317 | ColorArray Vec4Array 1
1318 | {
1319 | 0.8 0.8 0.8 1
1320 | }
1321 | }
1322 | Geometry {
1323 | DataVariance DYNAMIC
1324 | Use StateSet_3
1325 | useDisplayList FALSE
1326 | Primitives 1
1327 | {
1328 | DrawArrays TRIANGLE_STRIP 0 26
1329 | }
1330 | VertexArray 26
1331 | {
1332 | -0.0135 0.0833 -0.2301
1333 | -0.0135 -0.0833 -0.2301
1334 | -0.0139 0.0833 -0.2311
1335 | -0.0139 -0.0833 -0.2311
1336 | -0.0148 0.0833 -0.2317
1337 | -0.0148 -0.0833 -0.2317
1338 | -0.0159 0.0833 -0.2318
1339 | -0.0159 -0.0833 -0.2318
1340 | -0.0169 0.0833 -0.2314
1341 | -0.0169 -0.0833 -0.2314
1342 | -0.0175 0.0833 -0.2305
1343 | -0.0175 -0.0833 -0.2305
1344 | -0.0176 0.0833 -0.2294
1345 | -0.0176 -0.0833 -0.2294
1346 | -0.0171 0.0833 -0.2284
1347 | -0.0171 -0.0833 -0.2284
1348 | -0.0162 0.0833 -0.2278
1349 | -0.0162 -0.0833 -0.2278
1350 | -0.0152 0.0833 -0.2277
1351 | -0.0152 -0.0833 -0.2277
1352 | -0.0142 0.0833 -0.2282
1353 | -0.0142 -0.0833 -0.2282
1354 | -0.0136 0.0833 -0.2291
1355 | -0.0136 -0.0833 -0.2291
1356 | -0.0135 0.0833 -0.2301
1357 | -0.0135 -0.0833 -0.2301
1358 | }
1359 | NormalBinding PER_VERTEX
1360 | NormalArray 26
1361 | {
1362 | 0.984816 0 -0.173603
1363 | 0.984816 0 -0.173603
1364 | 0.76602 0 -0.642817
1365 | 0.76602 0 -0.642817
1366 | 0.342 0 -0.9397
1367 | 0.342 0 -0.9397
1368 | -0.173603 0 -0.984816
1369 | -0.173603 0 -0.984816
1370 | -0.642817 0 -0.76602
1371 | -0.642817 0 -0.76602
1372 | -0.9397 0 -0.342
1373 | -0.9397 0 -0.342
1374 | -0.984816 0 0.173603
1375 | -0.984816 0 0.173603
1376 | -0.76602 0 0.642817
1377 | -0.76602 0 0.642817
1378 | -0.342 0 0.9397
1379 | -0.342 0 0.9397
1380 | 0.173603 0 0.984816
1381 | 0.173603 0 0.984816
1382 | 0.642817 0 0.76602
1383 | 0.642817 0 0.76602
1384 | 0.9397 0 0.342
1385 | 0.9397 0 0.342
1386 | 0.984816 0 -0.173603
1387 | 0.984816 0 -0.173603
1388 | }
1389 | ColorBinding OVERALL
1390 | ColorArray Vec4Array 1
1391 | {
1392 | 0.8 0.8 0.8 1
1393 | }
1394 | }
1395 | Geometry {
1396 | DataVariance DYNAMIC
1397 | Use StateSet_3
1398 | useDisplayList FALSE
1399 | Primitives 1
1400 | {
1401 | DrawArrays TRIANGLE_STRIP 0 26
1402 | }
1403 | VertexArray 26
1404 | {
1405 | 0.0083 0 0.0167
1406 | 0.0083 0 0.225
1407 | 0.0072 -0.0021 0.0167
1408 | 0.0072 -0.0021 0.225
1409 | 0.0042 -0.0036 0.0167
1410 | 0.0042 -0.0036 0.225
1411 | 0 -0.0042 0.0167
1412 | 0 -0.0042 0.225
1413 | -0.0042 -0.0036 0.0167
1414 | -0.0042 -0.0036 0.225
1415 | -0.0072 -0.0021 0.0167
1416 | -0.0072 -0.0021 0.225
1417 | -0.0083 0 0.0167
1418 | -0.0083 0 0.225
1419 | -0.0072 0.0021 0.0167
1420 | -0.0072 0.0021 0.225
1421 | -0.0042 0.0036 0.0167
1422 | -0.0042 0.0036 0.225
1423 | 0 0.0042 0.0167
1424 | 0 0.0042 0.225
1425 | 0.0042 0.0036 0.0167
1426 | 0.0042 0.0036 0.225
1427 | 0.0072 0.0021 0.0167
1428 | 0.0072 0.0021 0.225
1429 | 0.0083 0 0.0167
1430 | 0.0083 0 0.225
1431 | }
1432 | NormalBinding PER_VERTEX
1433 | NormalArray 26
1434 | {
1435 | 1 0 0
1436 | 1 0 0
1437 | 0.697036 -0.717037 0
1438 | 0.697036 -0.717037 0
1439 | 0.294002 -0.955805 0
1440 | 0.294002 -0.955805 0
1441 | 0 -1 0
1442 | 0 -1 0
1443 | -0.294002 -0.955805 0
1444 | -0.294002 -0.955805 0
1445 | -0.697036 -0.717037 0
1446 | -0.697036 -0.717037 0
1447 | -1 0 0
1448 | -1 0 0
1449 | -0.697036 0.717037 0
1450 | -0.697036 0.717037 0
1451 | -0.294002 0.955805 0
1452 | -0.294002 0.955805 0
1453 | 0 1 0
1454 | 0 1 0
1455 | 0.294002 0.955805 0
1456 | 0.294002 0.955805 0
1457 | 0.697036 0.717037 0
1458 | 0.697036 0.717037 0
1459 | 1 0 0
1460 | 1 0 0
1461 | }
1462 | ColorBinding OVERALL
1463 | ColorArray Vec4Array 1
1464 | {
1465 | 0.8 0.8 0.8 1
1466 | }
1467 | }
1468 | Geometry {
1469 | DataVariance DYNAMIC
1470 | Use StateSet_3
1471 | useDisplayList FALSE
1472 | Primitives 1
1473 | {
1474 | DrawArrays TRIANGLE_STRIP 0 26
1475 | }
1476 | VertexArray 26
1477 | {
1478 | -0.1667 0 -0.0042
1479 | 0.4583 0 -0.0042
1480 | -0.1667 -0.0021 -0.0036
1481 | 0.4583 -0.0021 -0.0036
1482 | -0.1667 -0.0036 -0.0021
1483 | 0.4583 -0.0036 -0.0021
1484 | -0.1667 -0.0042 0
1485 | 0.4583 -0.0042 0
1486 | -0.1667 -0.0036 0.0021
1487 | 0.4583 -0.0036 0.0021
1488 | -0.1667 -0.0021 0.0036
1489 | 0.4583 -0.0021 0.0036
1490 | -0.1667 0 0.0042
1491 | 0.4583 0 0.0042
1492 | -0.1667 0.0021 0.0036
1493 | 0.4583 0.0021 0.0036
1494 | -0.1667 0.0036 0.0021
1495 | 0.4583 0.0036 0.0021
1496 | -0.1667 0.0042 0
1497 | 0.4583 0.0042 0
1498 | -0.1667 0.0036 -0.0021
1499 | 0.4583 0.0036 -0.0021
1500 | -0.1667 0.0021 -0.0036
1501 | 0.4583 0.0021 -0.0036
1502 | -0.1667 0 -0.0042
1503 | 0.4583 0 -0.0042
1504 | }
1505 | NormalBinding PER_VERTEX
1506 | NormalArray 26
1507 | {
1508 | 0 0 -1
1509 | 0 0 -1
1510 | 0 -0.500011 -0.866019
1511 | 0 -0.500011 -0.866019
1512 | 0 -0.866019 -0.500011
1513 | 0 -0.866019 -0.500011
1514 | 0 -1 0
1515 | 0 -1 0
1516 | 0 -0.866019 0.500011
1517 | 0 -0.866019 0.500011
1518 | 0 -0.500011 0.866019
1519 | 0 -0.500011 0.866019
1520 | 0 0 1
1521 | 0 0 1
1522 | 0 0.500011 0.866019
1523 | 0 0.500011 0.866019
1524 | 0 0.866019 0.500011
1525 | 0 0.866019 0.500011
1526 | 0 1 0
1527 | 0 1 0
1528 | 0 0.866019 -0.500011
1529 | 0 0.866019 -0.500011
1530 | 0 0.500011 -0.866019
1531 | 0 0.500011 -0.866019
1532 | 0 0 -1
1533 | 0 0 -1
1534 | }
1535 | ColorBinding OVERALL
1536 | ColorArray Vec4Array 1
1537 | {
1538 | 0.8 0.8 0.8 1
1539 | }
1540 | }
1541 | }
1542 |
--------------------------------------------------------------------------------
/Data/Models/pipe.osg:
--------------------------------------------------------------------------------
1 | Group {
2 | DataVariance STATIC
3 | name "Scene Root"
4 | nodeMask 0xffffffff
5 | cullingActive TRUE
6 | StateSet {
7 | rendering_hint DEFAULT_BIN
8 | renderBinMode INHERIT
9 | GL_LIGHTING ON
10 | GL_NORMALIZE ON
11 | }
12 | num_children 1
13 | MatrixTransform {
14 | DataVariance STATIC
15 | name "Line001"
16 | nodeMask 0xffffffff
17 | cullingActive TRUE
18 | referenceFrame RELATIVE
19 | Matrix {
20 | 1 0 0 0
21 | 0 -1.62921e-007 1 0
22 | 0 -1 -1.62921e-007 0
23 | 53.3333 -3.49691e-006 80 1
24 | }
25 | num_children 1
26 | Geode {
27 | UniqueID Geode_0
28 | DataVariance STATIC
29 | name "Line001-GEODE"
30 | nodeMask 0xffffffff
31 | cullingActive TRUE
32 | num_drawables 1
33 | Geometry {
34 | StateSet {
35 | rendering_hint DEFAULT_BIN
36 | renderBinMode INHERIT
37 | }
38 | useDisplayList TRUE
39 | useVertexBufferObjects FALSE
40 | PrimitiveSets 1
41 | {
42 | DrawArrays TRIANGLES 0 144
43 | }
44 | VertexArray Vec3Array 144
45 | {
46 | -48.1372 34.8038 3
47 | -48.1372 -80 3
48 | -47.3333 -80 0
49 | -47.3333 -80 0
50 | -47.3333 34 2.1727e-007
51 | -48.1372 34.8038 3
52 | -50.3333 37 5.19615
53 | -50.3333 -80 5.19615
54 | -48.1372 -80 3
55 | -48.1372 -80 3
56 | -48.1372 34.8038 3
57 | -50.3333 37 5.19615
58 | -53.3333 40 6
59 | -53.3333 -80 6
60 | -50.3333 -80 5.19615
61 | -50.3333 -80 5.19615
62 | -50.3333 37 5.19615
63 | -53.3333 40 6
64 | -56.3333 43 5.19615
65 | -56.3333 -80 5.19615
66 | -53.3333 -80 6
67 | -53.3333 -80 6
68 | -53.3333 40 6
69 | -56.3333 43 5.19615
70 | -58.5295 45.1962 3
71 | -58.5295 -80 3
72 | -56.3333 -80 5.19615
73 | -56.3333 -80 5.19615
74 | -56.3333 43 5.19615
75 | -58.5295 45.1962 3
76 | -59.3333 46 -7.41807e-007
77 | -59.3333 -80 -5.24537e-007
78 | -58.5295 -80 3
79 | -58.5295 -80 3
80 | -58.5295 45.1962 3
81 | -59.3333 46 -7.41807e-007
82 | -58.5295 45.1962 -3
83 | -58.5295 -80 -3
84 | -59.3333 -80 -5.24537e-007
85 | -59.3333 -80 -5.24537e-007
86 | -59.3333 46 -7.41807e-007
87 | -58.5295 45.1962 -3
88 | -56.3333 43 -5.19615
89 | -56.3333 -80 -5.19615
90 | -58.5295 -80 -3
91 | -58.5295 -80 -3
92 | -58.5295 45.1962 -3
93 | -56.3333 43 -5.19615
94 | -53.3333 40 -6
95 | -53.3333 -80 -6
96 | -56.3333 -80 -5.19615
97 | -56.3333 -80 -5.19615
98 | -56.3333 43 -5.19615
99 | -53.3333 40 -6
100 | -50.3333 37 -5.19615
101 | -50.3333 -80 -5.19615
102 | -53.3333 -80 -6
103 | -53.3333 -80 -6
104 | -53.3333 40 -6
105 | -50.3333 37 -5.19615
106 | -48.1372 34.8038 -3
107 | -48.1372 -80 -3
108 | -50.3333 -80 -5.19615
109 | -50.3333 -80 -5.19615
110 | -50.3333 37 -5.19615
111 | -48.1372 34.8038 -3
112 | -47.3333 34 2.1727e-007
113 | -47.3333 -80 0
114 | -48.1372 -80 -3
115 | -48.1372 -80 -3
116 | -48.1372 34.8038 -3
117 | -47.3333 34 2.1727e-007
118 | 106.667 34.8038 3
119 | -48.1372 34.8038 3
120 | -47.3333 34 2.1727e-007
121 | -47.3333 34 2.1727e-007
122 | 106.667 34 0
123 | 106.667 34.8038 3
124 | 106.667 37 5.19615
125 | -50.3333 37 5.19615
126 | -48.1372 34.8038 3
127 | -48.1372 34.8038 3
128 | 106.667 34.8038 3
129 | 106.667 37 5.19615
130 | 106.667 40 6
131 | -53.3333 40 6
132 | -50.3333 37 5.19615
133 | -50.3333 37 5.19615
134 | 106.667 37 5.19615
135 | 106.667 40 6
136 | 106.667 43 5.19615
137 | -56.3333 43 5.19615
138 | -53.3333 40 6
139 | -53.3333 40 6
140 | 106.667 40 6
141 | 106.667 43 5.19615
142 | 106.667 45.1962 3
143 | -58.5295 45.1962 3
144 | -56.3333 43 5.19615
145 | -56.3333 43 5.19615
146 | 106.667 43 5.19615
147 | 106.667 45.1962 3
148 | 106.667 46 -5.24537e-007
149 | -59.3333 46 -7.41807e-007
150 | -58.5295 45.1962 3
151 | -58.5295 45.1962 3
152 | 106.667 45.1962 3
153 | 106.667 46 -5.24537e-007
154 | 106.667 45.1962 -3
155 | -58.5295 45.1962 -3
156 | -59.3333 46 -7.41807e-007
157 | -59.3333 46 -7.41807e-007
158 | 106.667 46 -5.24537e-007
159 | 106.667 45.1962 -3
160 | 106.667 43 -5.19615
161 | -56.3333 43 -5.19615
162 | -58.5295 45.1962 -3
163 | -58.5295 45.1962 -3
164 | 106.667 45.1962 -3
165 | 106.667 43 -5.19615
166 | 106.667 40 -6
167 | -53.3333 40 -6
168 | -56.3333 43 -5.19615
169 | -56.3333 43 -5.19615
170 | 106.667 43 -5.19615
171 | 106.667 40 -6
172 | 106.667 37 -5.19615
173 | -50.3333 37 -5.19615
174 | -53.3333 40 -6
175 | -53.3333 40 -6
176 | 106.667 40 -6
177 | 106.667 37 -5.19615
178 | 106.667 34.8038 -3
179 | -48.1372 34.8038 -3
180 | -50.3333 37 -5.19615
181 | -50.3333 37 -5.19615
182 | 106.667 37 -5.19615
183 | 106.667 34.8038 -3
184 | 106.667 34 0
185 | -47.3333 34 2.1727e-007
186 | -48.1372 34.8038 -3
187 | -48.1372 34.8038 -3
188 | 106.667 34.8038 -3
189 | 106.667 34 0
190 | }
191 | NormalBinding PER_VERTEX
192 | NormalArray Vec3Array 144
193 | {
194 | 0.830976 -1.13849e-009 0.556309
195 | 0.866025 -2.91074e-010 0.5
196 | 1 -2.24978e-011 -5.89261e-008
197 | 1 -2.24978e-011 -5.89261e-008
198 | 1 2.25504e-011 -8.45742e-008
199 | 0.830976 -1.13849e-009 0.556309
200 | 0.400014 -4.25948e-010 0.916509
201 | 0.5 0 0.866025
202 | 0.866025 -2.91074e-010 0.5
203 | 0.866025 -2.91074e-010 0.5
204 | 0.830976 -1.13849e-009 0.556309
205 | 0.400014 -4.25948e-010 0.916509
206 | -0.129908 0 0.991526
207 | 1.24911e-007 0 1
208 | 0.5 0 0.866025
209 | 0.5 0 0.866025
210 | 0.400014 -4.25948e-010 0.916509
211 | -0.129908 0 0.991526
212 | -0.602793 0 0.797898
213 | -0.5 6.86036e-010 0.866025
214 | 1.24911e-007 0 1
215 | 1.24911e-007 0 1
216 | -0.129908 0 0.991526
217 | -0.602793 0 0.797898
218 | -0.904734 3.46114e-010 0.425977
219 | -0.866025 9.28444e-010 0.5
220 | -0.5 6.86036e-010 0.866025
221 | -0.5 6.86036e-010 0.866025
222 | -0.602793 0 0.797898
223 | -0.904734 3.46114e-010 0.425977
224 | -1 2.36631e-011 -2.57595e-007
225 | -1 -2.37334e-011 1.98569e-007
226 | -0.866025 9.28444e-010 0.5
227 | -0.866025 9.28444e-010 0.5
228 | -0.904734 3.46114e-010 0.425977
229 | -1 2.36631e-011 -2.57595e-007
230 | -0.904734 -7.80101e-010 -0.425977
231 | -0.866025 -2.66339e-010 -0.5
232 | -1 -2.37334e-011 1.98569e-007
233 | -1 -2.37334e-011 1.98569e-007
234 | -1 2.36631e-011 -2.57595e-007
235 | -0.904734 -7.80101e-010 -0.425977
236 | -0.602793 -1.00025e-009 -0.797898
237 | -0.5 0 -0.866026
238 | -0.866025 -2.66339e-010 -0.5
239 | -0.866025 -2.66339e-010 -0.5
240 | -0.904734 -7.80101e-010 -0.425977
241 | -0.602793 -1.00025e-009 -0.797898
242 | -0.129908 0 -0.991526
243 | 3.83633e-009 0 -1
244 | -0.5 0 -0.866026
245 | -0.5 0 -0.866026
246 | -0.602793 -1.00025e-009 -0.797898
247 | -0.129908 0 -0.991526
248 | 0.400014 0 -0.916509
249 | 0.5 7.47053e-010 -0.866025
250 | 3.83633e-009 0 -1
251 | 3.83633e-009 0 -1
252 | -0.129908 0 -0.991526
253 | 0.400014 0 -0.916509
254 | 0.830976 2.20497e-010 -0.556309
255 | 0.866025 1.01588e-009 -0.5
256 | 0.5 7.47053e-010 -0.866025
257 | 0.5 7.47053e-010 -0.866025
258 | 0.400014 0 -0.916509
259 | 0.830976 2.20497e-010 -0.556309
260 | 1 2.25504e-011 -8.45742e-008
261 | 1 -2.24978e-011 -5.89261e-008
262 | 0.866025 1.01588e-009 -0.5
263 | 0.866025 1.01588e-009 -0.5
264 | 0.830976 2.20497e-010 -0.556309
265 | 1 2.25504e-011 -8.45742e-008
266 | 7.52968e-010 -0.866025 0.5
267 | 1.61278e-010 -0.830976 0.556309
268 | 1.71298e-011 -1 -5.92019e-008
269 | 1.71298e-011 -1 -5.92019e-008
270 | -1.71002e-011 -1 -7.85681e-008
271 | 7.52968e-010 -0.866025 0.5
272 | 5.56529e-010 -0.5 0.866025
273 | 0 -0.400014 0.916509
274 | 1.61278e-010 -0.830976 0.556309
275 | 1.61278e-010 -0.830976 0.556309
276 | 7.52968e-010 -0.866025 0.5
277 | 5.56529e-010 -0.5 0.866025
278 | 0 7.85681e-008 1
279 | 0 0.129908 0.991526
280 | 0 -0.400014 0.916509
281 | 0 -0.400014 0.916509
282 | 5.56529e-010 -0.5 0.866025
283 | 0 7.85681e-008 1
284 | 0 0.5 0.866025
285 | -7.60227e-010 0.602793 0.797898
286 | 0 0.129908 0.991526
287 | 0 0.129908 0.991526
288 | 0 7.85681e-008 1
289 | 0 0.5 0.866025
290 | -1.99766e-010 0.866025 0.5
291 | -5.91483e-010 0.904734 0.425977
292 | -7.60227e-010 0.602793 0.797898
293 | -7.60227e-010 0.602793 0.797898
294 | 0 0.5 0.866025
295 | -1.99766e-010 0.866025 0.5
296 | -1.77895e-011 1 2.45525e-007
297 | 1.77495e-011 1 -3.13028e-007
298 | -5.91483e-010 0.904734 0.425977
299 | -5.91483e-010 0.904734 0.425977
300 | -1.99766e-010 0.866025 0.5
301 | -1.77895e-011 1 2.45525e-007
302 | 7.03833e-010 0.866025 -0.5
303 | 2.60031e-010 0.904734 -0.425977
304 | 1.77495e-011 1 -3.13028e-007
305 | 1.77495e-011 1 -3.13028e-007
306 | -1.77895e-011 1 2.45525e-007
307 | 7.03833e-010 0.866025 -0.5
308 | 5.21943e-010 0.5 -0.866025
309 | 0 0.602793 -0.797898
310 | 2.60031e-010 0.904734 -0.425977
311 | 2.60031e-010 0.904734 -0.425977
312 | 7.03833e-010 0.866025 -0.5
313 | 5.21943e-010 0.5 -0.866025
314 | 0 0 -1
315 | 0 0.129908 -0.991526
316 | 0 0.602793 -0.797898
317 | 0 0.602793 -0.797898
318 | 5.21943e-010 0.5 -0.866025
319 | 0 0 -1
320 | 0 -0.5 -0.866025
321 | -3.18185e-010 -0.400014 -0.916509
322 | 0 0.129908 -0.991526
323 | 0 0.129908 -0.991526
324 | 0 0 -1
325 | 0 -0.5 -0.866025
326 | -2.13438e-010 -0.866025 -0.5
327 | -8.43989e-010 -0.830976 -0.556309
328 | -3.18185e-010 -0.400014 -0.916509
329 | -3.18185e-010 -0.400014 -0.916509
330 | 0 -0.5 -0.866025
331 | -2.13438e-010 -0.866025 -0.5
332 | -1.71002e-011 -1 -7.85681e-008
333 | 1.71298e-011 -1 -5.92019e-008
334 | -8.43989e-010 -0.830976 -0.556309
335 | -8.43989e-010 -0.830976 -0.556309
336 | -2.13438e-010 -0.866025 -0.5
337 | -1.71002e-011 -1 -7.85681e-008
338 | }
339 | ColorBinding OVERALL
340 | ColorArray Vec4Array 1
341 | {
342 | 0.882353 0.345098 0.780392 1
343 | }
344 | }
345 | }
346 | }
347 | }
348 |
--------------------------------------------------------------------------------
/Data/Shaders/texRolling.frag:
--------------------------------------------------------------------------------
1 |
2 | varying vec2 Texcoord;
3 | uniform sampler2D sampler0;
4 | uniform sampler2D sampler1;
5 | uniform float osg_SimulationTime;
6 |
7 | void main(void)
8 | {
9 | vec4 color = texture2D(sampler0, Texcoord);
10 | color.a = 0.5;
11 | Texcoord.x -= osg_SimulationTime * 0.5;
12 | vec4 color1 = texture2D(sampler1, Texcoord);
13 | gl_FragColor = mix(color, color1, 0.5);
14 | }
15 |
--------------------------------------------------------------------------------
/Data/Shaders/texRolling.vert:
--------------------------------------------------------------------------------
1 | varying vec2 Texcoord;
2 |
3 | void main(void)
4 | {
5 | //gl_Position = ftransform();
6 | gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
7 | Texcoord = gl_MultiTexCoord0.xy;
8 | }
9 |
--------------------------------------------------------------------------------
/Data/blueStar.earth:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/Data/config/config.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/config/config.ini
--------------------------------------------------------------------------------
/Data/path.json:
--------------------------------------------------------------------------------
1 | {
2 | "path":[
3 | [
4 | 116.316527845542,
5 | 39.9743378301849,
6 | 80.0
7 | ],
8 | [
9 | 116.316527845542,
10 | 39.9743378301849,
11 | 80.0
12 | ],
13 | [
14 | 116.316527845542,
15 | 39.9743378301849,
16 | 80.0
17 | ],
18 | [
19 | 116.316527845542,
20 | 39.9743378301849,
21 | 80.0
22 | ],
23 | [
24 | 116.316527845542,
25 | 39.9743378301849,
26 | 80.0
27 | ],
28 | [
29 | 116.31652774211,
30 | 39.974341983376,
31 | 80.0
32 | ],
33 | [
34 | 116.316527649701,
35 | 39.9743456939694,
36 | 80.0
37 | ],
38 | [
39 | 116.316527494527,
40 | 39.9743519247924,
41 | 80.0
42 | ],
43 | [
44 | 116.316527438686,
45 | 39.9743541670147,
46 | 80.0
47 | ],
48 | [
49 | 116.316527406074,
50 | 39.9743554765219,
51 | 80.0
52 | ],
53 | [
54 | 116.316527406074,
55 | 39.9743554765219,
56 | 80.0
57 | ],
58 | [
59 | 116.316527359587,
60 | 39.9743573431404,
61 | 80.0
62 | ],
63 | [
64 | 116.316494852562,
65 | 39.9743333192018,
66 | 80.0
67 | ],
68 | [
69 | 116.316495208628,
70 | 39.9743333321017,
71 | 80.0
72 | ],
73 | [
74 | 116.316494852562,
75 | 39.9743333192018,
76 | 80.0
77 | ],
78 | [
79 | 116.316494852562,
80 | 39.9743333192018,
81 | 80.0
82 | ],
83 | [
84 | 116.316494852562,
85 | 39.9743333192018,
86 | 80.0
87 | ],
88 | [
89 | 116.316494913056,
90 | 39.9743333213934,
91 | 80.0
92 | ],
93 | [
94 | 116.316494913056,
95 | 39.9743333213934,
96 | 80.0
97 | ],
98 | [
99 | 116.316494682721,
100 | 39.9743216341589,
101 | 80.0
102 | ],
103 | [
104 | 116.316494726472,
105 | 39.9743115328391,
106 | 80.0
107 | ],
108 | [
109 | 116.316527773231,
110 | 39.9742893491044,
111 | 80.0
112 | ],
113 | [
114 | 116.316533847572,
115 | 39.9742894095823,
116 | 80.0
117 | ],
118 | [
119 | 116.316533847572,
120 | 39.9742894095823,
121 | 80.0
122 | ],
123 | [
124 | 116.316556439379,
125 | 39.9742896345102,
126 | 80.0
127 | ],
128 | [
129 | 116.316592413023,
130 | 39.9742899926608,
131 | 80.0
132 | ],
133 | [
134 | 116.316602045066,
135 | 39.9742900885547,
136 | 80.0
137 | ],
138 | [
139 | 116.316613800658,
140 | 39.974290205589,
141 | 80.0
142 | ],
143 | [
144 | 116.316527845542,
145 | 39.9743378301849,
146 | 80.0
147 | ],
148 | [
149 | 116.316614032124,
150 | 39.9742875459091,
151 | 80.0
152 | ],
153 | [
154 | 116.316614087812,
155 | 39.9742829052421,
156 | 80.0
157 | ],
158 | [
159 | 116.316614202852,
160 | 39.9742733185745,
161 | 80.0
162 | ],
163 | [
164 | 116.316614270479,
165 | 39.9742676830129,
166 | 80.0
167 | ],
168 | [
169 | 116.316614303369,
170 | 39.9742649422267,
171 | 80.0
172 | ],
173 | [
174 | 116.316614303369,
175 | 39.9742649422267,
176 | 80.0
177 | ],
178 | [
179 | 116.316614447219,
180 | 39.9742275480451,
181 | 80.0
182 | ],
183 | [
184 | 116.316614355735,
185 | 39.9742164326443,
186 | 80.0
187 | ],
188 | [
189 | 116.316614204231,
190 | 39.9741980249585,
191 | 80.0
192 | ],
193 | [
194 | 116.316614294232,
195 | 39.9742089600952,
196 | 80.0
197 | ],
198 | [
199 | 116.316614535513,
200 | 39.9742455968532,
201 | 80.0
202 | ],
203 | [
204 | 116.316614332078,
205 | 39.9742625497701,
206 | 80.0
207 | ],
208 | [
209 | 116.316572752534,
210 | 39.974289796924,
211 | 80.0
212 | ],
213 | [
214 | 116.316563010787,
215 | 39.9742896999354,
216 | 80.0
217 | ],
218 | [
219 | 116.316518862729,
220 | 39.9742529586133,
221 | 80.0
222 | ],
223 | [
224 | 116.316561228602,
225 | 39.9741965117347,
226 | 80.0
227 | ],
228 | [
229 | 116.316561650623,
230 | 39.9741965105388,
231 | 80.0
232 | ],
233 | [
234 | 116.316563071302,
235 | 39.9741965065127,
236 | 80.0
237 | ],
238 | [
239 | 116.316546574056,
240 | 39.9741965532635,
241 | 80.0
242 | ],
243 | [
244 | 116.316536761362,
245 | 39.9741965810701,
246 | 80.0
247 | ],
248 | [
249 | 116.316526782307,
250 | 39.9741966093473,
251 | 80.0
252 | ],
253 | [
254 | 116.316519931315,
255 | 39.9741966874799,
256 | 80.0
257 | ],
258 | [
259 | 116.316519933995,
260 | 39.9741966287526,
261 | 80.0
262 | ],
263 | [
264 | 116.316519927587,
265 | 39.9741967691676,
266 | 80.0
267 | ],
268 | [
269 | 116.316519040025,
270 | 39.9742175870451,
271 | 80.0
272 | ],
273 | [
274 | 116.316518825254,
275 | 39.9742587544298,
276 | 80.0
277 | ],
278 | [
279 | 116.316518698712,
280 | 39.9742723249076,
281 | 80.0
282 | ],
283 | [
284 | 116.316512905682,
285 | 39.9742893547455,
286 | 80.0
287 | ],
288 | [
289 | 116.31652110606,
290 | 39.9742892827237,
291 | 80.0
292 | ],
293 | [
294 | 116.316530281567,
295 | 39.9742893740782,
296 | 80.0
297 | ],
298 | [
299 | 116.31654173748,
300 | 39.9742894881361,
301 | 80.0
302 | ],
303 | [
304 | 116.316546190224,
305 | 39.9742895324684,
306 | 80.0
307 | ],
308 | [
309 | 116.316552573465,
310 | 39.9742895960208,
311 | 80.0
312 | ],
313 | [
314 | 116.316552573465,
315 | 39.9742895960208,
316 | 80.0
317 | ],
318 | [
319 | 116.31652320227,
320 | 39.9742893035944,
321 | 80.0
322 | ],
323 | [
324 | 116.316494662523,
325 | 39.9743146290018,
326 | 80.0
327 | ],
328 | [
329 | 116.316494852562,
330 | 39.9743333192018,
331 | 80.0
332 | ],
333 | [
334 | 116.316495013421,
335 | 39.9743333250296,
336 | 80.0
337 | ],
338 | [
339 | 116.316495013421,
340 | 39.9743333250296,
341 | 80.0
342 | ],
343 | [
344 | 116.31649492356,
345 | 39.974333321774,
346 | 80.0
347 | ],
348 | [
349 | 116.316527111517,
350 | 39.9743661712308,
351 | 80.0
352 | ],
353 | [
354 | 116.316527036641,
355 | 39.974368746945,
356 | 80.0
357 | ],
358 | [
359 | 116.31652698465,
360 | 39.9743705354566,
361 | 80.0
362 | ],
363 | [
364 | 116.316527135947,
365 | 39.9743653308288,
366 | 80.0
367 | ],
368 | [
369 | 116.316527266422,
370 | 39.9743608424899,
371 | 80.0
372 | ],
373 | [
374 | 116.31652734215,
375 | 39.9743580432924,
376 | 80.0
377 | ],
378 | [
379 | 116.316551820683,
380 | 39.9743346109481,
381 | 80.0
382 | ],
383 | [
384 | 116.316553624348,
385 | 39.9743346352128,
386 | 80.0
387 | ],
388 | [
389 | 116.316553624348,
390 | 39.9743346352128,
391 | 80.0
392 | ],
393 | [
394 | 116.316527349212,
395 | 39.9743577597357,
396 | 80.0
397 | ],
398 | [
399 | 116.31652730841,
400 | 39.9743593980944,
401 | 80.0
402 | ],
403 | [
404 | 116.316527183076,
405 | 39.9743637095738,
406 | 80.0
407 | ]
408 | ]
409 | }
410 |
--------------------------------------------------------------------------------
/Data/skin/ModeEdit.qss:
--------------------------------------------------------------------------------
1 | /*程序标题背景图*/
2 | QWidget#widgetTitle{
3 | border-image: url(./skin/Titles/banner.png);
4 | }
5 | /*标题icon*/
6 | #labelTitleIcon{
7 | padding-bottom:4px;
8 | border-image: url(./skin/melogo.png);
9 | }
10 |
11 | #widgetSpacing{
12 | border-image: url(./skin/Titles/spacing.png);
13 | }
14 |
15 | /*退出按钮*/
16 | #pushButtonExit{
17 | border-image: url(./skin/Titles/exit_0.png);
18 | }
19 | #pushButtonExit:hover{
20 | border-image: url(./skin/Titles/exit_1.png);
21 | }
22 |
23 | #pushButtonExit:pressed{
24 | border-image: url(./skin/Titles/exit_0.png);
25 | }
26 |
27 | /*标题菜单栏*/
28 | QWidget#AppHeadTitle{
29 | background:transparent;
30 | }
31 |
32 | #pushButtonDocMan,#pushButtonDecisiondMan,#pushButtonFightLayout,#pushButtonDatabaseCenter,#pushButtonAccidentCase{
33 | border:0px;
34 | background:transparent;
35 | min-width:264px;
36 | min-height:40px;
37 | color: rgb(152, 152, 152);
38 | font: 18pt "微软雅黑";
39 | }
40 | #pushButtonDocMan:checked,#pushButtonDecisiondMan:checked,#pushButtonFightLayout:checked,#pushButtonDatabaseCenter:checked,#pushButtonAccidentCase:checked{
41 | color: rgb(255, 255, 255);
42 | border-image: url(./skin/Titles/tab_1.png);
43 | }
44 | #pushButtonDocMan:hover,#pushButtonDecisiondMan:hover,#pushButtonFightLayout:hover,#pushButtonDatabaseCenter:hover,#pushButtonAccidentCase:hover{
45 | color: rgb(255, 255, 255);
46 | border-image: url(./skin/Titles/tab_1.png);
47 | }
48 |
--------------------------------------------------------------------------------
/Data/skin/Titles/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/banner.png
--------------------------------------------------------------------------------
/Data/skin/Titles/exit_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/exit_0.png
--------------------------------------------------------------------------------
/Data/skin/Titles/exit_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/exit_1.png
--------------------------------------------------------------------------------
/Data/skin/Titles/menubackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/menubackground.png
--------------------------------------------------------------------------------
/Data/skin/Titles/spacing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/spacing.png
--------------------------------------------------------------------------------
/Data/skin/Titles/tab_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/Titles/tab_1.png
--------------------------------------------------------------------------------
/Data/skin/melogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/Data/skin/melogo.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MEEngine
2 | 基础的三维模块,易用的基础工具,以及天马行空想法
3 |
4 |
5 | ##管线效果图
6 | 
7 |
--------------------------------------------------------------------------------
/bin/RigelCored.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelCored.ilk
--------------------------------------------------------------------------------
/bin/RigelCored.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelCored.pdb
--------------------------------------------------------------------------------
/bin/RigelMathd.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelMathd.ilk
--------------------------------------------------------------------------------
/bin/RigelMathd.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelMathd.pdb
--------------------------------------------------------------------------------
/bin/RigelMessaged.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelMessaged.ilk
--------------------------------------------------------------------------------
/bin/RigelMessaged.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelMessaged.pdb
--------------------------------------------------------------------------------
/bin/RigelModeld.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelModeld.ilk
--------------------------------------------------------------------------------
/bin/RigelModeld.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelModeld.pdb
--------------------------------------------------------------------------------
/bin/RigelQtd.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelQtd.ilk
--------------------------------------------------------------------------------
/bin/RigelQtd.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/RigelQtd.pdb
--------------------------------------------------------------------------------
/bin/Rigeld.ilk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/Rigeld.ilk
--------------------------------------------------------------------------------
/bin/Rigeld.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/bin/Rigeld.pdb
--------------------------------------------------------------------------------
/lib/RigelCored.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/lib/RigelCored.exp
--------------------------------------------------------------------------------
/lib/RigelMathd.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/lib/RigelMathd.exp
--------------------------------------------------------------------------------
/lib/RigelModeld.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/lib/RigelModeld.exp
--------------------------------------------------------------------------------
/lib/RigelQtd.exp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/lib/RigelQtd.exp
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # 添加子项目
2 |
3 | #基础层
4 | #add_subdirectory(0-Base)
5 | #抽象模型层
6 | #add_subdirectory(1-Model)
7 | #功能层
8 | #add_subdirectory(2-Funcation)
9 | #逻辑层
10 | #add_subdirectory(3-Logic)
11 | #应用
12 | #add_subdirectory(Application)
13 |
14 |
15 | add_subdirectory(RigelMath)
16 | add_subdirectory(RigelCore)
17 | add_subdirectory(RigelQt)
18 | add_subdirectory(RigelModel)
19 | add_subdirectory(RigelMessage)
20 | add_subdirectory(Rigel)
21 |
--------------------------------------------------------------------------------
/src/MEPlotting/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 | set(TargetName MEPlotting)
3 | string(TOUPPER ${TargetName} TargetNameUP)
4 |
5 | # Find includes in corresponding build directories
6 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
7 |
8 | set(headers
9 | Export.h
10 | PosPickHandler.h
11 | )
12 |
13 | set(sources
14 | InputLib.cpp
15 | PosPickHandler.cpp
16 | )
17 |
18 | #添加测量模块
19 | set(Measure
20 | Measure/MeasureTool.h
21 | Measure/MeasureTool.cpp
22 | Measure/MeasureBase.h
23 | Measure/MeasureBase.cpp
24 | Measure/MeasureLength.h
25 | Measure/MeasureLength.cpp
26 | )
27 | #添加符号化模块
28 | set(Symbols
29 | Symbols/SymbolTool.h
30 | Symbols/SymbolTool.cpp
31 | )
32 |
33 | #添加标绘模块
34 | set(Plotting
35 | Plotting/PlottingTool.h
36 | Plotting/PlottingTool.cpp
37 | )
38 |
39 | # add definitions,unicode and export
40 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP}_EXPORTS)
41 |
42 | # Add dependncies
43 | #add_dependencies(${TargetName} MECore)
44 |
45 | # Set porject filiter
46 | source_group("Header Files" FILES ${headers})
47 | source_group("Measure" FILES ${Measure} )
48 | source_group("Symbols" FILES ${Symbols} )
49 | source_group("Plotting" FILES ${Plotting} )
50 |
51 | # Tell CMake to create the helloworld executable
52 | add_library(${TargetName} SHARED ${sources} ${headers} ${Measure} ${Symbols}
53 | ${Plotting} )
54 |
55 | target_link_libraries(${TargetName} MECore)
56 |
--------------------------------------------------------------------------------
/src/MEPlotting/Export.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Export.h
--------------------------------------------------------------------------------
/src/MEPlotting/InputLib.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/InputLib.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureAngle.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Measure/MeasureAngle.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureAngle.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASUREANGLE_H
2 | #define MEASUREANGLE_H
3 | #include
4 | #include
5 |
6 | class MeasureAngle : public MeasureBase
7 | {
8 | public:
9 | MeasureAngle(void);
10 | ~MeasureAngle(void);
11 |
12 | void clickEvent(osg::Vec3 pos);
13 |
14 | void moveEvent(osg::Vec3 pos);
15 |
16 | float calcResult();
17 |
18 | void endMeasure();
19 | private:
20 | void init();
21 |
22 | private:
23 | osg::ref_ptr m_pMainLine;
24 | };
25 |
26 | #endif//MEASUREANGLE_H
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureArea.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Measure/MeasureArea.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureArea.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASUREAREA_H
2 | #define MEASUREAREA_H
3 | #include
4 | #include
5 | #include
6 |
7 | class MeasureArea : public MeasureBase
8 | {
9 | public:
10 | MeasureArea(void);
11 | ~MeasureArea(void);
12 |
13 | void clickEvent(osg::Vec3 pos);
14 |
15 | void moveEvent(osg::Vec3 pos);
16 |
17 | float calcResult();
18 |
19 | void endMeasure();
20 | private:
21 | void init();
22 |
23 | private:
24 | osg::ref_ptr m_pLine;
25 | osg::ref_ptr m_pPolygon;
26 | };
27 |
28 |
29 | #endif//MEASUREAREA_H
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureAzimuth.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Measure/MeasureAzimuth.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureAzimuth.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | class MeasureAzimuth : public MeasureBase
5 | {
6 | public:
7 | MeasureAzimuth(void);
8 | ~MeasureAzimuth(void);
9 |
10 | void clickEvent(osg::Vec3 pos);
11 |
12 | void moveEvent(osg::Vec3 pos);
13 |
14 | float calcResult();
15 |
16 | void endMeasure();
17 | private:
18 | void init();
19 |
20 | private:
21 | osg::ref_ptr m_pNText;
22 | osg::ref_ptr m_pMainLine;
23 | };
24 |
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureBase.cpp:
--------------------------------------------------------------------------------
1 | #include "MeasureBase.h"
2 |
3 | MeasureBase::MeasureBase(void)
4 | {
5 | m_numVertexs = 0;
6 | m_isStart = false;
7 | m_isEnd = false;
8 | m_strImagePath = "";
9 | m_pGeomGeode = NULL;
10 | }
11 |
12 | MeasureBase::~MeasureBase(void)
13 | {
14 | }
15 |
16 | void MeasureBase::startMeasure()
17 | {
18 | init();
19 | }
20 |
21 | void MeasureBase::endMeasure()
22 | {
23 | m_isStart = false;
24 | m_isEnd = true;
25 | }
26 |
27 | void MeasureBase::clearTheMeasure(osg::Node* node)
28 | {
29 |
30 | }
31 |
32 | void MeasureBase::setImagePath(std::string &imagePath)
33 | {
34 | m_strImagePath = imagePath;
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureBase.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASUREBASE_H
2 | #define MEASUREBASE_H
3 | #include "Export.h"
4 | #include
5 | #include
6 | #include
7 |
8 | const std::string CLOSEBUTTON = "CloseButton";
9 |
10 | class MEPLOTTING_EXPORT MeasureBase : public osg::Group
11 | {
12 | public:
13 | MeasureBase(void);
14 |
15 | virtual ~MeasureBase(void);
16 |
17 | virtual void clickEvent(osg::Vec3 pos){}
18 |
19 | virtual void moveEvent(osg::Vec3 pos){}
20 |
21 | virtual float calcResult(){return 0;}
22 |
23 | virtual void startMeasure();
24 |
25 | virtual void endMeasure();
26 |
27 | void clearTheMeasure(osg::Node* node);
28 |
29 | bool isStart(){return m_isStart;}
30 |
31 | bool isEnd(){return m_isEnd;}
32 |
33 | void setImagePath(std::string &imagePath);
34 | protected:
35 | virtual void init(){};
36 | protected:
37 | size_t m_numVertexs;
38 | bool m_isStart;
39 | bool m_isEnd;
40 | std::string m_strImagePath;
41 | osg::ref_ptr m_pGeomGeode;
42 | };
43 |
44 | #endif//MEASUREBASE_H
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureHeight.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Measure/MeasureHeight.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureHeight.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASUREHEIGHT_H
2 | #define MEASUREHEIGHT_H
3 | #include
4 | #include
5 |
6 | class MeasureHeight : public MeasureBase
7 | {
8 | public:
9 | MeasureHeight(void);
10 | ~MeasureHeight(void);
11 |
12 | void clickEvent(osg::Vec3 pos);
13 |
14 | void moveEvent(osg::Vec3 pos);
15 |
16 | float calcResult();
17 |
18 | void endMeasure();
19 | private:
20 | void init();
21 |
22 | private:
23 | osg::ref_ptr m_pMainLine;
24 | };
25 |
26 | #endif//MEASUREHEIGHT_H
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureLength.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Measure/MeasureLength.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureLength.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASURELENGTH_H
2 | #define MEASURELENGTH_H
3 | #include "Export.h"
4 | #include "MeasureBase.h"
5 | #include
6 |
7 | class MeasureLength : public MeasureBase
8 | {
9 | public:
10 | MeasureLength(void);
11 | ~MeasureLength(void);
12 |
13 | void clickEvent(osg::Vec3 pos);
14 |
15 | void moveEvent(osg::Vec3 pos);
16 |
17 | float calcResult();
18 |
19 | void endMeasure();
20 | private:
21 | void init();
22 |
23 | private:
24 | osg::ref_ptr m_pMainLine;
25 | };
26 |
27 | #endif//MEASURELENGTH_H
28 |
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureMarkSphere.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | MeasureMarkSphere::MeasureMarkSphere(void)
4 | {
5 | getOrCreateStateSet()->setRenderBinDetails(10, "RenderBin");
6 | }
7 |
8 | MeasureMarkSphere::~MeasureMarkSphere(void)
9 | {
10 | }
11 |
12 | void MeasureMarkSphere::addMarkSphere(const osg::Vec3 pos)
13 | {
14 | osg::AutoTransform* autoTrans = new osg::AutoTransform;
15 | autoTrans->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_CAMERA);
16 | autoTrans->setAutoScaleToScreen(true);
17 | autoTrans->setMinimumScale(0.01);
18 | osg::ShapeDrawable* sphere = NULL;
19 | sphere = new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(), 3));
20 | sphere->setColor(osg::Vec4(0, 0.8, 0, 0.8));
21 | osg::Geode* geode = new osg::Geode;
22 | geode->addDrawable(sphere);
23 | autoTrans->addChild(geode);
24 | autoTrans->setPosition(pos);
25 | this->addChild(autoTrans);
26 | }
27 |
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureMarkSphere.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASUREMARKSPHERE_H
2 | #define MEASUREMARKSPHERE_H
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | class MEASURE_EXPORT MeasureMarkSphere : public osg::Group
9 | {
10 | public:
11 | MeasureMarkSphere(void);
12 | ~MeasureMarkSphere(void);
13 |
14 | void addMarkSphere(const osg::Vec3 pos);
15 | };
16 |
17 | #endif//MEASUREMARKSPHERE_H
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureTool.cpp:
--------------------------------------------------------------------------------
1 | #include "MeasureTool.h"
2 |
3 | MeasureTool* MeasureTool::m_pSelf = NULL;
4 |
5 | MeasureTool::MeasureTool(void)
6 | {
7 | m_pHandler = NULL;
8 | m_pMeasureBase = NULL;
9 | }
10 |
11 | MeasureTool::~MeasureTool(void)
12 | {
13 | if (m_pMeasureBase != NULL)
14 | {
15 | delete m_pMeasureBase;
16 | }
17 | if (m_pMeasureGroup != NULL)
18 | {
19 | m_pRoot->removeChild(m_pMeasureGroup);
20 | }
21 | if (m_pHandler != NULL)
22 | {
23 | m_pViewer->removeEventHandler(m_pHandler);
24 | }
25 | m_pHandler = NULL;
26 | m_pMeasureBase = NULL;
27 | m_pMeasureGroup = NULL;
28 | }
29 |
30 | MeasureTool* MeasureTool::ins()
31 | {
32 | if (m_pSelf == NULL)
33 | {
34 | m_pSelf = new MeasureTool;
35 | }
36 | return m_pSelf;
37 | }
38 |
39 | void MeasureTool::destory()
40 | {
41 | if (m_pSelf != NULL)
42 | {
43 | delete m_pSelf;
44 | m_pSelf = NULL;
45 | }
46 | }
47 |
48 | void MeasureTool::selectTool(MeasureType type)
49 | {
50 | cancelTool();
51 | switch (type)
52 | {
53 | case Measure_Area:
54 | {
55 | m_pMeasureBase = new MeasureArea;
56 | m_currentType = Measure_Area;
57 | break;
58 | }
59 | case Measure_Length:
60 | {
61 | m_pMeasureBase = new MeasureLength;
62 | m_currentType = Measure_Length;
63 | break;
64 | }
65 | case Measure_Height:
66 | {
67 | m_pMeasureBase = new MeasureHeight;
68 | m_currentType = Measure_Height;
69 | break;
70 | }
71 | case Measure_Angle:
72 | {
73 | m_pMeasureBase = new MeasureAngle;
74 | m_currentType = Measure_Angle;
75 | break;
76 | }
77 | case Measure_Azimuth:
78 | {
79 | m_pMeasureBase = new MeasureAzimuth;
80 | m_currentType = Measure_Azimuth;
81 | break;
82 | }
83 | case Measure_PorArea:
84 | {
85 | m_pMeasureBase = new MeasureProjectionArea;
86 | m_currentType = Measure_PorArea;
87 | break;
88 | }
89 | case Measure_ProLength:
90 | {
91 | m_pMeasureBase = new MeasureProjectionLength;
92 | m_currentType = Measure_ProLength;
93 | break;
94 | }
95 | default: Measure_None;
96 | break;
97 | }
98 | m_pMeasureBase->setMeasureGroup(m_pMeasureGroup);
99 | m_pMeasureBase->setImagePath(m_strImagePath);
100 | m_pHandler = new MeasureHandlerBase(m_pMeasureBase);
101 | m_pViewer->addEventHandler(m_pHandler);
102 | }
103 |
104 | void MeasureTool::cancelTool()
105 | {
106 | if (m_pMeasureBase != NULL)
107 | {
108 | delete m_pMeasureBase;
109 | m_pMeasureBase = NULL;
110 | }
111 | m_currentType = Measure_None;
112 | m_pViewer->removeEventHandler(m_pHandler);
113 | m_pMeasureGroup->removeChildren(0, m_pMeasureGroup->getNumChildren());
114 | }
115 |
116 | void MeasureTool::init(osgViewer::Viewer* viewer, osg::Group* root)
117 | {
118 | m_pRoot = root;
119 | m_pViewer = viewer;
120 | m_pMeasureGroup = new osg::Group;
121 | m_pRoot->addChild(m_pMeasureGroup);
122 | osg::StateSet* stateSet = m_pMeasureGroup->getOrCreateStateSet();
123 | stateSet->setMode(GL_LIGHTING, 4);
124 | stateSet->setMode(GL_BLEND, 5);
125 | stateSet->setMode(GL_DEPTH_TEST, 4);
126 | stateSet->setRenderBinDetails(10, "RenderBin");
127 | }
128 |
129 | void MeasureTool::setImagePath(std::string imagePath)
130 | {
131 | m_strImagePath = imagePath;
132 | }
133 |
134 |
--------------------------------------------------------------------------------
/src/MEPlotting/Measure/MeasureTool.h:
--------------------------------------------------------------------------------
1 | #ifndef MEASURETOOL_H
2 | #define MEASURETOOL_H
3 | #include "Export.h"
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | class MEASURE_EXPORT MeasureTool
14 | {
15 | public:
16 | enum MeasureType
17 | {
18 | Measure_None,
19 | Measure_Area,
20 | Measure_Angle,
21 | Measure_Length,
22 | Measure_Height,
23 | Measure_Azimuth,
24 | Measure_PorArea,
25 | Measure_ProLength
26 | };
27 |
28 | static MeasureTool* ins();
29 |
30 | static void destory();
31 |
32 | void selectTool(MeasureType type);
33 |
34 | void cancelTool();
35 |
36 | MeasureType getCurrentType(){ return m_currentType; }
37 |
38 | void init(osgViewer::Viewer* viewer, osg::Group* root);
39 |
40 | void setImagePath(std::string imagePath);
41 |
42 | private:
43 | MeasureTool(void);
44 | ~MeasureTool(void);
45 | static MeasureTool* m_pSelf;
46 | MeasureType m_currentType;
47 | MeasureBase* m_pMeasureBase;
48 | std::string m_strImagePath;
49 | osg::ref_ptr m_pRoot;
50 | osg::ref_ptr m_pViewer;
51 | osg::ref_ptr m_pMeasureGroup;
52 | osg::ref_ptr m_pHandler;
53 | };
54 |
55 | #endif//MEASURETOOL_H
--------------------------------------------------------------------------------
/src/MEPlotting/Plotting/PlottingArrow.cpp:
--------------------------------------------------------------------------------
1 | #include "PlottingTool/PlottingArrow.h"
2 |
3 | std::string PlottingArrow::resPath = "";
4 | //std::string PlottingArrow::closeBtnName = "arrow_close_button";
--------------------------------------------------------------------------------
/src/MEPlotting/Plotting/PlottingArrow.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Plotting/PlottingArrow.h
--------------------------------------------------------------------------------
/src/MEPlotting/Plotting/PlottingTool.cpp:
--------------------------------------------------------------------------------
1 | #include "PlottingTool.h"
--------------------------------------------------------------------------------
/src/MEPlotting/Plotting/PlottingTool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Export.h"
4 |
5 | class MEPLOTTING_EXPORT PlottingTool
6 | {
7 |
8 |
9 | };
--------------------------------------------------------------------------------
/src/MEPlotting/PosPickHandler.cpp:
--------------------------------------------------------------------------------
1 | #include "PosPickHandler.h"
2 | #include
3 |
4 |
5 |
6 | PosPickHandler::PosPickHandler()
7 | {
8 | }
9 |
10 |
11 | PosPickHandler::~PosPickHandler()
12 | {
13 | }
14 |
15 | bool PosPickHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
16 | {
17 | int keyMask = ea.getButtonMask();
18 |
19 | osg::Vec3 pos;
20 | switch (ea.getEventType())
21 | {
22 | case osgGA::GUIEventAdapter::DOUBLECLICK:
23 | {
24 | if (osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON == keyMask)
25 | {
26 | pos = pickPos(ea, aa);
27 |
28 | }
29 | }
30 | break;
31 | case osgGA::GUIEventAdapter::PUSH:
32 | {
33 | if (osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON == keyMask)
34 | {
35 | pos = pickPos(ea, aa);
36 |
37 | }
38 | }
39 | break;
40 | case osgGA::GUIEventAdapter::RELEASE:
41 | {
42 | pos = pickPos(ea, aa);
43 |
44 | }
45 | break;
46 | case osgGA::GUIEventAdapter::MOVE:
47 | {
48 | pos = pickPos(ea, aa);
49 |
50 | }
51 | break;
52 | default:
53 | break;
54 | }
55 | return false;
56 | }
57 |
58 | osg::Vec3 PosPickHandler::pickPos(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
59 | {
60 | osg::Vec3 worldPos;
61 | osgViewer::View * view = dynamic_cast(&aa);
62 | if (NULL == view)
63 | {
64 | return worldPos;
65 | }
66 |
67 | osgUtil::LineSegmentIntersector::Intersections intersections;
68 | if (view->computeIntersections(ea.getX(), ea.getY(), intersections))
69 | {
70 | auto iter = intersections.begin();
71 | for (; iter != intersections.end(); iter++)
72 | {
73 | worldPos = iter->getWorldIntersectPoint();
74 | return worldPos;
75 | }
76 | }
77 | return worldPos;
78 | }
79 |
80 | void PosPickHandler::signalPos(osg::Vec3 pos)
81 | {
82 | sig_Pos.emit(pos);
83 | }
84 |
85 | void PosPickHandler::setEnable(bool isEnable)
86 | {
87 | m_isEnable = isEnable;
88 | }
89 |
--------------------------------------------------------------------------------
/src/MEPlotting/PosPickHandler.h:
--------------------------------------------------------------------------------
1 | #ifndef POSPICKHANDLER_H
2 | #define POSPICKHANDLER_H
3 |
4 | #include
5 | #include
6 | #include "MECore/SigSlot.h"
7 | #include "MECore/SigSlot.h"
8 |
9 | class PosPickHandler : public osgGA::GUIEventHandler
10 | {
11 | public:
12 | PosPickHandler();
13 | ~PosPickHandler();
14 |
15 | void setEnable(bool isEnable);
16 | bool isEnable() { return m_isEnable; }
17 |
18 | private:
19 | bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
20 |
21 | osg::Vec3 pickPos(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
22 |
23 | public:
24 | void signalPos(osg::Vec3 pos);
25 |
26 | private:
27 | Signal sig_Pos;
28 | bool m_isEnable;
29 | osg::Vec3 m_pushPos;
30 | };
31 |
32 | #endif//POSPICKHANDLER_H
33 |
--------------------------------------------------------------------------------
/src/MEPlotting/ReadMe.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/ReadMe.txt
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolBase.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Symbols/SymbolBase.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolBase.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLBASE_H
2 | #define SYMBOLBASE_H
3 |
4 | #include "Export.h"
5 | #include
6 | #include
7 | #include
8 |
9 | class SymbolBase : public osg::Group
10 | {
11 | public:
12 | SymbolBase(void);
13 | virtual ~SymbolBase(void);
14 |
15 | protected:
16 | virtual void init();
17 |
18 | virtual void startDraw();
19 |
20 | virtual void endDraw();
21 |
22 | virtual void clickEvent(osg::Vec3 pos){};
23 |
24 | virtual void moveEvent(osg::Vec3 pos){};
25 |
26 | protected:
27 | bool m_isStart;
28 | float m_numWidth;
29 | float m_numHeight;
30 | size_t m_numVertexs;
31 | bool m_isUseText;
32 | std::string m_strTexture;
33 | osg::ref_ptr m_pGeomGeode;
34 | };
35 |
36 | #endif//SYMBOLBASE_H
37 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolCuboid.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Symbols/SymbolCuboid.cpp
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolCuboid.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLCUBOID_H
2 | #define SYMBOLCUBOID_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class SymbolCuboid : public SymbolBase
9 | {
10 | public:
11 | SymbolCuboid(void);
12 | ~SymbolCuboid(void);
13 |
14 | void setTexture(std::string &imagePath);
15 |
16 | protected:
17 | void init();
18 |
19 | void clickEvent(osg::Vec3 pos);
20 |
21 | void moveEvent(osg::Vec3 pos);
22 |
23 | void endDraw();
24 |
25 | private:
26 | osg::ref_ptr m_pCuboid;
27 | osg::ref_ptr m_pArray;
28 | };
29 |
30 | #endif//SYMBOLCUBOID_H
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolFence.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | SymbolFence::SymbolFence(void)
4 | {
5 | m_pCuboid = NULL;
6 | m_pPolygon = NULL;
7 | m_pCuboiding = NULL;
8 | }
9 |
10 | SymbolFence::~SymbolFence(void)
11 | {
12 | m_pCuboid = NULL;
13 | m_pPolygon = NULL;
14 | m_pCuboiding = NULL;
15 | }
16 |
17 | void SymbolFence::init()
18 | {
19 | m_pPolygon = new GeometryPolygon;
20 | m_pPolygon->setColor(osg::Vec4(1, 1, 1, 1));
21 |
22 | m_pCuboiding = new GeometryCuboid;
23 | m_pCuboiding->setColor(osg::Vec4(1, 1, 1, 1));
24 | m_pCuboiding->setWidth(m_numWidth);
25 | m_pCuboiding->setHeight(m_numHeight);
26 | m_pCuboiding->setTexture(m_strTexture);
27 |
28 | m_pCuboid = new GeometryCuboid;
29 | m_pCuboid->setColor(osg::Vec4(1, 1, 1, 1));
30 | m_pCuboid->setWidth(m_numWidth);
31 | m_pCuboid->setHeight(m_numHeight);
32 | m_pCuboid->setTexture(m_strTexture);
33 |
34 | m_pGeomGeode->addDrawable(m_pCuboid);
35 | m_pGeomGeode->addDrawable(m_pPolygon);
36 | m_pGeomGeode->addDrawable(m_pCuboiding);
37 | }
38 |
39 | void SymbolFence::clickEvent(osg::Vec3 pos)
40 | {
41 | if (!m_isStart)
42 | {
43 | return;
44 | }
45 | if (pos == osg::Vec3())
46 | {
47 | return;
48 | }
49 | if (m_pCuboid != NULL)
50 | {
51 | m_pCuboid->addPoint(pos);
52 | }
53 | }
54 |
55 | void SymbolFence::moveEvent(osg::Vec3 pos)
56 | {
57 | if (m_pTextInfo != NULL)
58 | {
59 | m_pTextInfo->setPosition(pos);
60 | }
61 | if (!m_isStart)
62 | {
63 | return;
64 | }
65 | if (m_pCuboiding != NULL)
66 | {
67 | m_pCuboiding->setPoint(0, m_pCuboid->lastPoint());
68 | m_pCuboiding->setPoint(1, pos);
69 | }
70 | }
71 |
72 | void SymbolFence::endDraw()
73 | {
74 | m_pPolygon->setVertexs(m_pCuboid->getSouceArray());
75 | SymbolBase::endDraw();
76 | m_pGeomGeode->removeDrawable(m_pCuboiding);
77 | m_pCuboiding = NULL;
78 | }
79 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolFence.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLFENCE_H
2 | #define SYMBOLFENCE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class SymbolFence : public SymbolBase
10 | {
11 | public:
12 | SymbolFence(void);
13 | virtual ~SymbolFence(void);
14 |
15 | protected:
16 | void init();
17 |
18 | void clickEvent(osg::Vec3 pos);
19 |
20 | void moveEvent(osg::Vec3 pos);
21 |
22 | void endDraw();
23 | private:
24 | osg::ref_ptr m_pCuboid;
25 | osg::ref_ptr m_pCuboiding;
26 | osg::ref_ptr m_pPolygon;
27 | };
28 |
29 | #endif//SYMBOLFENCE_H
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolPolygon.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | SymbolPolygon::SymbolPolygon(void)
4 | {
5 | m_pPolygon = NULL;
6 | }
7 |
8 | SymbolPolygon::~SymbolPolygon(void)
9 | {
10 | }
11 |
12 | void SymbolPolygon::init()
13 | {
14 | SymbolBase::init();
15 | m_pPolygon = new GeometryPolygon;
16 | m_pPolygon->setColor(osg::Vec4(1, 1, 1, 1));
17 | m_pPolygon->setTexture(m_strTexture);
18 |
19 | m_pLine = new GeometryLine;
20 | m_pLine->setColor(osg::Vec4(0.5, 1, 1.0, 0.8));
21 | m_pLine->setWidth(3.0);
22 | m_pGeomGeode->addDrawable(m_pLine);
23 | m_pGeomGeode->addDrawable(m_pPolygon);
24 |
25 | }
26 |
27 | void SymbolPolygon::clickEvent(osg::Vec3 pos)
28 | {
29 | if (!m_isStart)
30 | {
31 | return;
32 | }
33 | if (pos == osg::Vec3())
34 | {
35 | return;
36 | }
37 | if (m_pLine != NULL)
38 | {
39 | m_pLine->addPoint(pos);
40 | }
41 | if (m_pPolygon != NULL)
42 | {
43 | m_pPolygon->addPoint(pos);
44 | m_numVertexs = m_pPolygon->pointSize();
45 | }
46 | }
47 |
48 | void SymbolPolygon::moveEvent(osg::Vec3 pos)
49 | {
50 | if (pos == osg::Vec3())
51 | {
52 | return;
53 | }
54 | if (m_pTextInfo != NULL)
55 | {
56 | m_pTextInfo->setPosition(pos);
57 | }
58 | if (!m_isStart)
59 | {
60 | return;
61 | }
62 | if (m_pPolygon != NULL)
63 | {
64 | //m_pPolygon->setPoint(m_numVertexs, pos);
65 | }
66 | if (m_pLine != NULL)
67 | {
68 | m_pLine->setPoint(m_numVertexs, pos);
69 | }
70 | }
71 |
72 | void SymbolPolygon::endDraw()
73 | {
74 | SymbolBase::endDraw();
75 | m_pGeomGeode->removeDrawable(m_pLine);
76 | m_pLine = NULL;
77 | }
78 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolPolygon.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLPOLYGON_H
2 | #define SYMBOLPOLYGON_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class SymbolPolygon : public SymbolBase
9 | {
10 | public:
11 | SymbolPolygon(void);
12 | ~SymbolPolygon(void);
13 |
14 | protected:
15 | void init();
16 |
17 | void clickEvent(osg::Vec3 pos);
18 |
19 | void moveEvent(osg::Vec3 pos);
20 |
21 | void endDraw();
22 | private:
23 | osg::ref_ptr m_pLine;
24 | osg::ref_ptr m_pPolygon;
25 | };
26 |
27 |
28 | #endif//SYMBOLPOLYGON_H
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolRoad.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | SymbolRoad::SymbolRoad(void)
4 | {
5 | // m_pPolygon = NULL;
6 | _points = new osg::Vec3Array;
7 | }
8 |
9 | SymbolRoad::~SymbolRoad(void)
10 | {
11 | }
12 |
13 | void SymbolRoad::setTexture(std::string &imagePath)
14 | {
15 | m_strTexture = imagePath;
16 | }
17 |
18 | void SymbolRoad::init()
19 | {
20 | //SymbolBase::init();
21 | // m_pPolygon = new GeometryPolygon;
22 | // m_pPolygon->setColor(osg::Vec4(1, 1, 1, 1));
23 | // m_pPolygon->setTexture(m_strTexture);
24 |
25 | m_pLine = new GeometryLine;
26 | m_pLine->setColor(osg::Vec4(0.5, 1, 1.0, 0.8));
27 | m_pLine->setWidth(3.0);
28 | m_pGeomGeode->addDrawable(m_pLine);
29 | // m_pGeomGeode->addDrawable(m_pPolygon);
30 |
31 | }
32 |
33 | void SymbolRoad::clickEvent(osg::Vec3 pos)
34 | {
35 | if (!m_isStart)
36 | {
37 | return;
38 | }
39 | if (pos == osg::Vec3())
40 | {
41 | return;
42 | }
43 | if (m_pLine != NULL)
44 | {
45 | m_pLine->addPoint(pos);
46 | _points->push_back(pos);
47 | }
48 | // if (m_pPolygon != NULL)
49 | // {
50 | // m_pPolygon->addPoint(pos);
51 | // m_numVertexs = m_pPolygon->pointSize();
52 | // }
53 | }
54 |
55 | void SymbolRoad::moveEvent(osg::Vec3 pos)
56 | {
57 | if (pos == osg::Vec3())
58 | {
59 | return;
60 | }
61 | if (m_pTextInfo != NULL)
62 | {
63 | m_pTextInfo->setPosition(pos);
64 | }
65 | if (!m_isStart)
66 | {
67 | return;
68 | }
69 | // if (m_pPolygon != NULL)
70 | // {
71 | // //m_pPolygon->setPoint(m_numVertexs, pos);
72 | // }
73 | if (m_pLine != NULL)
74 | {
75 | m_pLine->setPoint(m_numVertexs, pos);
76 | m_pLine->setPoint(m_numVertexs + 1, m_pLine->firstPoint());
77 | }
78 | }
79 |
80 | void SymbolRoad::endDraw()
81 | {
82 | SymbolBase::endDraw();
83 | _roadGeometry = QuadStripDrawer::Road(_points, 3, 3, 1, 1, 16);
84 | m_pGeomGeode->removeDrawable(m_pLine);
85 | m_pGeomGeode->removeDrawable(_roadGeometry);
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolRoad.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLPOLYGON_ROAD_H
2 | #define SYMBOLPOLYGON_ROAD_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class SymbolRoad : public SymbolBase
9 | {
10 | public:
11 | SymbolRoad(void);
12 | ~SymbolRoad(void);
13 |
14 | void setTexture(std::string &imagePath);
15 |
16 | protected:
17 | void init();
18 |
19 | void clickEvent(osg::Vec3 pos);
20 |
21 | void moveEvent(osg::Vec3 pos);
22 |
23 | void endDraw();
24 | private:
25 | osg::ref_ptr m_pLine;
26 | osg::ref_ptr _roadGeometry;
27 | osg::ref_ptr _points;
28 |
29 | protected:
30 | };
31 |
32 |
33 | #endif//SYMBOLPOLYGON_H
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolStrip.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | SymbolStrip::SymbolStrip(void)
4 | {
5 | m_pStrip = NULL;
6 | }
7 |
8 | SymbolStrip::~SymbolStrip(void)
9 | {
10 | if (m_pStrip != NULL)
11 | {
12 | m_pStrip = NULL;
13 | }
14 | }
15 |
16 | void SymbolStrip::init()
17 | {
18 | m_pStrip = new GeometryStrip;
19 | m_pStrip->setColor(osg::Vec4(1, 1, 1, 1));
20 | m_pStrip->setTexture(m_strTexture);
21 | m_pGeomGeode->addDrawable(m_pStrip);
22 | }
23 |
24 | void SymbolStrip::clickEvent(osg::Vec3 pos)
25 | {
26 | if (!m_isStart)
27 | {
28 | return;
29 | }
30 | if (pos == osg::Vec3())
31 | {
32 | return;
33 | }
34 | if (m_pStrip != NULL)
35 | {
36 | m_pStrip->setPoint(m_numVertexs, pos);
37 | m_numVertexs = m_pStrip->pointSize();
38 | }
39 | }
40 |
41 | void SymbolStrip::moveEvent(osg::Vec3 pos)
42 | {
43 | if (pos == osg::Vec3())
44 | {
45 | return;
46 | }
47 | if (m_pTextInfo != NULL)
48 | {
49 | m_pTextInfo->setPosition(pos);
50 | }
51 | if (!m_isStart)
52 | {
53 | return;
54 | }
55 | if (m_pStrip != NULL)
56 | {
57 | m_pStrip->setPoint(m_numVertexs, pos);
58 | }
59 | }
60 |
61 | void SymbolStrip::endDraw()
62 | {
63 | SymbolBase::endDraw();
64 | m_pStrip = NULL;
65 | }
66 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolStrip.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLSTRIP_H
2 | #define SYMBOLSTRIP_H
3 |
4 | #include
5 | #include
6 |
7 | class SymbolStrip : public SymbolBase
8 | {
9 | public:
10 | SymbolStrip(void);
11 | virtual ~SymbolStrip(void);
12 |
13 | protected:
14 | void init();
15 |
16 | void clickEvent(osg::Vec3 pos);
17 |
18 | void moveEvent(osg::Vec3 pos);
19 |
20 | void endDraw();
21 | private:
22 | osg::ref_ptr m_pStrip;
23 | };
24 |
25 | #endif//SYMBOLSTRIP_H
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolTool.cpp:
--------------------------------------------------------------------------------
1 | #include "SymbolTool.h"
2 |
3 | SymbolTool* SymbolTool::m_pSelf = NULL;
4 |
5 | SymbolTool::SymbolTool(void)
6 | {
7 | m_currentType = SYMBOL_NONE;
8 | m_pSymbolBase = NULL;
9 | }
10 |
11 | SymbolTool::~SymbolTool(void)
12 | {
13 | }
14 |
15 | SymbolTool* SymbolTool::ins()
16 | {
17 | if (m_pSelf == NULL)
18 | {
19 | m_pSelf = new SymbolTool;
20 | }
21 | return m_pSelf;
22 | }
23 |
24 | void SymbolTool::destory()
25 | {
26 | if (m_pSelf != NULL)
27 | {
28 | delete m_pSelf;
29 | m_pSelf = NULL;
30 | }
31 | }
32 |
33 |
34 | void SymbolTool::selectTool(SymbolType type)
35 | {
36 | m_pSymbolBase = NULL;
37 | switch(type)
38 | {
39 |
40 | case SYMBOL_STRIP:
41 | {
42 | m_currentType = SYMBOL_STRIP;
43 | break;
44 | }
45 | default: SYMBOL_NONE;
46 | break;
47 | }
48 | }
49 |
50 | void SymbolTool::cancelTool()
51 | {
52 | m_currentType = SYMBOL_NONE;
53 | }
54 |
55 |
56 | bool SymbolTool::isStart()
57 | {
58 | if (m_currentType != SYMBOL_NONE)
59 | {
60 | return true;
61 | }
62 | else
63 | {
64 | return false;
65 | }
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/src/MEPlotting/Symbols/SymbolTool.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/MEPlotting/Symbols/SymbolTool.h
--------------------------------------------------------------------------------
/src/ModelEdit/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 | set(TargetName ModelEdit)
3 | string(TOUPPER ${TargetName} TargetNameUP)
4 |
5 | # Find includes in corresponding build directories
6 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
7 |
8 | # Instruct CMake to run moc automatically when needed.
9 | #set(CMAKE_AUTOMOC ON)
10 |
11 | # Find the Qt librarys
12 | find_package(Qt5Core)
13 | find_package(Qt5Gui)
14 | find_package(Qt5Widgets)
15 | find_package(Qt5OpenGL)
16 |
17 | # Find all Files
18 | set(qrcs ${TargetName}.qrc)
19 |
20 | #set(icon ${TargetName}.ico ${TargetName}.rc)
21 |
22 | set(forms MainWindow.ui)
23 |
24 | set(headers
25 | MainWindow.h
26 | TextureRolling.h
27 | )
28 |
29 | set(sources
30 | main.cpp
31 | InputLib.cpp
32 | MainWindow.cpp
33 | TextureRolling.cpp
34 | )
35 |
36 | set(mainWidgetForms MainWidget/AppHeadeTitle.ui)
37 |
38 | set(mainWidgetHeaders MainWidget/AppHeadeTitle.h)
39 |
40 | set(mainWidgetSources MainWidget/AppHeadeTitle.cpp)
41 |
42 | # Qt warp files
43 | qt5_wrap_ui(Forms_Ui ${forms} ${mainWidgetForms})
44 | qt5_wrap_cpp(Headers_Moc ${headers} ${mainWidgetHeaders})
45 | qt5_add_resources(Res_Qrc ${qrcs})
46 |
47 | # add definitions,unicode and export
48 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP}_EXPORTS)
49 |
50 | # Set porject filiter
51 | source_group("Header Files" FILES ${headers})
52 | source_group("Form Files" FILES ${forms})
53 | source_group("Resource Files" FILES ${qrcs} ${icon})
54 | source_group("Generated Files" FILES ${Forms_Ui} ${Headers_Moc} ${Res_Qrc})
55 | source_group("MainWidget" FILES ${mainWidgetForms} ${mainWidgetHeaders} ${mainWidgetSources})
56 |
57 | # Tell CMake to create the TargetName executable
58 | add_executable(${TargetName} ${sources} ${Forms_Ui} ${Headers_Moc} ${Res_Qrc} ${headers} ${icon}
59 | ${mainWidgetHeaders} ${mainWidgetSources})
60 |
61 | # Add dependncies
62 | add_dependencies(${TargetName} RigelCore)
63 |
64 | set_target_properties(${TargetName} PROPERTIES DEBUG_OUTPUT_NAME "${TargetName}${CMAKE_DEBUG_POSTFIX}")
65 | set_target_properties(${TargetName} PROPERTIES RELEASE_OUTPUT_NAME "${TargetName}${CMAKE_RELEASE_POSTFIX}")
66 |
67 |
68 | # Use the Qt5 modules
69 | target_link_libraries(${TargetName} Qt5::Core Qt5::Gui Qt5::Widgets
70 | Qt5::OpenGL)
71 |
--------------------------------------------------------------------------------
/src/ModelEdit/InputLib.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | *@file InputLib.cpp
3 | *@brief brief description
4 | *@author louyk
5 | *@date 2017/05/11
6 | *@version 0.1.0
7 | *@note
8 | */
9 | #ifndef MODELEDIT_INPUTLIB_H
10 | #define MODELEDIT_INPUTLIB_H
11 |
12 | #ifdef _DEBUG
13 | #pragma comment(lib,"OpenThreadsd.lib")
14 | #pragma comment(lib,"osgd.lib")
15 | #pragma comment(lib,"osgGAd.lib")
16 | #pragma comment(lib,"osgDBd.lib")
17 | #pragma comment(lib,"osgTextd.lib")
18 | #pragma comment(lib,"osgUtild.lib")
19 | #pragma comment(lib,"osgViewerd.lib")
20 | #pragma comment(lib,"RigelModeld.lib")
21 | #pragma comment(lib,"RigelQtd.lib")
22 | #pragma comment(lib,"RigelCored.lib")
23 |
24 | #else
25 | #pragma comment(lib,"OpenThreads.lib")
26 | #pragma comment(lib,"osg.lib")
27 | #pragma comment(lib,"osgGA.lib")
28 | #pragma comment(lib,"osgDB.lib")
29 | #pragma comment(lib,"osgText.lib")
30 | #pragma comment(lib,"osgUtil.lib")
31 | #pragma comment(lib,"osgViewer.lib")
32 |
33 | #pragma comment(lib,"RigelModel.lib")
34 | #pragma comment(lib,"RigelQt.lib")
35 | #pragma comment(lib,"RigelCore.lib")
36 |
37 | #endif
38 |
39 | #endif // MODELEDIT_INPUTLIB_H
40 |
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/AppHeadeTitle.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/MainWidget/AppHeadeTitle.cpp
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/AppHeadeTitle.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/MainWidget/AppHeadeTitle.h
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/AppHeadeTitle.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | AppHeadeTitle
4 |
5 |
6 |
7 | 0
8 | 0
9 | 876
10 | 90
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 |
33 | 0
34 |
35 | -
36 |
37 |
38 |
39 | 262
40 | 45
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 0
49 |
50 |
51 | 0
52 |
53 |
54 | 0
55 |
56 |
57 | 0
58 |
59 |
60 | 0
61 |
62 |
-
63 |
64 |
65 |
66 | 138
67 | 90
68 |
69 |
70 |
71 |
72 | 138
73 | 90
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | -
82 |
83 |
-
84 |
85 |
86 |
87 | 0
88 | 5
89 |
90 |
91 |
92 |
93 | 16777215
94 | 5
95 |
96 |
97 |
98 |
99 | -
100 |
101 |
-
102 |
103 |
104 | 0
105 |
106 |
107 | 30
108 |
109 |
-
110 |
111 |
112 |
113 | 16777215
114 | 60
115 |
116 |
117 |
118 |
119 |
120 |
121 | 按1钮
122 |
123 |
124 | true
125 |
126 |
127 |
128 | -
129 |
130 |
131 |
132 | 16777215
133 | 60
134 |
135 |
136 |
137 |
138 |
139 |
140 | 按钮2
141 |
142 |
143 | true
144 |
145 |
146 |
147 | -
148 |
149 |
150 |
151 | 16777215
152 | 60
153 |
154 |
155 |
156 |
157 |
158 |
159 | 按钮3
160 |
161 |
162 | true
163 |
164 |
165 |
166 | -
167 |
168 |
169 |
170 | 16777215
171 | 60
172 |
173 |
174 |
175 | 按钮4
176 |
177 |
178 | true
179 |
180 |
181 |
182 | -
183 |
184 |
185 |
186 | 16777215
187 | 60
188 |
189 |
190 |
191 | 按钮5
192 |
193 |
194 | true
195 |
196 |
197 |
198 | -
199 |
200 |
201 | Qt::Horizontal
202 |
203 |
204 |
205 | 40
206 | 20
207 |
208 |
209 |
210 |
211 |
212 |
213 | -
214 |
215 |
216 |
217 | 80
218 | 36
219 |
220 |
221 |
222 |
223 | 80
224 | 36
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 | -
238 |
239 |
240 | Qt::Vertical
241 |
242 |
243 |
244 | 20
245 | 40
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/BottomMenu.cpp:
--------------------------------------------------------------------------------
1 | #include "BottomMenu.h"
2 |
3 | BottomMenu::BottomMenu(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | ui.setupUi(this);
7 | }
8 |
9 | BottomMenu::~BottomMenu()
10 | {
11 | }
12 |
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/BottomMenu.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_BottomMenu.h"
5 |
6 | class BottomMenu : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | BottomMenu(QWidget *parent = Q_NULLPTR);
12 | ~BottomMenu();
13 |
14 | private:
15 | Ui::BottomMenu ui;
16 | };
17 |
--------------------------------------------------------------------------------
/src/ModelEdit/MainWidget/BottomMenu.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | BottomMenu
4 |
5 |
6 |
7 | 0
8 | 0
9 | 439
10 | 60
11 |
12 |
13 |
14 | BottomMenu
15 |
16 |
17 |
18 |
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 |
33 | 0
34 |
35 | -
36 |
37 |
38 |
39 | 0
40 | 60
41 |
42 |
43 |
44 |
45 | 16777215
46 | 60
47 |
48 |
49 |
50 | QWidget#widget{
51 | margin-top:20px;
52 | border-radius:20px;
53 | background-color: rgb(80, 85, 89);
54 | }
55 |
56 |
57 |
58 |
59 | 20
60 | 0
61 | 48
62 | 48
63 |
64 |
65 |
66 |
67 | 48
68 | 48
69 |
70 |
71 |
72 |
73 | 48
74 | 48
75 |
76 |
77 |
78 | QPushButton{
79 | border:0px;
80 | image: url(:/Resources/dataBase.png);
81 | }
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 100
92 | 10
93 | 48
94 | 48
95 |
96 |
97 |
98 |
99 | 48
100 | 48
101 |
102 |
103 |
104 |
105 | 48
106 | 48
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | 210
117 | 20
118 | 48
119 | 48
120 |
121 |
122 |
123 |
124 | 48
125 | 48
126 |
127 |
128 |
129 |
130 | 48
131 | 48
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | 310
142 | 20
143 | 48
144 | 48
145 |
146 |
147 |
148 |
149 | 48
150 | 48
151 |
152 |
153 |
154 |
155 | 48
156 | 48
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
--------------------------------------------------------------------------------
/src/ModelEdit/MainWindow.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/MainWindow.cpp
--------------------------------------------------------------------------------
/src/ModelEdit/MainWindow.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/MainWindow.h
--------------------------------------------------------------------------------
/src/ModelEdit/MainWindow.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | MainWindowClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 600
10 | 400
11 |
12 |
13 |
14 | MainWindow
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/ModelEdit/ModelEdit.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Resources/bottom_bg.png
4 | Resources/dataBase.png
5 | Resources/dataBase_h.png
6 | Resources/function.png
7 | Resources/function_h.png
8 | Resources/project.png
9 | Resources/project_h.png
10 | Resources/query.png
11 | Resources/query_h.png
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/bottom_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/bottom_bg.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/dataBase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/dataBase.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/dataBase_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/dataBase_h.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/function.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/function.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/function_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/function_h.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/project.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/project_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/project_h.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/query.png
--------------------------------------------------------------------------------
/src/ModelEdit/Resources/query_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/Resources/query_h.png
--------------------------------------------------------------------------------
/src/ModelEdit/TextureRolling.cpp:
--------------------------------------------------------------------------------
1 | #include "TextureRolling.h"
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | #include "RigelCore/FileUtils.h"
8 | #include "RigelCore/Core.h"
9 | #include "RigelModel/GeometryLine.h"
10 | #include "RigelModel/GeometryPipe.h"
11 |
12 | TextureRolling::TextureRolling()
13 | {
14 | m_pStrip = nullptr;
15 | m_pStateSet = getOrCreateStateSet();
16 | m_pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON |
17 | osg::StateAttribute::OVERRIDE);
18 | createStrip();
19 | }
20 |
21 |
22 | TextureRolling::~TextureRolling()
23 | {
24 | }
25 |
26 | void TextureRolling::createStrip()
27 | {
28 | auto mtNode = new osg::MatrixTransform;;
29 | if (m_pStrip == nullptr)
30 | {
31 | auto _array = new osg::Vec3Array;
32 | _array->push_back(osg::Vec3(0, 0, 0) );
33 | _array->push_back(osg::Vec3(50, 0, 0));
34 | _array->push_back(osg::Vec3(50, 0, 50));
35 | // _array->push_back(osg::Vec3(50, 50, 50));
36 | // _array->push_back(osg::Vec3(50, 50, 0));
37 | // _array->push_back(osg::Vec3(50, 10, 0));
38 | // _array->push_back(osg::Vec3(20, 15, 30));
39 | // _array->push_back(osg::Vec3(35, 30, 30));
40 | // _array->push_back(osg::Vec3(35, 30, 30));
41 | // _array->push_back(osg::Vec3(35, 30, 30));
42 | // _array->push_back(osg::Vec3(50, 10, 0));
43 | // _array->push_back(osg::Vec3(50, 50, 50));
44 | // _array->push_back(osg::Vec3(50, 50, 0));
45 |
46 | //m_pStrip = new GeometryStrip(_array);
47 | //m_pStrip->setTexture(FileUtils::ins()->getPath(std::string("Data/Images/arraw_strip.png")));
48 | //mtNode->addChild(m_pStrip);
49 | //mtNode->setMatrix(osg::Matrix::rotate(osg::PI_2, osg::X_AXIS));
50 |
51 | auto pipe = new GeometryPipe(_array);
52 | pipe->setColor(osg::Vec4(1, 0, 0, 1));
53 | //pipe->addTexture(0, FileUtils::ins()->getPath(std::string("Data/Images/arraw_strip.png")));
54 | pipe->addTexture(1, FileUtils::ins()->getPath(std::string("Data/Images/water.png")));
55 | addChild(pipe);
56 | }
57 | //addChild(m_pStrip);
58 |
59 | createShader();
60 | }
61 |
62 | void TextureRolling::createShader()
63 |
64 | {
65 | osg::Program* profram = new osg::Program;
66 | osg::Shader* vertShader = osgDB::readShaderFile(osg::Shader::VERTEX,
67 | FileUtils::ins()->getPath(std::string("Data/Shaders/texRolling.vert")));
68 |
69 | osg::Shader* fragShader = osgDB::readShaderFile(osg::Shader::FRAGMENT,
70 | FileUtils::ins()->getPath(std::string("Data/Shaders/texRolling.frag")));
71 |
72 | profram->addShader(vertShader);
73 | profram->addShader(fragShader);
74 |
75 | m_pStateSet->addUniform(new osg::Uniform("sampler", 0));
76 | m_pStateSet->addUniform(new osg::Uniform("sampler", 1));
77 |
78 | m_pStateSet->setAttributeAndModes(profram);
79 | }
80 |
--------------------------------------------------------------------------------
/src/ModelEdit/TextureRolling.h:
--------------------------------------------------------------------------------
1 | #ifndef TEXTUREROLLING_H
2 | #define TEXTUREROLLING_H
3 | #include
4 | #include
5 |
6 | class TextureRolling : public osg::Group
7 | {
8 | public:
9 | TextureRolling();
10 | ~TextureRolling();
11 |
12 | void createStrip();
13 |
14 | void createShader();
15 |
16 | private:
17 | GeometryStrip* m_pStrip;
18 | osg::observer_ptr m_pStateSet;
19 | };
20 |
21 | #endif//TEXTUREROLLING_H
--------------------------------------------------------------------------------
/src/ModelEdit/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/ModelEdit/main.cpp
--------------------------------------------------------------------------------
/src/Rigel/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 | set(TargetName Rigel)
3 | string(TOUPPER ${TargetName} TargetNameUP)
4 |
5 | # Find includes in corresponding build directories
6 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
7 |
8 | set(CMAKE_AUTOMOC ON)
9 | set(CMAKE_AUTORCC ON)
10 |
11 | # Find the Qt librarys
12 | find_package(Qt5 COMPONENTS Core Quick REQUIRED)
13 |
14 | # Find all Files
15 | set(qrcs
16 | ${TargetName}.qrc
17 | )
18 |
19 | #set(icon ${TargetName}.ico ${TargetName}.rc)
20 |
21 | set(forms
22 | main.qml
23 | )
24 |
25 | set(headers
26 | TopPanel.h
27 | )
28 |
29 | set(sources
30 | main.cpp
31 | InputLib.cpp
32 | TopPanel.cpp
33 | )
34 |
35 |
36 | # add definitions,unicode and export
37 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP}_EXPORTS)
38 |
39 | # Set porject filiter
40 | source_group("Header Files" FILES ${headers})
41 | source_group("Form Files" FILES ${forms})
42 | source_group("Resource Files" FILES ${qrcs} ${icon})
43 |
44 | # Tell CMake to create the TargetName executable
45 | add_executable(${TargetName}
46 | ${sources}
47 | ${qrcs}
48 | ${headers}
49 | ${forms}
50 | )
51 |
52 | # Add dependncies
53 | #add_dependencies(${TargetName} )
54 |
55 | set_target_properties(${TargetName} PROPERTIES DEBUG_OUTPUT_NAME "${TargetName}${CMAKE_DEBUG_POSTFIX}")
56 | set_target_properties(${TargetName} PROPERTIES RELEASE_OUTPUT_NAME "${TargetName}${CMAKE_RELEASE_POSTFIX}")
57 |
58 | # Use the Qt5 modules
59 | target_link_libraries(${TargetName} Qt5::Core Qt5::Quick Qt5::Qml)
60 |
--------------------------------------------------------------------------------
/src/Rigel/InputLib.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/Rigel/InputLib.cpp
--------------------------------------------------------------------------------
/src/Rigel/Rigel.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main.qml
4 | TopPanel.qml
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Rigel/RigelOSG.cpp:
--------------------------------------------------------------------------------
1 | #include "RigelOSG.h"
2 |
--------------------------------------------------------------------------------
/src/Rigel/RigelOSG.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | class RigelOSG
3 | {
4 | public:
5 | RigelOSG();
6 | virtual ~RigelOSG();
7 | };
8 |
9 |
--------------------------------------------------------------------------------
/src/Rigel/TopPanel.cpp:
--------------------------------------------------------------------------------
1 | #include "TopPanel.h"
2 |
3 | TopPanel::TopPanel()
4 | {
5 |
6 | }
7 |
8 | TopPanel::~TopPanel()
9 | {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/Rigel/TopPanel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | class TopPanel : public QObject
5 | {
6 | Q_OBJECT
7 | public:
8 | TopPanel();
9 | virtual ~TopPanel();
10 | };
11 |
12 |
--------------------------------------------------------------------------------
/src/Rigel/TopPanel.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import QtQuick.Window 2.2
3 | import QtQuick.Layouts 1.1
4 |
--------------------------------------------------------------------------------
/src/Rigel/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "qqmlapplicationengine.h"
3 | #include "RigelQt/OSGView.h"
4 | #include "RigelCore/FileUtils.h"
5 |
6 | int main(int argc, char *argv[])
7 | {
8 | QGuiApplication app(argc, argv);
9 | auto strDir = QGuiApplication::applicationDirPath().toStdString();
10 | //FileUtils::ins()->init(strDir);
11 | qmlRegisterType("OSGQuick.OSGView", 1, 0, "OSGView");
12 | QQmlApplicationEngine engine;
13 | engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
14 | return app.exec();
15 | }
16 |
--------------------------------------------------------------------------------
/src/Rigel/main.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import QtQuick.Window 2.2
3 | import QtQuick.Layouts 1.1
4 | import OSGQuick.OSGView 1.0
5 |
6 | Window {
7 | id:mainWindow;
8 | visible: true;
9 | width: 640;
10 | height: 480;
11 | color: "black";
12 | title: qsTr("OSG嵌入QQuick");
13 | OSGView
14 | {
15 | id:view;
16 | anchors.fill: parent;
17 | focus:true;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/RigelCore/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 |
3 | set(TargetName RigelCore)
4 | string(TOUPPER ${TargetName} TargetNameUP)
5 |
6 | # Find includes in corresponding build directories
7 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
8 |
9 | # Find all Files
10 | set(headers
11 | Export.h
12 | Version.h
13 | FileUtils.h
14 | SigSlot.h
15 | )
16 |
17 | set(sources InputLib.cpp
18 | FileUtils.cpp
19 | SigSlot.cpp
20 | )
21 |
22 | # add definitions,unicode and export
23 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP})
24 |
25 | # Set porject filiter
26 | source_group("Header Files" FILES ${headers})
27 | source_group("Resource Files" FILES ${qrcs})
28 |
29 | # Tell CMake to create the helloworld executable
30 | add_library(${TargetName} SHARED ${sources} ${headers})
31 |
32 | # Use the Widgets module from Qt 5.
33 | target_link_libraries(${TargetName} OpenThreads.lib)
34 |
--------------------------------------------------------------------------------
/src/RigelCore/Core.cpp:
--------------------------------------------------------------------------------
1 | #include "Core.h"
2 |
3 | Core* Core::s_pSelf = nullptr;
4 |
5 | Core* Core::ins()
6 | {
7 | if (s_pSelf == nullptr)
8 | {
9 | s_pSelf = new Core;
10 | }
11 | return s_pSelf;
12 | }
13 |
14 | void Core::destory()
15 | {
16 | if (s_pSelf == nullptr)
17 | {
18 | delete s_pSelf;
19 | s_pSelf = nullptr;
20 | }
21 | }
22 |
23 | void Core::init(GraphicsView* osgView)
24 | {
25 | if (osgView)
26 | {
27 | m_pOsgView = osgView;
28 | m_pGraphScene = m_pOsgView->scene();
29 | m_pViewer = m_pOsgView->getOSGViewer();
30 | m_pSceneData = m_pOsgView->getRoot();
31 | }
32 | }
33 |
34 |
35 | GraphicsView* Core::getOSGView()
36 | {
37 | return m_pOsgView;
38 | }
39 |
40 | QGraphicsScene* Core::getGraphScene()
41 | {
42 | return m_pGraphScene;
43 | }
44 |
45 | osgViewer::Viewer* Core::getViewer()
46 | {
47 | return m_pOsgView->getOSGViewer();
48 | }
49 |
50 | osg::Camera* Core::getCamera()
51 | {
52 | return m_pOsgView->getOSGViewer()->getCamera();
53 | }
54 |
55 | osg::Group* Core::getSceneData()
56 | {
57 | return m_pSceneData;
58 | }
59 |
60 | osgGA::CameraManipulator* Core::getManipulator()
61 | {
62 | return m_pViewer->getCameraManipulator();
63 | }
64 |
65 | Core::Core()
66 | {
67 | m_pViewer = nullptr;
68 | m_pOsgView = nullptr;
69 | m_pGraphScene = nullptr;
70 | }
71 |
72 | Core::~Core()
73 | {
74 | }
75 |
--------------------------------------------------------------------------------
/src/RigelCore/Core.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelCore/Core.h
--------------------------------------------------------------------------------
/src/RigelCore/Export.h:
--------------------------------------------------------------------------------
1 | /*
2 | *@file Export.h
3 | *@brief brief description
4 | *@author louyk
5 | *@date 2017/05/11
6 | *@version 0.1.0
7 | *@note
8 | */
9 | #ifndef RIGELCORE_EXPORT_H
10 | #define RIGELCORE_EXPORT_H
11 |
12 | #ifdef RIGELCORE
13 | # define DLL_EXPORT __declspec(dllexport)
14 | #else
15 | # define DLL_EXPORT __declspec(dllimport)
16 | #endif
17 |
18 | #endif // MECORE_EXPORT_H
19 |
--------------------------------------------------------------------------------
/src/RigelCore/FileUtils.cpp:
--------------------------------------------------------------------------------
1 | #include "FileUtils.h"
2 |
3 | FileUtils* FileUtils::m_pIns = NULL;
4 |
5 | FileUtils::FileUtils()
6 | {
7 | m_strRoot = "";
8 | }
9 |
10 | FileUtils::~FileUtils()
11 | {
12 |
13 | }
14 |
15 | FileUtils* FileUtils::ins()
16 | {
17 | if (m_pIns == NULL)
18 | {
19 | m_pIns = new FileUtils;
20 | }
21 |
22 | return m_pIns;
23 | }
24 |
25 | void FileUtils::des()
26 | {
27 | delete m_pIns;
28 | }
29 |
30 | void FileUtils::init(const std::string& name)
31 | {
32 | m_strRoot = name;
33 | m_strRoot.append("/");
34 | }
35 |
36 | std::string FileUtils::getPath(const std::string& name)
37 | {
38 | return m_strRoot + name;
39 | }
40 |
--------------------------------------------------------------------------------
/src/RigelCore/FileUtils.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelCore/FileUtils.h
--------------------------------------------------------------------------------
/src/RigelCore/InputLib.cpp:
--------------------------------------------------------------------------------
1 | /*************************************************
2 | // Copyright(C) MEEngine Team
3 | // File name: InputLib.cpp
4 | // Author: ����
5 | // Version: 0.1.0
6 | // Date: 2017-5-11
7 | // Description: ������
8 | // History:
9 | *************************************************/
10 | #ifndef OSGGRAPHICS_INPUTLIB_H
11 | #define OSGGRAPHICS_INPUTLIB_H
12 |
13 | #ifdef _DEBUG
14 | #pragma comment(lib,"OpenThreadsd.lib")
15 | #pragma comment(lib,"osgd.lib")
16 | #pragma comment(lib,"osgDBd.lib")
17 | #pragma comment(lib,"osgGAd.lib")
18 | #pragma comment(lib,"osgViewerd.lib")
19 | #else
20 | #pragma comment(lib,"OpenThreads.lib")
21 | #pragma comment(lib,"osg.lib")
22 | #pragma comment(lib,"osgDB.lib")
23 | #pragma comment(lib,"osgGA.lib")
24 | #pragma comment(lib,"osgViewer.lib")
25 | #endif
26 |
27 | #endif // OSGGRAPHICS_INPUTLIB_H
28 |
--------------------------------------------------------------------------------
/src/RigelCore/SigSlot.cpp:
--------------------------------------------------------------------------------
1 | #include "SigSlot.h"
2 | #include
3 |
4 | SigSlotBase::~SigSlotBase()
5 | {
6 | while(!_bindings.empty()) {
7 | _bindings.front()->unbind();
8 | }
9 | }
10 |
11 | void SigSlotBase::add_binding(const std::shared_ptr& b)
12 | {
13 | _bindings.push_back(b);
14 | }
15 |
16 | void SigSlotBase::erase_binding(const std::shared_ptr& b)
17 | {
18 | auto pos = std::find(_bindings.begin(), _bindings.end(), b);
19 | if(pos == _bindings.end()) {
20 | throw std::runtime_error("Specified binding was not found");
21 | }
22 | _bindings.erase(pos);
23 | }
24 |
25 |
26 |
27 |
28 | Binding::Binding(SigSlotBase* emitter, SigSlotBase* receiver): _emitter(emitter), _receiver(receiver)
29 | {
30 | assert(_emitter != nullptr);
31 | assert(_receiver != nullptr);
32 | }
33 |
34 | Binding::~Binding()
35 | {
36 | unbind();
37 | }
38 |
39 | std::shared_ptr Binding::create(SigSlotBase* em, SigSlotBase* recv)
40 | {
41 | return std::shared_ptr(new Binding(em, recv));
42 | }
43 |
44 | void Binding::unbind()
45 | {
46 | // TODO: Don't unbind on the currently unbinding object (binding -> object -> binding loop)
47 | if(_emitter) {
48 | SigSlotBase* em = _emitter;
49 | _emitter = nullptr;
50 | em->erase_binding(shared_from_this());
51 | }
52 | if(_receiver) {
53 | SigSlotBase* recv = _receiver;
54 | _receiver = nullptr;
55 | recv->erase_binding(shared_from_this());
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/RigelCore/SigSlot.h:
--------------------------------------------------------------------------------
1 | #ifndef SIGNAL_H
2 | #define SIGNAL_H
3 |
4 | #include "Export.h"
5 | #include
6 | #include
7 | #include
8 |
9 | #include
10 | #include
11 |
12 | class Binding;
13 | class SigSlotBase;
14 |
15 |
16 | /*
17 | * @brief Base class for objects wishing to receive signals (i.e. have slots)
18 | */
19 | class DLL_EXPORT SigSlotBase
20 | {
21 | public:
22 | virtual ~SigSlotBase();
23 |
24 | void add_binding(const std::shared_ptr& b);
25 | virtual void erase_binding(const std::shared_ptr& b);
26 | private:
27 | std::list> _bindings;
28 | };
29 |
30 |
31 | class Binding: public std::enable_shared_from_this
32 | {
33 | public:
34 | Binding() = delete;
35 | Binding(const Binding& o) = delete;
36 | virtual ~Binding();
37 |
38 | Binding& operator=(const Binding& other) = delete;
39 |
40 | static std::shared_ptr create(SigSlotBase* em, SigSlotBase* recv);
41 |
42 | void unbind();
43 |
44 | private:
45 | Binding(SigSlotBase* emitter, SigSlotBase* receiver);
46 |
47 | SigSlotBase* _emitter;
48 | SigSlotBase* _receiver;
49 | };
50 |
51 | template
52 | class Signal: public SigSlotBase
53 | {
54 | typedef std::function _Fun;
55 |
56 | typedef std::pair, _Fun> _BindingRef;
57 |
58 | public:
59 | /*
60 | * @brief bind a new slot to this signal
61 | *
62 | * @param slot the method to bind to
63 | * @param inst the instance of the class to bind to
64 | *
65 | * @return void
66 | */
67 | template
68 | void bind(void(_Class::* slot)(_ArgTypes...), _Class* inst)
69 | {
70 | std::shared_ptr binding = Binding::create(this, inst);
71 |
72 | _slots.push_back(_BindingRef(
73 | binding, [=](_ArgTypes... args){return (inst->*slot)(args...);}));
74 |
75 | inst->add_binding(binding);
76 | add_binding(binding);
77 | }
78 |
79 | /*
80 | * @brief Emit the signal
81 | *
82 | * @param args Arguments to the slots
83 | *
84 | * @return void
85 | *
86 | * @see operator()
87 | */
88 | void emit(_ArgTypes... args)
89 | {
90 | for(auto& slot: _slots) {
91 | std::get<1>(slot)(args...);
92 | }
93 | }
94 |
95 |
96 | /*
97 | * @brief Emit the signal
98 | *
99 | * @param args Arguments to the slots
100 | *
101 | * @return void
102 | *
103 | * @see emit
104 | */
105 | void operator()(_ArgTypes... args)
106 | {
107 | emit(args...);
108 | }
109 |
110 | protected:
111 | void disbinding(const std::shared_ptr& b)
112 | {
113 | SigSlotBase::erase_binding(b);
114 |
115 | auto it = std::find_if(_slots.begin(), _slots.end(), [&b](_BindingRef r) -> bool {
116 | return std::get<0>(r) == b;});
117 | _slots.erase(it);
118 | }
119 |
120 | private:
121 | std::list, _Fun>> _slots;
122 | };
123 |
124 |
125 |
126 | #endif /* signal.h */
127 |
--------------------------------------------------------------------------------
/src/RigelCore/Version.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelCore/Version.h
--------------------------------------------------------------------------------
/src/RigelMath/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 |
3 | set(TargetName RigelMath)
4 | string(TOUPPER ${TargetName} TargetNameUP)
5 |
6 | # Find includes in corresponding build directories
7 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
8 |
9 | set(headers
10 | Export.h
11 | MEMath.h
12 | Segment.h
13 | )
14 |
15 | set(sources
16 | InputLib.cpp
17 | MEMath.cpp
18 | Segment.cpp
19 | )
20 |
21 |
22 | # add definitions,unicode and export
23 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP})
24 |
25 | # Set porject filiter
26 | source_group("Header Files" FILES ${headers})
27 |
28 | # Tell CMake to create the helloworld executable
29 | add_library(${TargetName} SHARED ${sources} ${headers})
30 |
31 | target_link_libraries(${TargetName})
32 |
--------------------------------------------------------------------------------
/src/RigelMath/Export.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMath/Export.h
--------------------------------------------------------------------------------
/src/RigelMath/InputLib.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMath/InputLib.cpp
--------------------------------------------------------------------------------
/src/RigelMath/MEMath.cpp:
--------------------------------------------------------------------------------
1 | #include "MEMath.h"
2 | #include
3 |
4 |
5 | MEMath::MEMath()
6 | {
7 | }
8 |
9 |
10 | MEMath::~MEMath()
11 | {
12 | }
13 |
14 | float MEMath::getLength(osg::Vec3Array* source)
15 | {
16 | auto length = 0.0;
17 | if (source == nullptr)
18 | {
19 | return length;
20 | }
21 |
22 | auto iter = source->begin();
23 | auto iterNext = iter + 1;
24 | while (iterNext != source->end())
25 | {
26 | auto line = (*iterNext) - (*iter);
27 | length += line.length();
28 | iter++;
29 | iterNext++;
30 | }
31 | return length;
32 | }
33 |
34 | bool MEMath::intersectSegm(osg::Vec3 posA, osg::Vec3 posB, osg::Vec3 posC, osg::Vec3 posD, osg::Vec3& posInter)
35 | {
36 | double delta = (posB.y() - posA.y())*(posD.x() - posC.x())
37 | - (posA.x() - posB.x())*(posC.y() - posD.y());
38 | if (delta <= (1e-6) && delta >= -(1e-6))
39 | {
40 | return false;
41 | }
42 |
43 | // 线段所在直线的交点坐标 (x , y)
44 | posInter.x() = ((posB.x() - posA.x()) * (posD.x() - posC.x()) * (posC.y() - posA.y())
45 | + (posB.y() - posA.y()) * (posD.x() - posC.x()) * posA.x()
46 | - (posD.y() - posC.y()) * (posB.x() - posA.x()) * posC.x()) / delta;
47 |
48 | posInter.y() = -((posB.y() - posA.y()) * (posD.y() - posC.y()) * (posC.x() - posA.x())
49 | + (posB.x() - posA.x()) * (posD.y() - posC.y()) * posA.y()
50 | - (posD.x() - posC.x()) * (posB.y() - posA.y()) * posC.y()) / delta;
51 |
52 | if (
53 | // 交点在线段1上
54 | (posInter.x() - posA.x()) * (posInter.x() - posB.x()) <= 0
55 | && (posInter.y() - posA.y()) * (posInter.y() - posB.y()) <= 0
56 | // 且交点也在线段2上
57 | && (posInter.x() - posC.x()) * (posInter.x() - posD.x()) <= 0
58 | && (posInter.y() - posC.y()) * (posInter.y() - posD.y()) <= 0)
59 | {
60 | return true;
61 | }
62 | else
63 | {
64 | return false;
65 | }
66 | }
67 |
68 | bool MEMath::intersectLine(osg::Vec3 pos1, osg::Vec3 pos2,
69 | osg::Vec3 pos3, osg::Vec3 pos4, osg::Vec3& posInter)
70 | {
71 | //直线方程组
72 | // Line A:
73 | // x = P1x + (P2x - P1x) * S
74 | // y = P1y + (P2y - P1y) * S
75 | // z = P1z + (P2z - P2z) * S
76 | //
77 | // Line B:
78 | // x = P3x + (P4x - P3x) * T
79 | // y = P3y + (P4y - P3y) * T
80 | // z = P3z + (P4z - P3z) * T
81 |
82 | //T = (P13y*P43x - P43y*P13x) / (P43y*P21x - P43x*P21y)
83 | //两直线已经相交
84 | if (pos1 == pos3 || pos1 == pos4)
85 | {
86 | posInter = pos1;
87 | return true;
88 | }
89 | if (pos2 == pos3 || pos2 == pos3)
90 | {
91 | posInter = pos2;
92 | return true;
93 | }
94 |
95 | float P13x = pos1.x() - pos3.x();
96 | float P13y = pos1.y() - pos3.y();
97 |
98 | float P43x = pos4.x() - pos3.x();
99 | float P43y = pos4.y() - pos3.y();
100 |
101 | float P21x = pos2.x() - pos1.x();
102 | float P21y = pos2.y() - pos1.y();
103 |
104 | float mem = P43x*P13y - P43y*P13x;//分子
105 | float den = P43y*P21x - P43x*P21y;//分母
106 | if (den == 0.0)
107 | {
108 |
109 | return false;
110 | }
111 | else
112 | {
113 | float T = mem / den;
114 | posInter = pos1 + (pos2 - pos1)*T;
115 | return true;
116 | }
117 | }
118 |
119 | bool MEMath::createStripBevel(float radius, osg::Vec3Array* source, osg::Vec3Array* lefts, osg::Vec3Array* rights)
120 | {
121 | osg::Vec3d zero = osg::Vec3d(0.000000001, 0.000000001, 0.000000001);
122 | osg::Vec3Array* vecLine = new osg::Vec3Array;
123 | size_t size = source->size();
124 | if (size < 2)
125 | {
126 | return false;
127 | }
128 |
129 | osg::Vec3 currtVec, nextVec, vertlVec, nextVerl,
130 | normalVec, currtPos, nextPos, lastPos;
131 |
132 | for (size_t i = 0; i < size; i++)
133 | {
134 | if (i == 0)
135 | {
136 | currtPos = source->at(i);
137 | nextPos = source->at(i + 1);
138 | currtVec = nextPos - currtPos;
139 | currtVec.normalize();
140 | vertlVec = currtVec ^ osg::Z_AXIS;
141 | lefts->push_back(source->at(i) - vertlVec * radius);
142 | rights->push_back(source->at(i) + vertlVec * radius);
143 | continue;
144 | }
145 | else if (i == size - 1)
146 | {
147 | currtPos = source->at(i);
148 | lastPos = source->at(i - 1);
149 | currtVec = currtPos - lastPos;
150 | currtVec.normalize();
151 | vertlVec = currtVec ^ osg::Z_AXIS;
152 | lefts->push_back(source->at(i) - vertlVec * radius);
153 | rights->push_back(source->at(i) + vertlVec * radius);
154 | continue;
155 | }
156 | else
157 | {
158 | currtPos = source->at(i);
159 | lastPos = source->at(i - 1);
160 | nextPos = source->at(i + 1);
161 | currtVec = currtPos - lastPos;
162 | nextVec = nextPos - currtPos;
163 | currtVec.normalize();
164 | nextVec.normalize();
165 | vertlVec = currtVec ^ osg::Z_AXIS;
166 | nextVerl = nextVec ^ osg::Z_AXIS;
167 | osg::Vec3 A1, A2, B1, B2, C1, C2, D1, D2;
168 | A1 = lastPos - vertlVec * radius;
169 | A2 = currtPos - vertlVec * radius;
170 | B1 = lastPos + vertlVec * radius;
171 | B2 = currtPos + vertlVec * radius;
172 | C1 = currtPos - nextVerl * radius;
173 | C2 = nextPos - nextVerl * radius;
174 | D1 = currtPos + nextVerl * radius;
175 | D2 = nextPos + nextVerl * radius;
176 |
177 | float offset = 1.0;
178 | osg::Vec3 interA;
179 | bool isInter = intersectSegm(A1, A2, C1, C2, interA);
180 | if (isInter)
181 | {
182 | interA.z() = currtPos.z();
183 | lefts->push_back(interA);
184 | lefts->push_back(interA);
185 | rights->push_back(B2*offset);
186 | rights->push_back(D1*offset);
187 | }
188 | osg::Vec3 interB;
189 | isInter = intersectSegm(B1, B2, D1, D2, interB);
190 | if (isInter)
191 | {
192 | interB.z() = currtPos.z();
193 | rights->push_back(interB);
194 | rights->push_back(interB);
195 | lefts->push_back(A2*offset);
196 | lefts->push_back(C1*offset);
197 | }
198 | }
199 |
200 | }
201 |
202 | if (source->at(0) == source->at(size - 1))
203 | {
204 | osg::Vec3 interA, interB;
205 | bool isInter = intersectSegm(lefts->at(0), lefts->at(1), lefts->at(lefts->size() - 2), lefts->at(lefts->size() - 1), interA);
206 | if (isInter)
207 | {
208 | (*lefts)[0] = interA;
209 | lefts->pop_back();
210 | lefts->push_back(interA);
211 | lefts->push_back(interA);
212 | }
213 | else
214 | {
215 | lefts->push_back(lefts->at(0));
216 | }
217 | isInter = intersectSegm(rights->at(0), rights->at(1), rights->at(rights->size() - 2), rights->at(rights->size() - 1), interB);
218 | if (isInter)
219 | {
220 | (*rights)[0] = interB;
221 | rights->pop_back();
222 | rights->push_back(rights->at(0));
223 | rights->push_back(rights->at(0));
224 | }
225 | else
226 | {
227 | rights->push_back(rights->at(0));
228 | }
229 | }
230 | return true;
231 | }
232 |
233 | bool MEMath::createStripMiter(float radius, osg::Vec3Array* source, osg::Vec3Array* lefts, osg::Vec3Array* rights)
234 | {
235 | osg::Vec3d zero = osg::Vec3d(0.000000001, 0.000000001, 0.000000001);
236 | osg::Vec3Array* vecLine = new osg::Vec3Array;
237 | size_t size = source->size();
238 | if (size < 2)
239 | {
240 | return false;
241 | }
242 |
243 | osg::Vec3 currtVec, nextVec, vertlVec, nextVerl,
244 | normalVec, currtPos, nextPos, lastPos;
245 |
246 | for (size_t i = 0; i < size; i++)
247 | {
248 | if (i == 0)
249 | {
250 | currtPos = source->at(i);
251 | nextPos = source->at(i + 1);
252 | currtVec = nextPos - currtPos;
253 | currtVec.normalize();
254 | vertlVec = currtVec ^ osg::Z_AXIS;
255 | lefts->push_back(source->at(i) - vertlVec * radius);
256 | rights->push_back(source->at(i) + vertlVec * radius);
257 | continue;
258 | }
259 | else if (i == size - 1)
260 | {
261 | currtPos = source->at(i);
262 | lastPos = source->at(i - 1);
263 | currtVec = currtPos - lastPos;
264 | currtVec.normalize();
265 | vertlVec = currtVec ^ osg::Z_AXIS;
266 | lefts->push_back(source->at(i) - vertlVec * radius);
267 | rights->push_back(source->at(i) + vertlVec * radius);
268 | continue;
269 | }
270 | else
271 | {
272 | currtPos = source->at(i);
273 | lastPos = source->at(i - 1);
274 | nextPos = source->at(i + 1);
275 | currtVec = currtPos - lastPos;
276 | nextVec = nextPos - currtPos;
277 | currtVec.normalize();
278 | nextVec.normalize();
279 | vertlVec = currtVec ^ osg::Z_AXIS;
280 | nextVerl = nextVec ^ osg::Z_AXIS;
281 | osg::Vec3 A1, A2, B1, B2, C1, C2, D1, D2;
282 | A1 = lastPos - vertlVec * radius;
283 | A2 = currtPos - vertlVec * radius;
284 | B1 = lastPos + vertlVec * radius;
285 | B2 = currtPos + vertlVec * radius;
286 | C1 = currtPos - nextVerl * radius;
287 | C2 = nextPos - nextVerl * radius;
288 | D1 = currtPos + nextVerl * radius;
289 | D2 = nextPos + nextVerl * radius;
290 |
291 | float offset = 1.0;
292 | osg::Vec3 intersect;
293 | intersectLine(A1, A2, C1, C2, intersect);
294 | lefts->push_back(intersect);
295 | intersectLine(B1, B2, D1, D2, intersect);
296 | rights->push_back(intersect);
297 | continue;
298 | }
299 | }
300 | return true;
301 | }
302 |
303 | osg::Vec2Array* MEMath::calcStripTexCoord(osg::Vec3Array* source)
304 | {
305 | osg::Vec2Array* texCoords = new osg::Vec2Array;
306 | auto count = source->size();
307 | if (count < 2)
308 | {
309 | return texCoords;
310 | }
311 | float _fLength = MEMath::getLength(source);
312 | float theLength = 0.0;
313 | for (size_t i = 0; i < count; i++)
314 | {
315 | if (i == 0)
316 | {
317 | texCoords->push_back(osg::Vec2(0, 0));
318 | texCoords->push_back(osg::Vec2(0, 1));
319 | }
320 | else if ( i == count - 1)
321 | {
322 | texCoords->push_back(osg::Vec2(_fLength/10, 0));
323 | texCoords->push_back(osg::Vec2(_fLength/10, 1));
324 | }
325 | else
326 | {
327 | Segment seg(source->at(i - 1), source->at(i));
328 | float _length = seg.length();
329 | theLength += _length;
330 | texCoords->push_back(osg::Vec2(theLength/10, 0));
331 | texCoords->push_back(osg::Vec2(theLength/10, 1));
332 | }
333 | }
334 | return texCoords;
335 | }
336 |
337 | osg::Vec2Array* MEMath::calcPipeTexCoord(osg::Vec3Array* source, size_t parts)
338 | {
339 | osg::Vec2Array* texCoords = new osg::Vec2Array;
340 | auto count = source->size();
341 | if (count < 2)
342 | {
343 | return texCoords;
344 | }
345 | float deltaV = 1.0 / parts;
346 |
347 | //外层循环控制拐点的遍历
348 | osg::Vec2 uvCoord;
349 | float _length = 0.0;
350 | float S = MEMath::getLength(source);
351 | for (size_t v = 0; v <= parts; v++)
352 | {
353 | size_t index = v;
354 | int mod = v % 2; //判断是否单数行
355 | if (mod)
356 | {
357 | _length = S;
358 | //奇数行
359 | for (int u = count - 1; u >= 0; u--)
360 | {
361 | index = v;
362 | size_t indexN = index + 1;
363 | if (v == parts)
364 | {
365 | indexN = 0;
366 | }
367 | if (u == 0)
368 | {//第一个点的时候u = 0
369 |
370 | uvCoord = osg::Vec2(0, index * deltaV);
371 | texCoords->push_back(uvCoord);
372 | uvCoord = osg::Vec2(0, indexN * deltaV);
373 | texCoords->push_back(uvCoord);
374 | }
375 | else if (u == count - 1)
376 | {//最后一个点的时候u = 总长度
377 | uvCoord = osg::Vec2(S / 10, index * deltaV);
378 | texCoords->push_back(uvCoord);
379 | uvCoord = osg::Vec2(S / 10, indexN * deltaV);
380 | texCoords->push_back(uvCoord);
381 | }
382 | else
383 | {
384 | Segment segment = Segment(source->at(u + 1), source->at(u));
385 | float dis = abs(segment.length());
386 | _length -= dis;
387 | uvCoord = osg::Vec2(_length / 10, index * deltaV);
388 | texCoords->push_back(uvCoord);
389 | uvCoord = osg::Vec2(_length / 10, indexN * deltaV);
390 | texCoords->push_back(uvCoord);
391 | }
392 | }
393 | }
394 | else
395 | {
396 | _length = 0.0;
397 | //偶数行
398 | for (size_t u = 0; u < count; u++)
399 | {
400 | index = v;
401 | size_t indexN = index + 1;
402 | if (v == parts)
403 | {
404 | indexN = 0;
405 | }
406 | if (u == 0)
407 | {//第一个点的时候u = 0
408 | uvCoord = osg::Vec2(0, index * deltaV);
409 | texCoords->push_back(uvCoord);
410 | uvCoord = osg::Vec2(0, indexN * deltaV);
411 | texCoords->push_back(uvCoord);
412 | }
413 | else if (u == count - 1)
414 | {//最后一个点的时候u = 总长度
415 | uvCoord = osg::Vec2(S / 10, index * deltaV);
416 | texCoords->push_back(uvCoord);
417 | uvCoord = osg::Vec2(S / 10, indexN * deltaV);
418 | texCoords->push_back(uvCoord);
419 | }
420 | else
421 | {
422 | Segment segment = Segment(source->at(u), source->at(u - 1));
423 | float dis = abs(segment.length());
424 | _length += dis;
425 | uvCoord = osg::Vec2(_length / 10, index * deltaV);
426 | texCoords->push_back(uvCoord);
427 | uvCoord = osg::Vec2(_length / 10, indexN * deltaV);
428 | texCoords->push_back(uvCoord);
429 | }
430 | }
431 | }
432 | }
433 |
434 | return texCoords;
435 | }
436 |
437 | osg::Vec3Array* MEMath::createPipe(osg::Vec3Array* source, float radius)
438 | {
439 | osg::Vec3Array* vertex = new osg::Vec3Array;
440 | auto count = source->size();
441 | if (count < 2)
442 | {
443 | return nullptr;
444 | }
445 | if (count < 3)
446 | {
447 | for (int i = 0; i < count; i++)
448 | {
449 | size_t parts = radius * 10;
450 | const float angleDelta = 2.0f*osg::PI / radius * 10;
451 | float angle = 0.0f;
452 | for (size_t j = 0; j < parts; ++j, angle += angleDelta)
453 | {
454 | float c = cosf(angle);
455 | float s = sinf(angle);
456 | vertex->push_back(source->at(i) + osg::Vec3(c*radius, s*radius, 0.0f));
457 | }
458 | }
459 | }
460 | else
461 | {
462 | source = BezierCurve(source, 1.0, 10);
463 | count = source->size();
464 | for (int i = 0; i < count; i++)
465 | {
466 | size_t parts = radius * 10;
467 | const float angleDelta = 2.0f*osg::PI / radius * 10;
468 | float angle = 0.0f;
469 | for (size_t j = 0; j < parts; ++j, angle += angleDelta)
470 | {
471 | float c = cosf(angle);
472 | float s = sinf(angle);
473 | vertex->push_back(source->at(j) + osg::Vec3(c*radius, s*radius, 0.0f));
474 | }
475 | }
476 | }
477 | return vertex;
478 | }
479 |
480 | osg::Vec3Array* MEMath::BezierCurve(osg::Vec3Array* vertexs, float radius, size_t parts)
481 | {
482 | auto controlPoints = new osg::Vec3Array;
483 | auto resultCurve = new osg::Vec3Array;
484 |
485 | auto countP = vertexs->size();
486 | if (countP < 3)
487 | {
488 | auto iter = resultCurve->end();
489 | resultCurve->insert(iter, vertexs->begin(), vertexs->end());
490 | return resultCurve;
491 | }
492 |
493 | //计算控制点
494 | for (int i = 1; i < countP; i++)
495 | {
496 | Segment segPP0(vertexs->at(i - 1), vertexs->at(i));
497 | float length = segPP0.length();
498 | float pp0Scale = radius/length;
499 | if (i == 1)
500 | {
501 | controlPoints->push_back(segPP0.vector() * (1 - pp0Scale) + vertexs->at(i - 1));
502 | }
503 | else if (i == countP - 1)
504 | {
505 | if (pp0Scale >= radius)
506 | {
507 | controlPoints->push_back(segPP0.vector() * pp0Scale + vertexs->at(i - 1));
508 | continue;
509 | }
510 | controlPoints->push_back(segPP0.vector() * pp0Scale + vertexs->at(i - 1));
511 | }
512 | else
513 | {
514 |
515 | controlPoints->push_back(segPP0.vector() * pp0Scale + vertexs->at(i - 1));
516 | controlPoints->push_back(segPP0.vector() * (1 - pp0Scale) + vertexs->at(i - 1));
517 | }
518 | }
519 |
520 | //进行插值
521 | for (int i = 0, j = 0; i < countP; i ++)
522 | {
523 | //第一个点和最后一个点都直接添加不插值
524 | if (i == 0 || i == countP - 1)
525 | {
526 | resultCurve->push_back(vertexs->at(i));
527 | }
528 | else
529 | {
530 | // P0
531 | // |
532 | // |
533 | // |
534 | // ↓-----------→ P1
535 | // P
536 | // B(t) = (1-t)²*P0 + 2t*(1-t)P + t²*P1, t = [0, 1]
537 | osg::Vec3 P0, P, P1;
538 | P0 = controlPoints->at(j);
539 | P = vertexs->at(i);
540 | P1 = controlPoints->at(j + 1);
541 |
542 | auto delta = 1.0 / parts;
543 | for (int n = 0; n <= parts; n++)
544 | {
545 | auto t = n * delta;
546 | float flag = 1 - t;
547 | osg::Vec3 pos;
548 | pos = P0*pow(flag, 2) + P * 2*t*flag + P1*pow(t, 2);
549 | resultCurve->push_back(pos);
550 | }
551 | j += 2;
552 | }
553 | }
554 | return resultCurve;
555 | }
556 |
557 | osg::Vec3Array* MEMath::createCircle(osg::Vec3 center, float radius, osg::Vec3 upDir, size_t parts /*= 10*/)
558 | {
559 | osg::ref_ptr points = new osg::Vec3Array;
560 | const float angleDelta = 2.0f*osg::PI / parts;
561 | float angle = 0.0f;
562 | for (size_t j = 0; j < parts; ++j, angle += angleDelta)
563 | {
564 | float _x = cosf(angle);
565 | float _y = sinf(angle);
566 | osg::Matrix matrix;
567 | matrix.makeRotate(osg::Z_AXIS, upDir);
568 | osg::Vec3 pos = osg::Vec3(_x*radius, _y*radius, 0.0f);
569 | pos = pos * matrix;
570 | pos += center;
571 | points->push_back(pos);
572 | }
573 | return points.release();
574 | }
575 |
--------------------------------------------------------------------------------
/src/RigelMath/MEMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMath/MEMath.h
--------------------------------------------------------------------------------
/src/RigelMath/Segment.cpp:
--------------------------------------------------------------------------------
1 | #include "Segment.h"
2 |
3 | Segment::Segment(osg::Vec3 start, osg::Vec3 end)
4 | :m_startPos(start), m_endPos(end)
5 | {
6 |
7 | }
8 |
9 |
10 | Segment::Segment()
11 | {
12 |
13 | }
14 |
15 | Segment::~Segment()
16 | {
17 | }
18 |
19 | osg::Vec3 Segment::dir()
20 | {
21 | auto _dir = m_endPos - m_startPos;
22 | _dir.normalize();
23 | return _dir;
24 | }
25 |
26 | osg::Vec3 Segment::vector()
27 | {
28 | auto _dir = m_endPos - m_startPos;
29 | return _dir;
30 | }
31 |
32 | float Segment::length()
33 | {
34 | auto _dir = m_endPos - m_startPos;;
35 | return _dir.length();
36 | }
37 |
38 | void Segment::setStart(const osg::Vec3& start)
39 | {
40 | m_startPos = start;
41 | }
42 |
43 | void Segment::setEnd(const osg::Vec3& end)
44 | {
45 | m_endPos = end;
46 | }
47 |
--------------------------------------------------------------------------------
/src/RigelMath/Segment.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMath/Segment.h
--------------------------------------------------------------------------------
/src/RigelMessage/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 | set(TargetName RigelMessage)
3 | string(TOUPPER ${TargetName} TargetNameUP)
4 |
5 | # Find includes in corresponding build directories
6 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
7 |
8 | set(headers
9 | Export.h
10 | )
11 |
12 | set(sources
13 | InputLib.cpp
14 | )
15 |
16 | # add definitions,unicode and export
17 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP}_EXPORTS)
18 |
19 | # Set porject filiter
20 | source_group("Header Files" FILES ${headers})
21 |
22 | # Tell CMake to create the helloworld executable
23 | add_library(${TargetName} SHARED ${sources} ${headers})
24 |
25 | target_link_libraries(${TargetName})
26 |
--------------------------------------------------------------------------------
/src/RigelMessage/Export.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMessage/Export.h
--------------------------------------------------------------------------------
/src/RigelMessage/InputLib.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelMessage/InputLib.cpp
--------------------------------------------------------------------------------
/src/RigelModel/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 |
3 | set(TargetName RigelModel)
4 | string(TOUPPER ${TargetName} TargetNameUP)
5 |
6 | # Find includes in corresponding build directories
7 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
8 |
9 | set(headers
10 | Export.h
11 |
12 | )
13 |
14 | set(sources
15 | InputLib.cpp
16 | )
17 |
18 | set(Geometry
19 | Style.h
20 | Style.cpp
21 | GeometryBase.h
22 | GeometryFloor.h
23 | GeometryStrip.h
24 | GeometryLine.h
25 | GeometryPipe.h
26 |
27 | GeometryPolygon.h
28 | GeometryBase.cpp
29 | GeometryFloor.cpp
30 | GeometryStrip.cpp
31 | GeometryLine.cpp
32 | GeometryPolygon.cpp
33 | GeometryPipe.cpp
34 | )
35 |
36 | # add definitions,unicode and export
37 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP})
38 |
39 | # Set porject filiter
40 | source_group("Header Files" FILES ${headers})
41 | source_group("Geometry" FILES ${Geometry})
42 |
43 | # Tell CMake to create the helloworld executable
44 | add_library(${TargetName} SHARED ${sources} ${headers} ${Geometry})
45 |
46 | # Add dependncies
47 | add_dependencies(${TargetName} RigelMath)
48 |
49 | target_link_libraries(${TargetName} RigelMath)
50 |
--------------------------------------------------------------------------------
/src/RigelModel/Export.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/Export.h
--------------------------------------------------------------------------------
/src/RigelModel/GeometryBase.cpp:
--------------------------------------------------------------------------------
1 | #include "GeometryBase.h"
2 | #include
3 |
4 | GeometryBase::GeometryBase(void)
5 | {
6 | m_pColorArray = NULL;
7 | m_pVertexArray = NULL;
8 | m_pNormalArray = NULL;
9 | m_pTextureArray = NULL;
10 | m_pStateSet = NULL;
11 | m_pTexture2D = new osg::Texture2D;
12 | setDataVariance(osg::Object::DYNAMIC);
13 | init();
14 | }
15 |
16 | GeometryBase::~GeometryBase(void)
17 | {
18 | m_pVertexArray = NULL;
19 | m_pColorArray = NULL;
20 | m_pNormalArray = NULL;
21 | m_pTextureArray = NULL;
22 | m_pStateSet = NULL;
23 | m_pSouceArray = NULL;
24 | }
25 |
26 | void GeometryBase::addPoint(const osg::Vec3 &pos)
27 | {
28 | m_pSouceArray->push_back(pos);
29 | updateGeomtry();
30 | }
31 |
32 | void GeometryBase::setPoint(size_t index, const osg::Vec3 &pos)
33 | {
34 | if (pos == osg::Vec3())
35 | {
36 | std::cout<<"add the null point"<size();
39 | if (size > index)
40 | {
41 | (*m_pSouceArray)[index] = pos;
42 | }
43 | else
44 | {
45 | m_pSouceArray->resize(index + 1);
46 | (*m_pSouceArray)[index] = pos;
47 | }
48 | updateGeomtry();
49 | }
50 |
51 |
52 | osg::Vec3 GeometryBase::firstPoint()
53 | {
54 | if (m_pSouceArray != NULL)
55 | {
56 | if (m_pSouceArray->size() > 0)
57 | {
58 | return m_pSouceArray->at(0);
59 | }
60 | return osg::Vec3d();
61 | }
62 | else
63 | {
64 | return osg::Vec3d();
65 | }
66 | }
67 |
68 | void GeometryBase::init()
69 | {
70 | m_pVertexArray = new osg::Vec3Array;
71 | m_pVertexArray->clear();
72 | m_pColorArray = new osg::Vec4Array;
73 | m_pColorArray->clear();
74 | m_pNormalArray = new osg::Vec3Array;
75 | m_pNormalArray->push_back(osg::Z_AXIS);
76 | m_pTextureArray = new osg::Vec2Array;
77 | m_pStateSet = getOrCreateStateSet();
78 | m_pSouceArray = new osg::Vec3Array;
79 | setVertexArray(m_pVertexArray);
80 | setColorArray(m_pColorArray, osg::Array::BIND_OVERALL);
81 | setNormalArray(m_pNormalArray, osg::Array::BIND_OVERALL);
82 | setTexCoordArray(0, m_pTextureArray, osg::Array::BIND_PER_VERTEX);
83 | setUseVertexBufferObjects(true);
84 | setUseDisplayList(false);
85 | }
86 |
87 | size_t GeometryBase::pointSize()
88 | {
89 | if (m_pSouceArray != NULL)
90 | {
91 | return m_pSouceArray->size();
92 | }
93 | return 0.0;
94 | }
95 |
96 | osg::Vec3 GeometryBase::atPoint(size_t index)
97 | {
98 | return m_pVertexArray->at(index);
99 | }
100 |
101 | osg::Vec3 GeometryBase::lastPoint()
102 | {
103 | return m_pSouceArray->back();
104 | }
105 |
106 | void GeometryBase::setTexture(std::string path)
107 | {
108 | osg::ref_ptr image = osgDB::readImageFile(path);
109 | osg::ref_ptr texture = new osg::Texture2D;
110 | texture->setImage(image);
111 | texture->setInternalFormat(GL_RGBA);
112 | texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
113 | //texture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);
114 | texture->setWrap(osg::Texture2D::WRAP_S, osg::Texture2D::REPEAT);
115 | //texture->setWrap(osg::Texture2D::WRAP_T, osg::Texture2D::REPEAT);
116 | getOrCreateStateSet()->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON);
117 | getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);
118 | }
119 |
120 | void GeometryBase::setVertexs(osg::Vec3Array* array)
121 | {
122 | m_pSouceArray = array;
123 | updateGeomtry();
124 | }
125 |
126 | osg::Vec3Array* GeometryBase::getSouceArray()
127 | {
128 | return m_pSouceArray;
129 | }
130 |
131 | void GeometryBase::addTexture(int index, std::string path)
132 | {
133 | osg::ref_ptr image = osgDB::readImageFile(path);
134 | osg::ref_ptr texture = new osg::Texture2D;
135 | texture->setImage(image);
136 | texture->setInternalFormat(GL_RGBA);
137 | texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
138 | texture->setWrap(osg::Texture2D::WRAP_S, osg::Texture2D::REPEAT);
139 | getOrCreateStateSet()->setTextureAttributeAndModes(index, texture.get(), osg::StateAttribute::ON);
140 | texture.release();
141 | }
142 |
--------------------------------------------------------------------------------
/src/RigelModel/GeometryBase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryBase.h
--------------------------------------------------------------------------------
/src/RigelModel/GeometryFloor.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryFloor.cpp
--------------------------------------------------------------------------------
/src/RigelModel/GeometryFloor.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryFloor.h
--------------------------------------------------------------------------------
/src/RigelModel/GeometryLine.cpp:
--------------------------------------------------------------------------------
1 | #include "GeometryLine.h"
2 | #include
3 |
4 | GeometryLine::GeometryLine(void)
5 | {
6 | setName("GeometryLine");
7 | }
8 |
9 | GeometryLine::GeometryLine(osg::Vec3Array* array)
10 | {
11 | setName("GeometryLine");
12 | m_pSouceArray = array;
13 | updateStyle();
14 | updateGeomtry();
15 | }
16 |
17 | GeometryLine::~GeometryLine(void)
18 | {
19 | }
20 |
21 | void GeometryLine::updateStyle()
22 | {
23 | m_pColorArray->push_back(m_color);
24 | setColorBinding(Geometry::BIND_OVERALL);
25 | // m_pNormalArray->push_back(osg::Z_AXIS);
26 | // setNormalArray(m_pNormalArray, osg::Array::Binding::BIND_OVERALL);
27 | m_pStateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF |
28 | osg::StateAttribute::PROTECTED);
29 | m_pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON |
30 | osg::StateAttribute::PROTECTED);
31 | m_pStateSet->setRenderBinDetails(10, "RenderBin");
32 | m_pStateSet->setAttributeAndModes(new osg::LineWidth(m_numWidth), osg::StateAttribute::ON);
33 | }
34 |
35 | void GeometryLine::updateGeomtry()
36 | {
37 | m_pVertexArray = m_pSouceArray;
38 | float size = this->getNumPrimitiveSets();
39 | removePrimitiveSet(0, size);
40 | addPrimitiveSet(new osg::DrawArrays(
41 | osg::PrimitiveSet::LINES, 0, m_pVertexArray->size()));
42 | m_pVertexArray->dirty();
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/src/RigelModel/GeometryLine.h:
--------------------------------------------------------------------------------
1 | #ifndef GEOMETRYLINE_H
2 | #define GEOMETRYLINE_H
3 | #include "Export.h"
4 | #include
5 |
6 | class DLL_EXPORT GeometryLine : public GeometryBase , public StyleBase
7 | {
8 | public:
9 | GeometryLine(void);
10 | GeometryLine(osg::Vec3Array* array);
11 | ~GeometryLine(void);
12 |
13 | private:
14 | void updateStyle();
15 |
16 | void updateGeomtry();
17 |
18 | };
19 |
20 | #endif//GEOMETRYLINE_H
--------------------------------------------------------------------------------
/src/RigelModel/GeometryPipe.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryPipe.cpp
--------------------------------------------------------------------------------
/src/RigelModel/GeometryPipe.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryPipe.h
--------------------------------------------------------------------------------
/src/RigelModel/GeometryPolygon.cpp:
--------------------------------------------------------------------------------
1 | #include "GeometryPolygon.h"
2 | #include
3 | #include
4 | #include
5 |
6 | GeometryPolygon::GeometryPolygon(void)
7 | {
8 | setName("GeometryPolygon");
9 | }
10 |
11 | GeometryPolygon::~GeometryPolygon(void)
12 | {
13 | }
14 |
15 | void GeometryPolygon::updateStyle()
16 | {
17 | m_pColorArray->push_back(m_color);
18 | setColorBinding(Geometry::BIND_OVERALL);
19 | m_pStateSet->setRenderBinDetails(10, "RenderBin");
20 | m_pStateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF |
21 | osg::StateAttribute::PROTECTED);
22 | m_pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON |
23 | osg::StateAttribute::PROTECTED);
24 | osg::PolygonOffset *offset = new osg::PolygonOffset;
25 | offset->setFactor(1.0);
26 | offset->setUnits(1.0);
27 | m_pStateSet->setAttributeAndModes(offset);
28 |
29 | }
30 |
31 | void GeometryPolygon::updateGeomtry()
32 | {
33 | m_pVertexArray->clear();
34 | if (m_pSouceArray->size() < 2)
35 | {
36 | return;
37 | }
38 | m_pVertexArray->insert(m_pVertexArray->begin(), m_pSouceArray->begin(), m_pSouceArray->end());
39 | m_pVertexArray->insert(m_pVertexArray->end(), *m_pSouceArray->begin());
40 | m_pTextureArray->clear();
41 | float size = this->getNumPrimitiveSets();
42 | removePrimitiveSet(0,size);
43 | setTexCoordArray(0, m_pTextureArray);
44 | osgUtil::Tessellator tessellator;
45 | tessellator.retessellatePolygons(*this);
46 | addPrimitiveSet(new osg::DrawArrays(
47 | osg::PrimitiveSet::POLYGON, 0, m_pVertexArray->size()));
48 | m_pVertexArray->dirty();
49 | }
50 |
--------------------------------------------------------------------------------
/src/RigelModel/GeometryPolygon.h:
--------------------------------------------------------------------------------
1 | #ifndef GEOMETRYPOLYGON_H
2 | #define GEOMETRYPOLYGON_H
3 | #include "Export.h"
4 | #include
5 | #include
6 |
7 | class DLL_EXPORT GeometryPolygon : public GeometryBase, public StyleBase
8 | {
9 | public:
10 | GeometryPolygon(void);
11 | ~GeometryPolygon(void);
12 |
13 | void updateStyle();
14 |
15 | void updateGeomtry();
16 |
17 | };
18 |
19 | #endif//GEOMETRYPOLYGON_H
--------------------------------------------------------------------------------
/src/RigelModel/GeometryStrip.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/GeometryStrip.cpp
--------------------------------------------------------------------------------
/src/RigelModel/GeometryStrip.h:
--------------------------------------------------------------------------------
1 | #ifndef GEOMETRYSTRIP_H
2 | #define GEOMETRYSTRIP_H
3 |
4 | #include "Export.h"
5 | #include
6 | #include
7 | #include
8 |
9 | class DLL_EXPORT GeometryStrip : public GeometryBase, public StyleBase
10 | {
11 | public:
12 | GeometryStrip(void);
13 |
14 | GeometryStrip(osg::Vec3Array* vertexs);
15 |
16 | virtual ~GeometryStrip(void);
17 |
18 | private:
19 | void updateStyle();
20 |
21 | void updateGeomtry();
22 |
23 | void createStrip();
24 |
25 | private:
26 | osg::ref_ptr m_pLefts;
27 | osg::ref_ptr m_pRights;
28 | osg::ref_ptr m_pTempArray;
29 | };
30 |
31 | #endif//GEOMETRYSTRIP_H
--------------------------------------------------------------------------------
/src/RigelModel/InputLib.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelModel/InputLib.cpp
--------------------------------------------------------------------------------
/src/RigelModel/Style.cpp:
--------------------------------------------------------------------------------
1 | #include "Style.h"
2 |
3 | StyleBase::StyleBase(void)
4 | {
5 | m_numWidth = 1.0;
6 | }
7 |
8 | StyleBase::~StyleBase(void)
9 | {
10 | }
11 |
12 | void StyleBase::setColor(const osg::Vec4 color)
13 | {
14 | m_color = color;
15 | updateStyle();
16 | }
17 |
18 | void StyleBase::setWidth(float width)
19 | {
20 | m_numWidth = width;
21 | updateStyle();
22 | }
23 |
24 | TextStyle::TextStyle()
25 | {
26 |
27 | }
28 |
29 | TextStyle::~TextStyle()
30 | {
31 |
32 | }
33 |
34 | void TextStyle::setFont(std::string filePath)
35 | {
36 | m_strTextFont = filePath;
37 | updateStyle();
38 | }
39 |
40 | BoxStyle::BoxStyle(void)
41 | {
42 | m_numHeight = 3.0;
43 | }
44 |
45 | BoxStyle::~BoxStyle(void)
46 | {
47 | }
48 |
49 | void BoxStyle::setHeight(float height)
50 | {
51 | m_numHeight = height;
52 | updateStyle();
53 | }
54 |
55 | void BoxStyle::setLenth(float length)
56 | {
57 | m_numLength = length;
58 | updateStyle();
59 | }
60 |
--------------------------------------------------------------------------------
/src/RigelModel/Style.h:
--------------------------------------------------------------------------------
1 | #ifndef STYLE_H
2 | #define STYLE_H
3 | #include "Export.h"
4 | #include
5 | #include
6 |
7 | class DLL_EXPORT StyleBase
8 | {
9 | public:
10 | StyleBase(void);
11 | ~StyleBase(void);
12 |
13 | void setColor(const osg::Vec4 color);
14 |
15 | void setWidth(float width);
16 |
17 | protected:
18 | virtual void updateStyle() = 0;
19 |
20 | protected:
21 | float m_numWidth;
22 | osg::Vec4 m_color;
23 | };
24 |
25 | class TextStyle : public StyleBase
26 | {
27 | public:
28 | TextStyle();
29 | ~TextStyle();
30 |
31 | void setFont(std::string filePath);
32 |
33 | protected:
34 | std::string m_strTextFont;
35 | };
36 |
37 | class BoxStyle : public StyleBase
38 | {
39 | public:
40 | BoxStyle(void);
41 | ~BoxStyle(void);
42 |
43 | void setHeight(float height);
44 |
45 | void setLenth(float length);
46 | protected:
47 | float m_numHeight;
48 | float m_numLength;
49 | };
50 |
51 | #endif//STYLE_H
52 |
--------------------------------------------------------------------------------
/src/RigelQt/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Set porject name
2 | set(TargetName RigelQt)
3 | string(TOUPPER ${TargetName} TargetNameUP)
4 |
5 | # Find includes in corresponding build directories
6 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
7 |
8 | # Find the Qt librarys
9 | find_package(Qt5Core)
10 | find_package(Qt5Gui)
11 | find_package(Qt5Widgets)
12 | find_package(Qt5Quick)
13 | find_package(Qt5Qml)
14 |
15 | # Find all Files
16 | set(qrcs ${TargetName}.qrc)
17 |
18 | set(forms )
19 |
20 | set(headers
21 | Export.h
22 | OSGWidget.h
23 | DialogBase.h
24 | GraphicsView.h
25 | EventAdapter.h
26 | OSGView.h
27 | )
28 |
29 | set(sources
30 | DialogBase.cpp
31 | OSGWidget.cpp
32 | GraphicsView.cpp
33 | EventAdapter.cpp
34 | OSGView.cpp
35 | )
36 |
37 | # Qt warp files
38 | qt5_wrap_ui(Forms_Ui ${forms})
39 | qt5_wrap_cpp(Headers_Moc ${headers})
40 | qt5_add_resources(Res_Qrc ${qrcs})
41 |
42 | # add definitions,unicode and export
43 | add_definitions(-DUNICODE -D_UNICODE -D${TargetNameUP})
44 |
45 | # Set porject filiter
46 | source_group("Header Files" FILES ${headers})
47 | source_group("Form Files" FILES ${forms})
48 | source_group("Resource Files" FILES ${qrcs})
49 | source_group("Generated Files" FILES ${Forms_Ui} ${Headers_Moc} ${Res_Qrc})
50 |
51 | # Tell CMake to create the helloworld executable
52 | add_library(${TargetName} SHARED ${sources} ${Forms_Ui} ${Headers_Moc} ${Res_Qrc} ${headers})
53 |
54 | # Use the Widgets module from Qt 5.
55 | target_link_libraries(${TargetName} Qt5::Qml Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Quick
56 | osg osgGA osgViewer)
57 |
--------------------------------------------------------------------------------
/src/RigelQt/DialogBase.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/DialogBase.cpp
--------------------------------------------------------------------------------
/src/RigelQt/DialogBase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/DialogBase.h
--------------------------------------------------------------------------------
/src/RigelQt/EventAdapter.cpp:
--------------------------------------------------------------------------------
1 | #include "EventAdapter.h"
2 | #include
3 |
4 | EventAdapter::EventAdapter()
5 | {
6 |
7 | }
8 |
9 | EventAdapter::~EventAdapter()
10 | {
11 |
12 | }
13 |
14 | // bool EventAdapter::viewportEvent(QEvent* event)
15 | // {
16 | // switch (event->type())
17 | // {
18 | // case QEvent::TouchBegin:
19 | // {
20 | // QList touchPoints = static_cast(event)->touchPoints();
21 | // unsigned int id = 0;
22 | // osg::ref_ptr osgEvent(NULL);
23 | // foreach(const QTouchEvent::TouchPoint& touchPoint, touchPoints)
24 | // {
25 | // QList listItems = items(mapToScene(touchPoint.pos().x(), touchPoint.pos().y()).toPoint());
26 | // if (listItems.size() > 0)
27 | // {
28 | // return true;
29 | // }
30 | // unsigned int tap_count = touchPoints.size();
31 | // if (!osgEvent)
32 | // {
33 | // osgEvent = m_pGraphicsWindow->getEventQueue()->touchBegan(id, osgGA::GUIEventAdapter::TOUCH_BEGAN, touchPoint.pos().x(), touchPoint.pos().y());
34 | // }
35 | // else
36 | // {
37 | // osgEvent->addTouchPoint(id, osgGA::GUIEventAdapter::TOUCH_BEGAN, touchPoint.pos().x(), touchPoint.pos().y());
38 | // }
39 | // id++;
40 | // }
41 | // }
42 | // break;
43 | // case QEvent::TouchEnd:
44 | // {
45 | // QList touchPoints = static_cast(event)->touchPoints();
46 | // unsigned int id = 0;
47 | // osg::ref_ptr osgEvent(NULL);
48 | // foreach(const QTouchEvent::TouchPoint& touchPoint, touchPoints)
49 | // {
50 | // QList listItems = items(mapToScene(touchPoint.pos().x(), touchPoint.pos().y()).toPoint());
51 | // if (listItems.size() > 0)
52 | // {
53 | // return true;
54 | // }
55 | // unsigned int tap_count = touchPoints.size();
56 | // if (!osgEvent)
57 | // {
58 | // osgEvent = m_pGraphicsWindow->getEventQueue()->touchEnded(id, osgGA::GUIEventAdapter::TOUCH_ENDED, touchPoint.pos().x(), touchPoint.pos().y(), tap_count);
59 | // }
60 | // else
61 | // {
62 | // osgEvent->addTouchPoint(id, osgGA::GUIEventAdapter::TOUCH_ENDED, touchPoint.pos().x(), touchPoint.pos().y());
63 | // }
64 | // id++;
65 | // }
66 | // }
67 | // break;
68 | // case QEvent::TouchUpdate:
69 | // {
70 | // QList touchPoints = static_cast(event)->touchPoints();
71 | // unsigned int id = 0;
72 | // osg::ref_ptr osgEvent(NULL);
73 | // foreach(const QTouchEvent::TouchPoint& touchPoint, touchPoints)
74 | // {
75 | // QList listItems = items(mapToScene(touchPoint.pos().x(), touchPoint.pos().y()).toPoint());
76 | // if (listItems.size() > 0)
77 | // {
78 | // return true;
79 | // }
80 | // unsigned int tap_count = touchPoints.size();
81 | // if (!osgEvent)
82 | // {
83 | // osgEvent = m_pGraphicsWindow->getEventQueue()->touchMoved(id, osgGA::GUIEventAdapter::TOUCH_MOVED, touchPoint.pos().x(), touchPoint.pos().y());
84 | // }
85 | // else
86 | // {
87 | // osgEvent->addTouchPoint(id, osgGA::GUIEventAdapter::TOUCH_MOVED, touchPoint.pos().x(), touchPoint.pos().y());
88 | // }
89 | // id++;
90 | // }
91 | // }
92 | // break;
93 | // default:
94 | // break;
95 | // //return QGraphicsView::viewportEvent(event);
96 | // }
97 | // return true;
98 | // }
99 |
100 | void EventAdapter::setKeyboardModifiers(QInputEvent* event)
101 | {
102 | int modkey = event->modifiers() & (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier);
103 | unsigned int mask = 0;
104 | if (modkey & Qt::ShiftModifier) mask |= osgGA::GUIEventAdapter::MODKEY_SHIFT;
105 | if (modkey & Qt::ControlModifier) mask |= osgGA::GUIEventAdapter::MODKEY_CTRL;
106 | if (modkey & Qt::AltModifier) mask |= osgGA::GUIEventAdapter::MODKEY_ALT;
107 |
108 | m_pGraphicsWindow->getEventQueue()->getCurrentEventState()->setModKeyMask(mask);
109 | }
110 |
111 | void EventAdapter::keyPressEvent(QKeyEvent* event)
112 | {
113 | QPoint pos = QCursor::pos();
114 | QList listItems = items(mapToScene(pos.x(), pos.y()).toPoint());
115 | if (listItems.size() <= 0)
116 | {
117 | setKeyboardModifiers(event);
118 | m_pGraphicsWindow->getEventQueue()->keyPress(
119 | (osgGA::GUIEventAdapter::KeySymbol)*(event->text().toStdString().data()));
120 | }
121 |
122 | QGraphicsView::keyPressEvent(event);
123 | }
124 |
125 | void EventAdapter::keyReleaseEvent(QKeyEvent* event)
126 | {
127 | setKeyboardModifiers(event);
128 | m_pGraphicsWindow->getEventQueue()->keyRelease(
129 | (osgGA::GUIEventAdapter::KeySymbol)*(event->text().toStdString().data()));
130 |
131 | QGraphicsView::keyReleaseEvent(event);
132 | }
133 |
134 | void EventAdapter::mousePressEvent(QMouseEvent* event)
135 | {
136 | QPoint pos = event->pos();
137 | QList listItems = items(mapToScene(pos.x(), pos.y()).toPoint());
138 | if (listItems.size() > 0)
139 | {
140 | QGraphicsView::mousePressEvent(event);
141 | }
142 | else
143 | {
144 | int button = 0;
145 | switch (event->button())
146 | {
147 | case Qt::LeftButton: button = 1; break;
148 | case Qt::MidButton: button = 2; break;
149 | case Qt::RightButton: button = 3; break;
150 | case Qt::NoButton: button = 0; break;
151 | default: button = 0; break;
152 | }
153 | setKeyboardModifiers(event);
154 | m_pGraphicsWindow->getEventQueue()->mouseButtonPress(event->x(), event->y(), button);
155 | }
156 | }
157 |
158 | void EventAdapter::mouseReleaseEvent(QMouseEvent* event)
159 | {
160 | int button = 0;
161 | switch (event->button())
162 | {
163 | case Qt::LeftButton: button = 1; break;
164 | case Qt::MidButton: button = 2; break;
165 | case Qt::RightButton: button = 3; break;
166 | case Qt::NoButton: button = 0; break;
167 | default: button = 0; break;
168 | }
169 | setKeyboardModifiers(event);
170 | m_pGraphicsWindow->getEventQueue()->mouseButtonRelease(event->x(), event->y(), button);
171 |
172 | QGraphicsView::mouseReleaseEvent(event);
173 | }
174 |
175 | void EventAdapter::mouseDoubleClickEvent(QMouseEvent* event)
176 | {
177 | QPoint pos = QCursor::pos();
178 | QList listItems = items(mapToScene(pos.x(), pos.y()).toPoint());
179 | if (listItems.size() > 0)
180 | {
181 | return;
182 | }
183 |
184 | int button = 0;
185 | switch (event->button())
186 | {
187 | case Qt::LeftButton: button = 1; break;
188 | case Qt::MidButton: button = 2; break;
189 | case Qt::RightButton: button = 3; break;
190 | case Qt::NoButton: button = 0; break;
191 | default: button = 0; break;
192 | }
193 | setKeyboardModifiers(event);
194 | m_pGraphicsWindow->getEventQueue()->mouseDoubleButtonPress(event->x(), event->y(), button);
195 |
196 | QGraphicsView::mouseDoubleClickEvent(event);
197 | }
198 |
199 | void EventAdapter::mouseMoveEvent(QMouseEvent* event)
200 | {
201 | setKeyboardModifiers(event);
202 | m_pGraphicsWindow->getEventQueue()->mouseMotion(event->x(), event->y());
203 |
204 | QGraphicsView::mouseMoveEvent(event);
205 | }
206 |
207 | void EventAdapter::wheelEvent(QWheelEvent* event)
208 | {
209 | setKeyboardModifiers(event);
210 | m_pGraphicsWindow->getEventQueue()->mouseScroll(
211 | event->orientation() == Qt::Vertical ?
212 | (event->delta() > 0 ? osgGA::GUIEventAdapter::SCROLL_UP : osgGA::GUIEventAdapter::SCROLL_DOWN) :
213 | (event->delta() > 0 ? osgGA::GUIEventAdapter::SCROLL_LEFT : osgGA::GUIEventAdapter::SCROLL_RIGHT));
214 |
215 | QGraphicsView::wheelEvent(event);
216 | }
217 |
218 | void EventAdapter::resizeEvent(QResizeEvent *event)
219 | {
220 | if (scene())
221 | {
222 | scene()->setSceneRect(QRect(QPoint(0, 0), event->size()));
223 | }
224 |
225 | const QSize& size = event->size();
226 | m_pGraphicsWindow->resized(x(), y(), size.width(), size.height());
227 | m_pGraphicsWindow->getEventQueue()->windowResize(x(), y(), size.width(), size.height());
228 | m_pGraphicsWindow->requestRedraw();
229 |
230 | const QSize& oldSize = event->oldSize();
231 | int oldWidth = oldSize.width();
232 | int oldHeight = oldSize.height();
233 |
234 | int newWidth = size.width();
235 | int newHeight = size.height();
236 |
237 | double widthChangeRatio = double(newWidth) / double(oldWidth);
238 | double heigtChangeRatio = double(newHeight) / double(oldHeight);
239 | double aspectRatioChange = widthChangeRatio / heigtChangeRatio;
240 |
241 | QGraphicsView::resizeEvent(event);
242 | }
243 |
244 | void EventAdapter::moveEvent(QMoveEvent* event)
245 | {
246 | const QPoint& pos = event->pos();
247 | m_pGraphicsWindow->resized(pos.x(), pos.y(), width(), height());
248 | m_pGraphicsWindow->getEventQueue()->windowResize(pos.x(), pos.y(), width(), height());
249 |
250 | QGraphicsView::moveEvent(event);
251 | }
252 |
253 | void EventAdapter::timerEvent(QTimerEvent *event)
254 | {
255 | scene()->update();
256 | }
257 |
--------------------------------------------------------------------------------
/src/RigelQt/EventAdapter.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/EventAdapter.h
--------------------------------------------------------------------------------
/src/RigelQt/Export.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/Export.h
--------------------------------------------------------------------------------
/src/RigelQt/GraphicsView.cpp:
--------------------------------------------------------------------------------
1 | #include "graphicsview.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | GraphicsView::GraphicsView(QWidget *parent)
9 | {
10 | this->setScene(new QGraphicsScene);
11 | init();
12 | }
13 |
14 | GraphicsView::~GraphicsView()
15 | {
16 | }
17 |
18 | void GraphicsView::init()
19 | {
20 | QOpenGLWidget* glViewPort = new QOpenGLWidget;
21 | glViewPort->setMouseTracking(true);
22 | glViewPort->setMaximumSize(2000, 2000);
23 | this->setViewport(glViewPort);
24 | this->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
25 | startTimer(10);
26 |
27 | m_pSceneData = new osg::Group;
28 | m_pSceneData->setName("root");
29 |
30 | m_pViewer = new osgViewer::Viewer;
31 | m_pViewer->addEventHandler(new osgViewer::StatsHandler);
32 | m_pViewer->getCamera()->setNearFarRatio(0.001);
33 | m_pViewer->getCamera()->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES);
34 | m_pViewer->setUpViewerAsEmbeddedInWindow(0, 0, width(), height());
35 | auto* manipulator = new osgGA::TrackballManipulator;
36 | m_pViewer->setCameraManipulator(manipulator);
37 |
38 | m_pViewer->setSceneData(m_pSceneData);
39 | m_pGraphicsWindow = dynamic_cast(
40 | m_pViewer->getCamera()->getGraphicsContext());
41 | }
42 |
43 | void GraphicsView::timerEvent(QTimerEvent *event)
44 | {
45 | this->scene()->update();
46 | }
47 |
48 | void GraphicsView::drawBackground(QPainter *painter, const QRectF& rect)
49 | {
50 | if (painter->paintEngine()->type() != QPaintEngine::OpenGL2)
51 | {
52 | return;
53 | }
54 |
55 | // Save the painter state
56 | painter->save();
57 | painter->beginNativePainting();
58 |
59 | m_pViewer->frame();
60 |
61 | painter->endNativePainting();
62 | painter->restore();
63 | }
64 |
--------------------------------------------------------------------------------
/src/RigelQt/GraphicsView.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/GraphicsView.h
--------------------------------------------------------------------------------
/src/RigelQt/OSGView.cpp:
--------------------------------------------------------------------------------
1 | #include "OSGView.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class DLL_EXPORT OSGRender : public QQuickFramebufferObject::Renderer
10 | {
11 | public:
12 | OSGRender::OSGRender(const OSGView* view)
13 | : m_pViewer(view->m_pViewer)
14 | {
15 | m_pOSGView = view;
16 | }
17 | ~OSGRender() {};
18 |
19 | QOpenGLFramebufferObject *OSGRender::createFramebufferObject(const QSize &size)
20 | {
21 | QOpenGLFramebufferObjectFormat format;
22 | format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
23 | format.setSamples(4);
24 | return new QOpenGLFramebufferObject(size, format);
25 | }
26 |
27 | void OSGRender::render()
28 | {
29 | QOpenGLContext::currentContext()->functions()->glUseProgram(0);
30 | osgGA::EventQueue::Events events;
31 | if (events.size() > 0)
32 | {
33 | m_pOSGView->m_pEventQueue->takeEvents(events);
34 | m_pOSGView->m_pViewer->getEventQueue()->appendEvents(events);
35 | }
36 | m_pOSGView->m_pViewer->frame();
37 | update();
38 | }
39 |
40 | private:
41 | const OSGView* m_pOSGView;
42 | osg::observer_ptr m_pViewer;
43 | };
44 |
45 |
46 | OSGView::OSGView(QQuickItem *parent/* = Q_NULLPTR*/)
47 | :QQuickFramebufferObject(parent)
48 | {
49 | m_pRoot = nullptr;
50 | m_pCamera = nullptr;
51 | m_pViewer = nullptr;
52 | setFlag(ItemHasContents, true);
53 | setAcceptedMouseButtons(Qt::AllButtons);
54 | initOSG();
55 | //qmlRegisterType("OSGQuick.OSGView", 1, 0, "OSGView");
56 | }
57 |
58 |
59 | OSGView::~OSGView()
60 | {
61 | delete m_pViewer;
62 | }
63 |
64 | osg::Camera* OSGView::getCamera()
65 | {
66 | return m_pCamera;
67 | }
68 |
69 | osgViewer::Viewer* OSGView::getViewer()
70 | {
71 | return m_pViewer;
72 | }
73 |
74 | osg::Group* OSGView::getSceneData()
75 | {
76 | return m_pRoot;
77 | }
78 |
79 | void OSGView::slotHome()
80 | {
81 |
82 | }
83 |
84 | QQuickFramebufferObject::Renderer* OSGView::createRenderer() const
85 | {
86 | return new OSGRender(this);
87 | }
88 |
89 | void OSGView::initOSG()
90 | {
91 | m_pEventQueue = new osgGA::EventQueue;
92 |
93 | m_pViewer = new osgViewer::Viewer;
94 | m_pRoot = new osg::Group;
95 | m_pViewer->setSceneData(m_pRoot);
96 | m_pCamera = m_pViewer->getCamera();
97 |
98 | m_pViewer->setCameraManipulator(new osgGA::TrackballManipulator);
99 | auto handler = new osgViewer::StatsHandler();
100 | m_pViewer->addEventHandler(handler);
101 | m_pViewer->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
102 |
103 | auto context = m_pViewer->setUpViewerAsEmbeddedInWindow(0, 0, 0, 0);
104 | m_pCamera->setGraphicsContext(context);
105 | startTimer(10);
106 | }
107 |
108 | QSGNode * OSGView::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *nodeData)
109 | {
110 | QSGNode* node = QQuickFramebufferObject::updatePaintNode(oldNode, nodeData);
111 | if (nullptr != node)
112 | {
113 | QSGSimpleTextureNode& textureNode = dynamic_cast(*node);
114 | textureNode.setTextureCoordinatesTransform(QSGSimpleTextureNode::MirrorVertically);
115 | return node;
116 | }
117 | return node;
118 | }
119 |
120 | void OSGView::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry)
121 | {
122 | m_pEventQueue->windowResize(newGeometry.x(), newGeometry.y(), newGeometry.width(), newGeometry.height());
123 | m_pViewer->getCamera()->setViewport(new osg::Viewport(0, 0, newGeometry.width(), newGeometry.height()));
124 | const double aspectRatio = newGeometry.width() / newGeometry.height();
125 | m_pViewer->getCamera()->setProjectionMatrixAsPerspective(30.0f, aspectRatio, 1.0f, 10000.0f);
126 | QQuickFramebufferObject::geometryChanged(newGeometry, oldGeometry);
127 | }
128 |
129 | void OSGView::mousePressEvent(QMouseEvent *event)
130 | {
131 | m_pEventQueue->mouseButtonPress(event->x(), event->y(), event->button());
132 | }
133 |
134 | void OSGView::mouseMoveEvent(QMouseEvent *event)
135 | {
136 | m_pEventQueue->mouseMotion(event->x(), event->y());
137 | update();
138 | }
139 |
140 | void OSGView::mouseReleaseEvent(QMouseEvent *event)
141 | {
142 | m_pEventQueue->mouseButtonRelease(event->x(), event->y(), event->button());
143 | update();
144 | }
145 |
146 | void OSGView::mouseDoubleClickEvent(QMouseEvent *event)
147 | {
148 | m_pEventQueue->mouseDoubleButtonPress(event->x(), event->y(), event->button());
149 | update();
150 | }
151 |
152 | void OSGView::wheelEvent(QWheelEvent *event)
153 | {
154 | if (event->delta() > 0)
155 | m_pEventQueue->mouseScroll(osgGA::GUIEventAdapter::SCROLL_UP);
156 | else
157 | m_pEventQueue->mouseScroll(osgGA::GUIEventAdapter::SCROLL_DOWN);
158 | update();
159 | }
160 |
161 | void OSGView::keyPressEvent(QKeyEvent *event)
162 | {
163 | const std::string text = event->text().toStdString();
164 | auto sss = event->text().toLatin1().data();
165 | osgGA::GUIEventAdapter::KeySymbol keySymbol = (osgGA::GUIEventAdapter::KeySymbol)text[0];
166 | m_pEventQueue->keyPress(keySymbol);
167 | update();
168 | }
169 |
170 | void OSGView::keyReleaseEvent(QKeyEvent *event)
171 | {
172 | const std::string text = event->text().toStdString();
173 | if (text.size() == 1)
174 | {
175 | m_pEventQueue->keyRelease(text[0]);
176 | update();
177 | }
178 | }
--------------------------------------------------------------------------------
/src/RigelQt/OSGView.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Export.h"
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | class OSGRender;
13 |
14 | class DLL_EXPORT OSGView : public QQuickFramebufferObject
15 | {
16 | Q_OBJECT
17 | public:
18 | OSGView(QQuickItem *parent = Q_NULLPTR);
19 | virtual ~OSGView();
20 | public:
21 | osg::Camera* getCamera();
22 |
23 | osgViewer::Viewer* getViewer();
24 |
25 | osg::Group* getSceneData();
26 |
27 | public slots:
28 | Q_INVOKABLE void slotHome();
29 |
30 | protected:
31 | virtual QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *uppData);
32 | void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry);
33 |
34 | /***事件处理***/
35 | void mousePressEvent(QMouseEvent *event);
36 | void mouseMoveEvent(QMouseEvent *event);
37 | void mouseReleaseEvent(QMouseEvent *event);
38 | void mouseDoubleClickEvent(QMouseEvent *event);
39 | void wheelEvent(QWheelEvent *event);
40 | void keyPressEvent(QKeyEvent *event);
41 | void keyReleaseEvent(QKeyEvent *event);
42 |
43 | Renderer* createRenderer() const;
44 |
45 | private:
46 | void initOSG();
47 |
48 | private:
49 | friend class OSGRender;
50 | OSGView* m_pOSGItem;
51 | osg::Group* m_pRoot;
52 | osg::Camera* m_pCamera;
53 | osgViewer::Viewer* m_pViewer;
54 | osgGA::EventQueue* m_pEventQueue;
55 | };
--------------------------------------------------------------------------------
/src/RigelQt/OSGWidget.cpp:
--------------------------------------------------------------------------------
1 | #include "OSGWidget.h"
2 | #include
3 | #include
4 | #include
5 |
6 | OSGWidget::OSGWidget(QWidget* parent)
7 | :QOpenGLWidget(parent)
8 | {
9 | m_pViewer = NULL;
10 | m_pGraphicsWindow = NULL;
11 | setMouseTracking(true);
12 | init();
13 | }
14 |
15 | OSGWidget::~OSGWidget()
16 | {
17 | }
18 |
19 | void OSGWidget::init()
20 | {
21 | m_pViewer = new osgViewer::Viewer;
22 | m_pViewer->setUpViewerAsEmbeddedInWindow(0, 0, width(), height());
23 | m_pViewer->addEventHandler(new osgViewer::StatsHandler);
24 | m_pViewer->addEventHandler(new osgViewer::ThreadingHandler);
25 | auto* osgGC = m_pViewer->getCamera()->getGraphicsContext();
26 | m_pGraphicsWindow = dynamic_cast(osgGC);
27 | osg::DisplaySettings::instance()->setDoubleBuffer(true);
28 | connect(&m_timer, SIGNAL(timeout()), this, SLOT(updateGL()));
29 | m_timer.start(16);
30 | }
31 |
32 | osg::Camera* OSGWidget::createCamera(int x, int y, int w, int h)
33 | {
34 | return nullptr;
35 | }
36 |
37 | void OSGWidget::setGraphicsWindow(osgViewer::GraphicsWindow* graphicsWindow)
38 | {
39 | m_pGraphicsWindow = graphicsWindow;
40 | }
41 |
42 | void OSGWidget::paintGL()
43 | {
44 | m_pViewer->frame();
45 | }
46 |
47 | void OSGWidget::resizeEvent(QResizeEvent *e)
48 | {
49 | m_pGraphicsWindow->resized(x(), y(), width(), height());
50 | m_pGraphicsWindow->getEventQueue()->windowResize(x(), y(), width(), height());
51 | m_pGraphicsWindow->requestRedraw();
52 | //m_pViewer->getCamera()->setViewport(0, 0, width(), height());
53 | }
54 |
--------------------------------------------------------------------------------
/src/RigelQt/OSGWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RigelStudio/Rigel3D/5789e828328866b90386c4fc41f5b5adffae9dd8/src/RigelQt/OSGWidget.h
--------------------------------------------------------------------------------
/src/RigelQt/RigelQt.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------