Merge lp:~registry/stellarium/scenery3d_Qt5 into lp:stellarium

Proposed by gzotti
Status: Merged
Merged at revision: 7517
Proposed branch: lp:~registry/stellarium/scenery3d_Qt5
Merge into: lp:stellarium
Diff against target: 573162 lines (+572101/-34)
106 files modified
CMakeLists.txt (+8/-2)
data/CMakeLists.txt (+4/-0)
data/gui/nightStyle.css (+4/-0)
data/gui/normalStyle.css (+4/-0)
data/shaders/s3d_cube.frag (+34/-0)
data/shaders/s3d_cube.vert (+39/-0)
data/shaders/s3d_debug.frag (+35/-0)
data/shaders/s3d_debug.vert (+40/-0)
data/shaders/s3d_pixellit.frag (+503/-0)
data/shaders/s3d_pixellit.geom (+88/-0)
data/shaders/s3d_pixellit.vert (+137/-0)
data/shaders/s3d_pixellit_es.frag (+277/-0)
data/shaders/s3d_texture.frag (+33/-0)
data/shaders/s3d_texture.vert (+38/-0)
data/shaders/s3d_transform.frag (+41/-0)
data/shaders/s3d_transform.vert (+43/-0)
data/shaders/s3d_vertexlit.frag (+86/-0)
data/shaders/s3d_vertexlit.geom (+69/-0)
data/shaders/s3d_vertexlit.vert (+135/-0)
plugins/Scenery3d/CMakeLists.txt (+13/-0)
plugins/Scenery3d/COPYING (+340/-0)
plugins/Scenery3d/Doxyfile (+1484/-0)
plugins/Scenery3d/README (+34/-0)
plugins/Scenery3d/doc/Scenery3d.tex (+614/-0)
plugins/Scenery3d/resources/Scenery3d.qrc (+10/-0)
plugins/Scenery3d/src/AABB.cpp (+304/-0)
plugins/Scenery3d/src/AABB.hpp (+67/-0)
plugins/Scenery3d/src/CMakeLists.txt (+66/-0)
plugins/Scenery3d/src/Frustum.cpp (+262/-0)
plugins/Scenery3d/src/Frustum.hpp (+69/-0)
plugins/Scenery3d/src/GLFuncs.hpp (+49/-0)
plugins/Scenery3d/src/Heightmap.cpp (+211/-0)
plugins/Scenery3d/src/Heightmap.hpp (+55/-0)
plugins/Scenery3d/src/Line.cpp (+33/-0)
plugins/Scenery3d/src/Line.hpp (+42/-0)
plugins/Scenery3d/src/OBJ.cpp (+1826/-0)
plugins/Scenery3d/src/OBJ.hpp (+375/-0)
plugins/Scenery3d/src/Plane.cpp (+133/-0)
plugins/Scenery3d/src/Plane.hpp (+49/-0)
plugins/Scenery3d/src/Polyhedron.cpp (+287/-0)
plugins/Scenery3d/src/Polyhedron.hpp (+78/-0)
plugins/Scenery3d/src/S3DEnum.hpp (+63/-0)
plugins/Scenery3d/src/SPolygon.cpp (+132/-0)
plugins/Scenery3d/src/SPolygon.hpp (+61/-0)
plugins/Scenery3d/src/SceneInfo.cpp (+505/-0)
plugins/Scenery3d/src/SceneInfo.hpp (+185/-0)
plugins/Scenery3d/src/Scenery3d.cpp (+2715/-0)
plugins/Scenery3d/src/Scenery3d.hpp (+382/-0)
plugins/Scenery3d/src/Scenery3dMgr.cpp (+913/-0)
plugins/Scenery3d/src/Scenery3dMgr.hpp (+309/-0)
plugins/Scenery3d/src/ShaderManager.cpp (+479/-0)
plugins/Scenery3d/src/ShaderManager.hpp (+297/-0)
plugins/Scenery3d/src/gui/Scenery3dDialog.cpp (+476/-0)
plugins/Scenery3d/src/gui/Scenery3dDialog.hpp (+60/-0)
plugins/Scenery3d/src/gui/Scenery3dDialog_p.hpp (+59/-0)
plugins/Scenery3d/src/gui/StoredViewDialog.cpp (+144/-0)
plugins/Scenery3d/src/gui/StoredViewDialog.hpp (+56/-0)
plugins/Scenery3d/src/gui/StoredViewDialog_p.hpp (+175/-0)
plugins/Scenery3d/src/gui/scenery3dDialog.ui (+760/-0)
plugins/Scenery3d/src/gui/storedViewDialog.ui (+318/-0)
scenery3d/CMakeLists.txt (+3/-0)
scenery3d/Sterngarten/CMakeLists.txt (+13/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea-optimized.mtl (+152/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea-optimized.obj (+177024/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea.mtl (+152/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea.obj (+244605/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea/CMakeLists.txt (+5/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea_ground.mtl (+39/-0)
scenery3d/Sterngarten/Sterngarten_Wien_innerArea_ground.obj (+1124/-0)
scenery3d/Sterngarten/description.de.utf8 (+47/-0)
scenery3d/Sterngarten/description.en.utf8 (+40/-0)
scenery3d/Sterngarten/scenery3d.ini (+46/-0)
scenery3d/Sterngarten/viewpoints.ini (+14/-0)
scenery3d/Testscene/CMakeLists.txt (+9/-0)
scenery3d/Testscene/Stellarium-Testscene.mtl (+20/-0)
scenery3d/Testscene/Stellarium-Testscene.obj (+23620/-0)
scenery3d/Testscene/Stellarium-Testscene.xml (+23735/-0)
scenery3d/Testscene/Stellarium-Testscene_ground.mtl (+10/-0)
scenery3d/Testscene/Stellarium-Testscene_ground.obj (+66/-0)
scenery3d/Testscene/Stellarium-Testscene_ground.xml (+167/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid.mtl (+30/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid.obj (+23658/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid.xml (+23787/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid_Bump-separateSpheres.mtl (+44/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid_Bump-separateSpheres.obj (+13237/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid_Bump.mtl (+47/-0)
scenery3d/Testscene/Stellarium-Testscene_withGrid_Bump.obj (+23658/-0)
scenery3d/Testscene/TX_Stellarium-Testscene/CMakeLists.txt (+5/-0)
scenery3d/Testscene/TX_Stellarium-Testscene_ground/CMakeLists.txt (+5/-0)
scenery3d/Testscene/TX_Stellarium-Testscene_withGrid/CMakeLists.txt (+5/-0)
scenery3d/Testscene/scenery3d.ini (+38/-0)
src/core/StelApp.cpp (+4/-0)
src/core/StelMovementMgr.cpp (+11/-1)
src/core/StelMovementMgr.hpp (+2/-0)
src/core/StelOpenGL.hpp (+5/-0)
src/core/StelTexture.cpp (+46/-4)
src/core/StelTexture.hpp (+12/-2)
src/core/StelTextureMgr.cpp (+3/-0)
src/core/StelUtils.cpp (+129/-18)
src/core/StelUtils.hpp (+17/-0)
src/core/VecMath.hpp (+328/-0)
src/core/modules/Landscape.cpp (+8/-1)
src/core/modules/Landscape.hpp (+11/-0)
src/core/modules/LandscapeMgr.cpp (+4/-4)
src/core/modules/LandscapeMgr.hpp (+7/-2)
src/gui/viewDialog.ui (+1/-0)
To merge this branch: bzr merge lp:~registry/stellarium/scenery3d_Qt5
Reviewer Review Type Date Requested Status
Alexander Wolf Approve
gzotti Needs Resubmitting
Fabien Chéreau Needs Fixing
Review via email: mp+254181@code.launchpad.net

Description of the change

A new and I think still unique feature! 3D Foreground landscapes to walk around, study structural alignments with celestial objects/events, study light-and-shadow phenomena, or just look for the best observing location in your garden (once you have created a model of it ;-)

Florian did a marvellous job here, getting all the niceties out of current hardware, large or small! Except for some log messages which will be further reduced, I think it is ready for primetime :-)

To post a comment you must log in.
Revision history for this message
Alexander Wolf (alexwolf) wrote :

Please update .bzrignore file - right now you drop from bzr default settings for planetarium and scripts for installer.

Plus name of project should not change - SET(VERSION "${STELLARIUM_MAJOR}.${STELLARIUM_MINOR}.${STELLARIUM_PATCH}-scenery3D")

review: Needs Fixing
5100. By gzotti

Fix a few CR/LF issues

Revision history for this message
gzotti (georg-zotti) wrote :

Huh? Is there a functional difference depending on CR/LF?

$ diff -w trunk5/.bzrignore scenery3d_Qt5/.bzrignore
(empty answer)

OK, we have CR/LF issues. I copied the file over from trunk. Likely a few others.

Project name: sure!

5101. By gzotti

fix CR/LF

5102. By gzotti

relocated button icons and resource files

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Disabling of landscapes when Scenery3D running - is it normal?

Revision history for this message
Fabien Chéreau (xalioth) wrote :

Very good professional work. I really appreciate the good documentation and latex sources included in the code :)

Before merging in trunk I have a couple of requests:
 - Util.hpp/.cpp : try to move part of this in the main Stellarium code. Get rid of useless extern, try to use QString versions instead of including part of the STL
 - there are still some fixed pipeline code in the opengl code (glBegin & co)
 - on real OpenGL ES devices you also need to specify the precision of the variable in the shaders (low, medium, high), they can be added as Qt automatically remove them on desktop platforms

Revision history for this message
Fabien Chéreau (xalioth) wrote :

Almost good.
See commetn above.

Also, it would be nice to have more 3D landscapes samples :D

review: Needs Fixing
Revision history for this message
gzotti (georg-zotti) wrote :

> Disabling of landscapes when Scenery3D running - is it normal?

We don't disable landscapes. A landscape can be specified in the scenery3d.ini. A complete scenery would require a photo pano landscape taken on-site, reworked to remove the horizon-crossing closeup elements from the photo. In order not to add another landscape, I just defined zero horizon as the landscape here.

Revision history for this message
gzotti (georg-zotti) wrote :

> Very good professional work. I really appreciate the good documentation and
> latex sources included in the code :)

Thanks!

> Before merging in trunk I have a couple of requests:
> - Util.hpp/.cpp : try to move part of this in the main Stellarium code. Get
> rid of useless extern, try to use QString versions instead of including part
> of the STL
> - there are still some fixed pipeline code in the opengl code (glBegin & co)
> - on real OpenGL ES devices you also need to specify the precision of the
> variable in the shaders (low, medium, high), they can be added as Qt
> automatically remove them on desktop platforms

OK, I'll see what I can do :-)

Revision history for this message
gzotti (georg-zotti) wrote :

> Almost good.
> See commetn above.
>
> Also, it would be nice to have more 3D landscapes samples :D

Sure. Unfortunately creating a good model takes time. There are some good models e.g. in the Google 3D gallery, and I have configured a few for myself. But they are copyrighted, so they cannot be included. Any volunteers, e.g. for Jantar Mantar, some Greek temples, Newgrange, Fajada Butte Sun Dagger, Stonehenge, Augustus Obelisk, Machu Picchu, Dengfeng, ...? There are countless possibilities!

Revision history for this message
Florian Schaukowitsch (fschauk) wrote :

Hello, original developer here. Thanks for the kind words!

Some notes:
> - Util.hpp/.cpp : try to move part of this in the main Stellarium code. Get
> rid of useless extern, try to use QString versions instead of including part
> of the STL
Yeah, that is an artifact of some older parts of the codebase (~2012). I was unhappy with that when I started "repairing" the code, but never really found time to change this.

> - there are still some fixed pipeline code in the opengl code (glBegin & co)
The fixed-function stuff is only needed for some debugging output (rendering of bounding boxes/view frusta). During normal usage it will never be called. On pure ES devices or on ANGLE, the code is disabled.

> - on real OpenGL ES devices you also need to specify the precision of the
> variable in the shaders (low, medium, high), they can be added as Qt
> automatically remove them on desktop platforms
Most of the shaders should be compatible with OpenGL ES2. As far as I know, it is not strictly required to specify precision for everything in a vertex shader (because there is already a default precision for floats, see https://stackoverflow.com/questions/5366416/in-opengl-es-2-0-glsl-where-do-you-need-precision-specifiers ), and the fragment shaders should contain the precision specifiers where needed.

The only shaders which will not work with OpenGL ES2 should be the optional geometry shaders (.geom files, require #version 150/OpenGL 3.2, are completely disabled on ES2 or if 3.2 is not supported) and the s3d_pixellit.frag shader (which uses some #version 120 stuff, but has an alternative simplified implementation for ES2 in s3d_pixellit_es.frag).

The plugin was tested by me on an AMD HD5850, an integrated Intel chip (OpenGL 2.1) and on one of the new NVidia GTX 970. Additionally I tested it on ANGLE builds, and on an OpenGL ES2 emulator (http://malideveloper.arm.com/develop-for-mali/tools/software-tools/opengl-es-emulator/). Georg also tested it on an Odroid C1 (which has embedded Mali graphics with "real" OpenGL ES2), seemingly without problems.

OpenGL ES2/ANGLE has some limitations. To support larger models (with more than 65535 vertices) the plugin depends on the presence of the "GL_OES_element_index_uint" extension. Shadows require "GL_OES_depth_texture" or "GL_ANGLE_depth_texture". The only thing really missing on ES2/ANGLE is shadow filtering (including PCSS).

5103. By Florian Schaukowitsch

Fix a linker error on Qt 5.4 dynamic OpenGL builds

5104. By Florian Schaukowitsch

Remove Scenery3d's Util.hpp/.cpp, moving its contents to StelUtils, VecMath.hpp and OBJ. Replaced the std::strings with QStrings, and removed the now useless functions.

Revision history for this message
gzotti (georg-zotti) wrote :

Thank you Florian!

So, any more comments/requests? I might have another self-made model to share, must check in the next days if size is small enough. Also, I will add a polygon-reduced model of Sterngarten for "embedded" use (those, like the Odroid C1, are limited to 64k vertices. The Odroid XU3 works much better and with full-size models).

review: Needs Resubmitting
Revision history for this message
Alexander Wolf (alexwolf) wrote :

I think we can merge this branch.

review: Approve
Revision history for this message
Fabien Chéreau (xalioth) wrote :

OK for me as well

On Wed, Apr 1, 2015 at 5:21 AM, Alexander Wolf <email address hidden>
wrote:

> Review: Approve
>
> I think we can merge this branch.
> --
>
> https://code.launchpad.net/~stellarium-scenery3d/stellarium/scenery3d_Qt5/+merge/254181
> You are reviewing the proposed merge of
> lp:~stellarium-scenery3d/stellarium/scenery3d_Qt5 into lp:stellarium.
>

5105. By gzotti

merge from trunk r7515 (final merge before merging into trunk :-).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-03-08 17:23:20 +0000
3+++ CMakeLists.txt 2015-04-01 10:27:06 +0000
4@@ -1,5 +1,5 @@
5
6-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
7+CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
8
9 IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0))
10 CMAKE_POLICY(SET CMP0050 OLD)
11@@ -7,6 +7,7 @@
12 CMAKE_POLICY(SET CMP0046 OLD)
13 ENDIF()
14
15+# just avoid a warning mess.
16 IF(NOT ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" LESS 3.0.2))
17 CMAKE_POLICY(SET CMP0043 OLD)
18 ENDIF()
19@@ -26,7 +27,7 @@
20 SET(PACKAGE_VERSION "${VERSION}")
21 ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}")
22
23-SET(MINIMAL_QT_VERSION "5.2.0")
24+SET(MINIMAL_QT_VERSION "5.3.0")
25
26 # Use customized cmake macros
27 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
28@@ -182,6 +183,7 @@
29 ADD_PLUGIN(Pulsars 1)
30 ADD_PLUGIN(Quasars 1)
31 ADD_PLUGIN(Satellites 1)
32+ADD_PLUGIN(Scenery3d 1)
33 ADD_PLUGIN(SolarSystemEditor 1)
34 ADD_PLUGIN(Supernovae 1)
35 ADD_PLUGIN(TextUserInterface 1)
36@@ -483,5 +485,9 @@
37 IF(ENABLE_SCRIPTING)
38 ADD_SUBDIRECTORY( scripts )
39 ENDIF()
40+if(USE_PLUGIN_SCENERY3D)
41+ # add scenery3d scenes
42+ ADD_SUBDIRECTORY( scenery3d )
43+ENDIF()
44 ADD_SUBDIRECTORY( stars )
45 ADD_SUBDIRECTORY( plugins )
46
47=== modified file 'data/CMakeLists.txt'
48--- data/CMakeLists.txt 2014-11-15 15:44:55 +0000
49+++ data/CMakeLists.txt 2015-04-01 10:27:06 +0000
50@@ -2,6 +2,10 @@
51
52 INSTALL(FILES stellarium.ico ssystem.ini ssystem_1000comets.ini base_locations.bin.gz DejaVuSans.ttf default_config.ini updates.json DejaVuSansMono.ttf iso639-1.utf8 iso3166-1-alpha-2.utf8 countryCodes.dat constellations_boundaries.dat DESTINATION share/${PACKAGE}/data)
53
54+# install Scenery3d shaders
55+INSTALL(DIRECTORY shaders/ DESTINATION share/${PACKAGE}/data/shaders FILES_MATCHING
56+ PATTERN "s3d_*.vert" PATTERN "s3d_*.geom" PATTERN "s3d_*.frag")
57+
58 IF (BUILD_FOR_MAEMO)
59 INSTALL(FILES maemo/stellarium.desktop DESTINATION /usr/share/applications/hildon)
60 INSTALL(FILES maemo/stellarium.png DESTINATION /usr/share/icons/hicolor/48x48/apps)
61
62=== modified file 'data/gui/nightStyle.css'
63--- data/gui/nightStyle.css 2015-02-18 22:21:55 +0000
64+++ data/gui/nightStyle.css 2015-04-01 10:27:06 +0000
65@@ -6,6 +6,10 @@
66 background: none;
67 }
68
69+QLabel:disabled {
70+ color: rgb(100, 0, 0);
71+}
72+
73 QLabel#stelWindowTitle {
74 margin-left: 24px;
75 font-size: 14px;
76
77=== modified file 'data/gui/normalStyle.css'
78--- data/gui/normalStyle.css 2015-03-17 14:02:04 +0000
79+++ data/gui/normalStyle.css 2015-04-01 10:27:06 +0000
80@@ -6,6 +6,10 @@
81 background: none;
82 }
83
84+QLabel:disabled {
85+ color: rgb(50, 50, 50);
86+}
87+
88 QLabel#stelWindowTitle {
89 margin-left: 24px;
90 font-size: 14px;
91
92=== added file 'data/shaders/s3d_cube.frag'
93--- data/shaders/s3d_cube.frag 1970-01-01 00:00:00 +0000
94+++ data/shaders/s3d_cube.frag 2015-04-01 10:27:06 +0000
95@@ -0,0 +1,34 @@
96+/*
97+ * Stellarium Scenery3d Plug-in
98+ *
99+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
100+ *
101+ * This program is free software; you can redistribute it and/or
102+ * modify it under the terms of the GNU General Public License
103+ * as published by the Free Software Foundation; either version 2
104+ * of the License, or (at your option) any later version.
105+ *
106+ * This program is distributed in the hope that it will be useful,
107+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
108+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109+ * GNU General Public License for more details.
110+ *
111+ * You should have received a copy of the GNU General Public License
112+ * along with this program; if not, write to the Free Software
113+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
114+ */
115+
116+
117+/*
118+This is a shader that applies cubemapping to pre-transformed geometry
119+*/
120+
121+//this is a samplerCube instead of a sampler2D here
122+uniform samplerCube u_texDiffuse;
123+
124+varying highp vec3 v_texcoord;
125+
126+void main(void)
127+{
128+ gl_FragColor = textureCube(u_texDiffuse, v_texcoord);
129+}
130\ No newline at end of file
131
132=== added file 'data/shaders/s3d_cube.vert'
133--- data/shaders/s3d_cube.vert 1970-01-01 00:00:00 +0000
134+++ data/shaders/s3d_cube.vert 2015-04-01 10:27:06 +0000
135@@ -0,0 +1,39 @@
136+/*
137+ * Stellarium Scenery3d Plug-in
138+ *
139+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
140+ *
141+ * This program is free software; you can redistribute it and/or
142+ * modify it under the terms of the GNU General Public License
143+ * as published by the Free Software Foundation; either version 2
144+ * of the License, or (at your option) any later version.
145+ *
146+ * This program is distributed in the hope that it will be useful,
147+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
148+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149+ * GNU General Public License for more details.
150+ *
151+ * You should have received a copy of the GNU General Public License
152+ * along with this program; if not, write to the Free Software
153+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
154+ */
155+
156+
157+/*
158+This is a shader that applies cubemapping to pre-transformed geometry
159+*/
160+
161+//matrices
162+uniform mat4 u_mProjection;
163+
164+//Note: they are both vec3 here!
165+attribute vec3 a_vertex;
166+attribute vec3 a_texcoord;
167+
168+varying highp vec3 v_texcoord;
169+
170+void main(void)
171+{
172+ v_texcoord = a_texcoord;
173+ gl_Position = u_mProjection * vec4(a_vertex,1.0);
174+}
175\ No newline at end of file
176
177=== added file 'data/shaders/s3d_debug.frag'
178--- data/shaders/s3d_debug.frag 1970-01-01 00:00:00 +0000
179+++ data/shaders/s3d_debug.frag 2015-04-01 10:27:06 +0000
180@@ -0,0 +1,35 @@
181+#version 110
182+
183+/*
184+ * Stellarium Scenery3d Plug-in
185+ *
186+ * Copyright (C) 2015 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
187+ *
188+ * This program is free software; you can redistribute it and/or
189+ * modify it under the terms of the GNU General Public License
190+ * as published by the Free Software Foundation; either version 2
191+ * of the License, or (at your option) any later version.
192+ *
193+ * This program is distributed in the hope that it will be useful,
194+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
195+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
196+ * GNU General Public License for more details.
197+ *
198+ * You should have received a copy of the GNU General Public License
199+ * along with this program; if not, write to the Free Software
200+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
201+ */
202+
203+/*
204+ This is the shader used for debugging bounding boxes, frustums, polyhedra etc.
205+ Because the old code extensively uses the immediate GL mode (glBegin/glEnd), this
206+ shader currently uses part of the fixed-function pipeline. This will make this shader
207+ fail to compile on OpenGL ES!
208+*/
209+
210+uniform vec4 u_vColor;
211+
212+void main(void)
213+{
214+ gl_FragColor = u_vColor * gl_Color;
215+}
216\ No newline at end of file
217
218=== added file 'data/shaders/s3d_debug.vert'
219--- data/shaders/s3d_debug.vert 1970-01-01 00:00:00 +0000
220+++ data/shaders/s3d_debug.vert 2015-04-01 10:27:06 +0000
221@@ -0,0 +1,40 @@
222+#version 110
223+
224+/*
225+ * Stellarium Scenery3d Plug-in
226+ *
227+ * Copyright (C) 2015 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
228+ *
229+ * This program is free software; you can redistribute it and/or
230+ * modify it under the terms of the GNU General Public License
231+ * as published by the Free Software Foundation; either version 2
232+ * of the License, or (at your option) any later version.
233+ *
234+ * This program is distributed in the hope that it will be useful,
235+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
236+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
237+ * GNU General Public License for more details.
238+ *
239+ * You should have received a copy of the GNU General Public License
240+ * along with this program; if not, write to the Free Software
241+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
242+ */
243+
244+/*
245+ This is the shader used for debugging bounding boxes, frustums, polyhedra etc.
246+ Because the old code extensively uses the immediate GL mode (glBegin/glEnd), this
247+ shader currently uses part of the fixed-function pipeline. This will make this shader
248+ fail to compile on OpenGL ES!
249+*/
250+
251+uniform mat4 u_mMVP;
252+
253+void main(void)
254+{
255+ //this should result in the vertices specified by glBegin/glEnd
256+ //transforms are assumed to be identity matrices
257+ vec4 oldVert = ftransform();
258+ //we do the "real" transform ourselves using the same matrices as the other shaders use
259+ gl_Position = u_mMVP * oldVert;
260+ gl_FrontColor = gl_Color;
261+}
262\ No newline at end of file
263
264=== added file 'data/shaders/s3d_pixellit.frag'
265--- data/shaders/s3d_pixellit.frag 1970-01-01 00:00:00 +0000
266+++ data/shaders/s3d_pixellit.frag 2015-04-01 10:27:06 +0000
267@@ -0,0 +1,503 @@
268+#version 120
269+
270+/*
271+ * Stellarium Scenery3d Plug-in
272+ *
273+ * Copyright (C) 2014, 2015 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
274+ *
275+ * This program is free software; you can redistribute it and/or
276+ * modify it under the terms of the GNU General Public License
277+ * as published by the Free Software Foundation; either version 2
278+ * of the License, or (at your option) any later version.
279+ *
280+ * This program is distributed in the hope that it will be useful,
281+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
282+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
283+ * GNU General Public License for more details.
284+ *
285+ * You should have received a copy of the GNU General Public License
286+ * along with this program; if not, write to the Free Software
287+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
288+ */
289+
290+
291+/*
292+This is a shader for phong/per-pixel lighting.
293+Note: This shader currently requires some #version 120 features!
294+*/
295+
296+//macros that can be set by ShaderManager (simple true/false flags)
297+#define BLENDING 1
298+#define SHADOWS 1
299+#define SHADOW_FILTER 0
300+#define SHADOW_FILTER_HQ 0
301+#define SINGLE_SHADOW_FRUSTUM 1
302+#define PCSS 0
303+#define MAT_DIFFUSETEX 1
304+#define MAT_EMISSIVETEX 1
305+#define MAT_SPECULAR 1
306+#define BUMP 0
307+#define HEIGHT 0
308+#define ALPHATEST 1
309+#define TORCH 1
310+
311+#if SHADOW_FILTER_HQ
312+#define FILTER_STEPS 64
313+//NOTE: Intel does NOT like it for some reason if this is a const array, so we set it as uniform
314+uniform vec2 poissonDisk[FILTER_STEPS] = vec2[](
315+ vec2(-0.613392, 0.617481),
316+ vec2(0.170019, -0.040254),
317+ vec2(-0.299417, 0.791925),
318+ vec2(0.645680, 0.493210),
319+ vec2(-0.651784, 0.717887),
320+ vec2(0.421003, 0.027070),
321+ vec2(-0.817194, -0.271096),
322+ vec2(-0.705374, -0.668203),
323+ vec2(0.977050, -0.108615),
324+ vec2(0.063326, 0.142369),
325+ vec2(0.203528, 0.214331),
326+ vec2(-0.667531, 0.326090),
327+ vec2(-0.098422, -0.295755),
328+ vec2(-0.885922, 0.215369),
329+ vec2(0.566637, 0.605213),
330+ vec2(0.039766, -0.396100),
331+ vec2(0.751946, 0.453352),
332+ vec2(0.078707, -0.715323),
333+ vec2(-0.075838, -0.529344),
334+ vec2(0.724479, -0.580798),
335+ vec2(0.222999, -0.215125),
336+ vec2(-0.467574, -0.405438),
337+ vec2(-0.248268, -0.814753),
338+ vec2(0.354411, -0.887570),
339+ vec2(0.175817, 0.382366),
340+ vec2(0.487472, -0.063082),
341+ vec2(-0.084078, 0.898312),
342+ vec2(0.488876, -0.783441),
343+ vec2(0.470016, 0.217933),
344+ vec2(-0.696890, -0.549791),
345+ vec2(-0.149693, 0.605762),
346+ vec2(0.034211, 0.979980),
347+ vec2(0.503098, -0.308878),
348+ vec2(-0.016205, -0.872921),
349+ vec2(0.385784, -0.393902),
350+ vec2(-0.146886, -0.859249),
351+ vec2(0.643361, 0.164098),
352+ vec2(0.634388, -0.049471),
353+ vec2(-0.688894, 0.007843),
354+ vec2(0.464034, -0.188818),
355+ vec2(-0.440840, 0.137486),
356+ vec2(0.364483, 0.511704),
357+ vec2(0.034028, 0.325968),
358+ vec2(0.099094, -0.308023),
359+ vec2(0.693960, -0.366253),
360+ vec2(0.678884, -0.204688),
361+ vec2(0.001801, 0.780328),
362+ vec2(0.145177, -0.898984),
363+ vec2(0.062655, -0.611866),
364+ vec2(0.315226, -0.604297),
365+ vec2(-0.780145, 0.486251),
366+ vec2(-0.371868, 0.882138),
367+ vec2(0.200476, 0.494430),
368+ vec2(-0.494552, -0.711051),
369+ vec2(0.612476, 0.705252),
370+ vec2(-0.578845, -0.768792),
371+ vec2(-0.772454, -0.090976),
372+ vec2(0.504440, 0.372295),
373+ vec2(0.155736, 0.065157),
374+ vec2(0.391522, 0.849605),
375+ vec2(-0.620106, -0.328104),
376+ vec2(0.789239, -0.419965),
377+ vec2(-0.545396, 0.538133),
378+ vec2(-0.178564, -0.596057)
379+);
380+#elif SHADOW_FILTER
381+#define FILTER_STEPS 16
382+//NOTE: Intel does NOT like it for some reason if this is a const array, so we set it as uniform
383+uniform vec2 poissonDisk[FILTER_STEPS] = vec2[](
384+ vec2( -0.94201624, -0.39906216 ),
385+ vec2( 0.94558609, -0.76890725 ),
386+ vec2( -0.094184101, -0.92938870 ),
387+ vec2( 0.34495938, 0.29387760 ),
388+ vec2( -0.91588581, 0.45771432 ),
389+ vec2( -0.81544232, -0.87912464 ),
390+ vec2( -0.38277543, 0.27676845 ),
391+ vec2( 0.97484398, 0.75648379 ),
392+ vec2( 0.44323325, -0.97511554 ),
393+ vec2( 0.53742981, -0.47373420 ),
394+ vec2( -0.26496911, -0.41893023 ),
395+ vec2( 0.79197514, 0.19090188 ),
396+ vec2( -0.24188840, 0.99706507 ),
397+ vec2( -0.81409955, 0.91437590 ),
398+ vec2( 0.19984126, 0.78641367 ),
399+ vec2( 0.14383161, -0.14100790 )
400+);
401+#else
402+#define FILTER_STEPS 0
403+#endif
404+
405+#if MAT_DIFFUSETEX
406+uniform sampler2D u_texDiffuse;
407+#endif
408+#if MAT_EMISSIVETEX
409+uniform sampler2D u_texEmissive;
410+#endif
411+#if BUMP
412+uniform sampler2D u_texBump;
413+#endif
414+#if HEIGHT
415+uniform sampler2D u_texHeight;
416+#endif
417+
418+//material info
419+uniform vec3 u_vMixAmbient; // = light ambient * mtl ambient/diffuse depending on Illum model
420+uniform vec3 u_vMixDiffuse; // light diffuse * mat diffuse
421+#if MAT_SPECULAR
422+uniform vec3 u_vMixSpecular;
423+uniform float u_vMatShininess;
424+#endif
425+uniform float u_vMatAlpha;
426+
427+uniform vec3 u_vMixEmissive;
428+
429+#if SHADOWS
430+//in a later version, this may become configurable
431+#if SINGLE_SHADOW_FRUSTUM
432+#define FRUSTUM_SPLITS 1
433+#else
434+#define FRUSTUM_SPLITS 4
435+#endif
436+//shadow related uniforms
437+uniform vec4 u_vSplits; //the frustum splits
438+#if PCSS
439+ #define SHADOWSAMPLER sampler2D
440+#else
441+ #define SHADOWSAMPLER sampler2DShadow
442+#endif
443+
444+//for some reason, Intel does absolutely not like it if the shadowmaps are passed as an array
445+//nothing is drawn, but no error is shown ...
446+//therefore, use 4 ugly uniforms
447+uniform SHADOWSAMPLER u_texShadow0;
448+#if !SINGLE_SHADOW_FRUSTUM
449+uniform SHADOWSAMPLER u_texShadow1;
450+uniform SHADOWSAMPLER u_texShadow2;
451+uniform SHADOWSAMPLER u_texShadow3;
452+#endif
453+
454+//info about scale is needed for filtering
455+uniform vec4 u_vLightOrthoScale[FRUSTUM_SPLITS];
456+#endif //SHADOWS
457+
458+#if ALPHATEST
459+uniform float u_fAlphaThresh;
460+#endif
461+
462+#if TORCH
463+uniform vec3 u_vMixTorchDiffuse;
464+uniform float u_fTorchAttenuation;
465+#endif
466+
467+varying vec3 v_normal;
468+varying vec2 v_texcoord;
469+varying vec3 v_lightVec; //light vector, in VIEW or TBN space according to bump settings
470+varying vec3 v_viewPos; //position of fragment in view space
471+
472+#if SHADOWS
473+//varying arrays seem to cause some problems, so we use 4 vecs for now...
474+varying vec4 v_shadowCoord0;
475+#if !SINGLE_SHADOW_FRUSTUM
476+varying vec4 v_shadowCoord1;
477+varying vec4 v_shadowCoord2;
478+varying vec4 v_shadowCoord3;
479+#endif
480+#endif
481+
482+#if SHADOWS
483+
484+float sampleShadow(in SHADOWSAMPLER tex, in vec4 coord, in vec2 filterRadiusUV)
485+{
486+ #if FILTER_STEPS
487+ // a filter is defined
488+ float sum =0.0;
489+
490+ vec3 texC = coord.xyz / coord.w;
491+ for(int i=0;i<FILTER_STEPS;++i)
492+ {
493+ vec2 offset = poissonDisk[i] * filterRadiusUV;
494+ //TODO offsets should probably depend on light ortho size?
495+ #if PCSS
496+ //texture is a normal sampler2D because we need depth values in blocker calculation
497+ //opengl does not allow to sample this texture in 2 different ways (unless sampler objects are used, but needs version >= 3.3)
498+ //so we have to do comparison ourselves
499+ sum+= (texture2D(tex,texC.xy + offset).r > texC.z) ? 1.0f : 0.0f;
500+ #else
501+ sum+=shadow2D(tex,vec3(texC.xy + offset, texC.z)).x;
502+ #endif
503+ }
504+ return sum / FILTER_STEPS;
505+ #else
506+ //no filtering performed, just return the sampled tex
507+ return shadow2DProj(tex,coord).x;
508+ #endif
509+}
510+
511+#if PCSS
512+//Based on the PCSS implementation of NVidia, ported to GLSL
513+//see http://developer.download.nvidia.com/whitepapers/2008/PCSS_Integration.pdf
514+//Some modifications to work better with directional light are included
515+
516+//convert shadowmap depth to view-space Z value (for an orthographic projection)
517+float depthToViewZ(float depth, float nearPlane, float farPlane)
518+{
519+ return depth * (farPlane - nearPlane) + nearPlane;
520+}
521+
522+#define LIGHT_SCALE 0.003
523+#define SEARCH_WIDTH 0.08
524+
525+float PenumbraSize(in float zReceiver, in float zBlocker)
526+{
527+ //this is the classical way as proposed by nvidia, but it does not work well with directional light (it is assumed the light is positioned at the near plane)
528+ //return (zReceiver - zBlocker) * LIGHT_SIZE / zBlocker;
529+ //instead, just use the distance to the blocker as scaling because the difference between zReceiver and zBlocker is small compared to their difference to the light, so we skip the division
530+ //we call this function using view space units, so the scaling should be quite small
531+ return (zReceiver - zBlocker) * LIGHT_SCALE;
532+}
533+
534+#define BLOCKER_SEARCH_NUM_SAMPLES 16
535+
536+void FindBlocker(in SHADOWSAMPLER tex,in vec2 uv, in float zReceiver, in vec2 searchWidth, out float avgBlockerDepth, out float numBlockers)
537+{
538+ float blockerSum = 0;
539+ numBlockers = 0;
540+
541+ //make sure original position is also sampled to avoid artifacts when shadow map resolution is bad or light angle very flat
542+ float shadowMapDepth = texture2D(tex,uv).r;
543+ if(shadowMapDepth<zReceiver)
544+ {
545+ blockerSum+=shadowMapDepth;
546+ ++numBlockers;
547+ }
548+
549+ for(int i=0;i<BLOCKER_SEARCH_NUM_SAMPLES;++i)
550+ {
551+ float shadowMapDepth = texture2D(tex,uv + poissonDisk[i] * searchWidth).r;
552+ if(shadowMapDepth < zReceiver)
553+ {
554+ blockerSum+=shadowMapDepth;
555+ ++numBlockers;
556+ }
557+ }
558+
559+ //divide by zero is ignored here, but basically handled by the calling function
560+ avgBlockerDepth = blockerSum / numBlockers;
561+}
562+
563+float ShadowPCSS(in SHADOWSAMPLER tex, in vec4 coords, in vec4 offsetScale)
564+{
565+ vec3 coordsProj = coords.xyz/coords.w;
566+
567+ float avgBlockerDepth = 0.0f;
568+ float numBlockers = 0.0f;
569+
570+ //convert depths to view space, this makes sure a consistent result is achieved regardless of the near/far planes of the frustum splits
571+ float zReceiver = depthToViewZ(coordsProj.z, offsetScale.z, offsetScale.w);
572+
573+ //search width estimation is also tricky for directional light, so we just use a constant value
574+ vec2 searchWidth = offsetScale.xy * SEARCH_WIDTH;
575+
576+ FindBlocker(tex,coordsProj.xy,coordsProj.z,searchWidth,avgBlockerDepth,numBlockers);
577+ if(numBlockers<1)
578+ return 1.0f;
579+
580+ //this is the searchwidth in m
581+ float penumbraRatio = PenumbraSize(zReceiver, depthToViewZ(avgBlockerDepth,offsetScale.z, offsetScale.w));
582+ //multiply with the ortho projection scaling to get the uv radius
583+
584+ vec2 filterRadiusUV = penumbraRatio * offsetScale.xy;
585+ //constraining seems to not make much difference in our scenes
586+ //vec2 filterRadiusUV = min(searchWidth, penumbraRatio * offsetScale.xy);
587+
588+ return sampleShadow(tex,coords,filterRadiusUV );
589+}
590+#endif
591+
592+float getShadow()
593+{
594+ //simplification of the smap.f.glsl shader
595+ //IMPORTANT: use clip coords here, not distance to camera
596+ float dist = gl_FragCoord.z;
597+
598+ //check in which split the fragment falls
599+ //I tried using indices to simplify the code a bit, but this lead to very strange artifacts...
600+ #if PCSS
601+ if(dist < u_vSplits.x)
602+ {
603+ return ShadowPCSS(u_texShadow0,v_shadowCoord0,u_vLightOrthoScale[0]);
604+ }
605+ #if !SINGLE_SHADOW_FRUSTUM
606+ else if(dist < u_vSplits.y)
607+ {
608+ return ShadowPCSS(u_texShadow1,v_shadowCoord1,u_vLightOrthoScale[1]);
609+ }
610+ else if(dist < u_vSplits.z)
611+ {
612+ return ShadowPCSS(u_texShadow2,v_shadowCoord2,u_vLightOrthoScale[2]);
613+ }
614+ else if(dist < u_vSplits.w)
615+ {
616+ return ShadowPCSS(u_texShadow3,v_shadowCoord3,u_vLightOrthoScale[3]);
617+ }
618+ #endif
619+ #else
620+ //If all calculations are correct, this should be 1cm
621+ #define DEFAULT_RADIUS 1.0/100.0
622+ if(dist < u_vSplits.x)
623+ {
624+ return sampleShadow(u_texShadow0,v_shadowCoord0,u_vLightOrthoScale[0].xy * DEFAULT_RADIUS);
625+ }
626+ #if !SINGLE_SHADOW_FRUSTUM
627+ else if(dist < u_vSplits.y)
628+ {
629+ return sampleShadow(u_texShadow1,v_shadowCoord1,u_vLightOrthoScale[1].xy * DEFAULT_RADIUS);
630+ }
631+ else if(dist < u_vSplits.z)
632+ {
633+ return sampleShadow(u_texShadow2,v_shadowCoord2,u_vLightOrthoScale[2].xy * DEFAULT_RADIUS);
634+ }
635+ else if(dist < u_vSplits.w)
636+ {
637+ return sampleShadow(u_texShadow3,v_shadowCoord3,u_vLightOrthoScale[3].xy * DEFAULT_RADIUS);
638+ }
639+ #endif
640+ #endif
641+
642+ return 1.0;
643+}
644+#endif
645+
646+void calcLighting(in vec3 normal,in vec3 eye,out vec3 texCol,out vec3 specCol)
647+{
648+ vec3 L = v_lightVec; //no normalize here, or it may cause divide by zero
649+
650+ //basic lambert term
651+ float NdotL = clamp(dot(normal, L),0.0,1.0);
652+#if BUMP
653+ //use the original NdotL (which equals L.z because original normal is (0,0,1) in TBN space!) to modify the result
654+ //this hides incorrect illumination on the backside of objects
655+ float origNormalFactor = 1.0 - 1.0 / (1.0 + 100.0 * max(L.z,0.0));
656+ NdotL *= origNormalFactor;
657+#endif
658+ vec3 Idiff = u_vMixDiffuse * NdotL;
659+
660+
661+#if SHADOWS
662+ float shd = getShadow();
663+ Idiff *= shd;
664+#endif
665+
666+#if TORCH
667+ //calculate additional diffuse, modeled by a point light centered on the cam pos
668+ float camDistSq = dot(v_viewPos,v_viewPos);
669+ float att = max(0.0, 1.0 - camDistSq * u_fTorchAttenuation);
670+ att *= att;
671+
672+ Idiff += att * u_vMixTorchDiffuse * max(0.0, dot(normal,eye));
673+#endif
674+
675+ #if MAT_SPECULAR
676+ if(NdotL>0.001)
677+ {
678+ //calculate phong reflection vector
679+ vec3 R = reflect(-L,normal);
680+
681+ float RdotE = dot(normalize(R), eye);
682+
683+ if(RdotE>0.0)
684+ {
685+ //specular term according to Phong model (light specular is assumed to be white for now)
686+ specCol = u_vMixSpecular * pow( RdotE, u_vMatShininess);
687+ #if SHADOWS
688+ specCol *= shd;
689+ #endif
690+ #if BUMP
691+ specCol *= origNormalFactor;
692+ #endif
693+ }
694+ else
695+ {
696+ specCol = vec3(0,0,0);
697+ }
698+ }
699+ else
700+ {
701+ specCol = vec3(0,0,0);
702+ }
703+ #else
704+ specCol = vec3(0,0,0);
705+ #endif
706+
707+ texCol = u_vMixAmbient + Idiff;
708+}
709+
710+#if BUMP
711+vec3 getBumpNormal(vec2 texCoords)
712+{
713+ return texture2D(u_texBump, texCoords).xyz * 2.0 - 1.0;
714+}
715+#endif
716+
717+#if HEIGHT
718+const float heightScale = 0.015f; //const for now
719+#endif
720+
721+void main(void)
722+{
723+#if MAT_DIFFUSETEX
724+ vec4 texVal = texture2D(u_texDiffuse,v_texcoord);
725+ #if ALPHATEST
726+ //check if alpha lies below threshold
727+ if(texVal.a < u_fAlphaThresh)
728+ discard;
729+ #endif
730+#endif
731+
732+ vec2 texCoords = v_texcoord;
733+ vec3 eye = normalize(-v_viewPos);
734+
735+ #if HEIGHT
736+ //pertube texture coords with heightmap
737+ float height = texture2D(u_texHeight, texCoords).r;
738+ //*scale +bias
739+ height = height * heightScale - 0.5*heightScale;
740+
741+ texCoords = texCoords + (height * eye.xz);
742+ #endif
743+
744+ #if BUMP
745+ vec3 normal = getBumpNormal(texCoords);
746+ #else
747+ vec3 normal = v_normal;
748+ #endif
749+
750+ vec3 texCol,specCol; //texCol gets multiplied with diffuse map, specCol not
751+ calcLighting(normalize(normal),eye,texCol,specCol);
752+
753+ #if MAT_EMISSIVETEX
754+ //use existing specCol to avoid using another vec3
755+ specCol += u_vMixEmissive * texture2D(u_texEmissive,v_texcoord).rgb;
756+ #else
757+ specCol += u_vMixEmissive;
758+ #endif
759+
760+#if MAT_DIFFUSETEX
761+ #if BLENDING
762+ gl_FragColor = vec4(texCol * texVal.rgb + specCol,u_vMatAlpha * texVal.a);
763+ #else
764+ //gl_FragColor = vec4(texCol * texVal.rgb + specCol, 1.0);
765+ gl_FragColor = vec4(texCol * texVal.rgb + specCol, 1.0);
766+ #endif
767+#else
768+ gl_FragColor = vec4(texCol + specCol,u_vMatAlpha); //u_vMatAlpha is automatically set to 1.0 if blending is disabled
769+#endif
770+}
771\ No newline at end of file
772
773=== added file 'data/shaders/s3d_pixellit.geom'
774--- data/shaders/s3d_pixellit.geom 1970-01-01 00:00:00 +0000
775+++ data/shaders/s3d_pixellit.geom 2015-04-01 10:27:06 +0000
776@@ -0,0 +1,88 @@
777+#version 150
778+
779+/*
780+ * Stellarium Scenery3d Plug-in
781+ *
782+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
783+ *
784+ * This program is free software; you can redistribute it and/or
785+ * modify it under the terms of the GNU General Public License
786+ * as published by the Free Software Foundation; either version 2
787+ * of the License, or (at your option) any later version.
788+ *
789+ * This program is distributed in the hope that it will be useful,
790+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
791+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
792+ * GNU General Public License for more details.
793+ *
794+ * You should have received a copy of the GNU General Public License
795+ * along with this program; if not, write to the Free Software
796+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
797+ */
798+
799+
800+/*
801+This is a shader geometry-shader (using 3.2 core functionality, #version 150) based acceleration of cubemap rendering.
802+For vertex-based lighting, this is pretty simple: the lighting is performed in the
803+ Vertex shader in a common view space
804+*/
805+
806+#define SHADOWS 1
807+#define SINGLE_SHADOW_FRUSTUM 0
808+
809+layout(triangles) in;
810+layout(triangle_strip,max_vertices = 18) out;
811+
812+in vec2 v_texcoordGS[];
813+in vec3 v_normalGS[];
814+in vec3 v_lightVecGS[];
815+in vec3 v_viewPosGS[];
816+out vec2 v_texcoord;
817+out vec3 v_normal;
818+out vec3 v_lightVec;
819+out vec3 v_viewPos;
820+
821+#if SHADOWS
822+in vec4 v_shadowCoord0GS[];
823+out vec4 v_shadowCoord0;
824+
825+#if !SINGLE_SHADOW_FRUSTUM
826+in vec4 v_shadowCoord1GS[];
827+in vec4 v_shadowCoord2GS[];
828+in vec4 v_shadowCoord3GS[];
829+out vec4 v_shadowCoord1;
830+out vec4 v_shadowCoord2;
831+out vec4 v_shadowCoord3;
832+#endif
833+#endif
834+
835+uniform mat4 u_mCubeMVP[6];
836+
837+void main(void)
838+{
839+ //iterate over cubemap faces
840+ for(gl_Layer=0; gl_Layer<6;++gl_Layer)
841+ {
842+ //iterate over triangle vertices
843+ for(int vtx = 0;vtx<3;++vtx)
844+ {
845+ //calc new position in current cubemap face
846+ gl_Position = u_mCubeMVP[gl_Layer] * gl_in[vtx].gl_Position;
847+ //pass on other varyings
848+ v_texcoord = v_texcoordGS[vtx];
849+ v_normal = v_normalGS[vtx];
850+ v_lightVec = v_lightVecGS[vtx];
851+ v_viewPos = v_viewPosGS[vtx];
852+ #if SHADOWS
853+ v_shadowCoord0 = v_shadowCoord0GS[vtx];
854+ #if !SINGLE_SHADOW_FRUSTUM
855+ v_shadowCoord1 = v_shadowCoord1GS[vtx];
856+ v_shadowCoord2 = v_shadowCoord2GS[vtx];
857+ v_shadowCoord3 = v_shadowCoord3GS[vtx];
858+ #endif
859+ #endif
860+ EmitVertex();
861+ }
862+ EndPrimitive();
863+ }
864+}
865\ No newline at end of file
866
867=== added file 'data/shaders/s3d_pixellit.vert'
868--- data/shaders/s3d_pixellit.vert 1970-01-01 00:00:00 +0000
869+++ data/shaders/s3d_pixellit.vert 2015-04-01 10:27:06 +0000
870@@ -0,0 +1,137 @@
871+/*
872+ * Stellarium Scenery3d Plug-in
873+ *
874+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
875+ *
876+ * This program is free software; you can redistribute it and/or
877+ * modify it under the terms of the GNU General Public License
878+ * as published by the Free Software Foundation; either version 2
879+ * of the License, or (at your option) any later version.
880+ *
881+ * This program is distributed in the hope that it will be useful,
882+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
883+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
884+ * GNU General Public License for more details.
885+ *
886+ * You should have received a copy of the GNU General Public License
887+ * along with this program; if not, write to the Free Software
888+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
889+ */
890+
891+
892+/*
893+This is a shader for phong/per-pixel lighting.
894+*/
895+
896+//macros that can be set by ShaderManager (simple true/false flags)
897+#define SHADOWS 1
898+#define SINGLE_SHADOW_FRUSTUM 0
899+#define BUMP 1
900+#define HEIGHT 1
901+#define GEOMETRY_SHADER 0
902+
903+//matrices
904+uniform mat4 u_mModelView;
905+#if ! GEOMETRY_SHADER
906+uniform mat4 u_mProjection;
907+#endif
908+uniform mat3 u_mNormal;
909+
910+uniform vec3 u_vLightDirectionView; //in view space, from point to light
911+
912+#if SHADOWS
913+//shadow transforms
914+uniform mat4 u_mShadow0;
915+#if !SINGLE_SHADOW_FRUSTUM
916+uniform mat4 u_mShadow1;
917+uniform mat4 u_mShadow2;
918+uniform mat4 u_mShadow3;
919+#endif
920+#endif
921+
922+attribute vec4 a_vertex;
923+attribute vec3 a_normal;
924+attribute vec2 a_texcoord;
925+#if BUMP
926+attribute vec4 a_tangent;
927+#endif
928+
929+#if GEOMETRY_SHADER
930+#define VAR_TEXCOORD v_texcoordGS
931+#define VAR_NORMAL v_normalGS
932+#define VAR_LIGHTVEC v_lightVecGS
933+#define VAR_VIEWPOS v_viewPosGS
934+#define VAR_SHADOWCOORD0 v_shadowCoord0GS
935+#define VAR_SHADOWCOORD1 v_shadowCoord1GS
936+#define VAR_SHADOWCOORD2 v_shadowCoord2GS
937+#define VAR_SHADOWCOORD3 v_shadowCoord3GS
938+#else
939+#define VAR_TEXCOORD v_texcoord
940+#define VAR_NORMAL v_normal
941+#define VAR_LIGHTVEC v_lightVec
942+#define VAR_VIEWPOS v_viewPos
943+#define VAR_SHADOWCOORD0 v_shadowCoord0
944+#define VAR_SHADOWCOORD1 v_shadowCoord1
945+#define VAR_SHADOWCOORD2 v_shadowCoord2
946+#define VAR_SHADOWCOORD3 v_shadowCoord3
947+#endif
948+
949+varying vec3 VAR_NORMAL; //normal in view space
950+varying vec2 VAR_TEXCOORD;
951+varying vec3 VAR_LIGHTVEC; //light vector, in VIEW or TBN space according to bump settings
952+varying vec3 VAR_VIEWPOS; //position of fragment in view space
953+
954+#if SHADOWS
955+//varying arrays seem to cause some problems, so we use 4 vecs for now...
956+varying vec4 VAR_SHADOWCOORD0;
957+#if !SINGLE_SHADOW_FRUSTUM
958+varying vec4 VAR_SHADOWCOORD1;
959+varying vec4 VAR_SHADOWCOORD2;
960+varying vec4 VAR_SHADOWCOORD3;
961+#endif
962+#endif
963+
964+void main(void)
965+{
966+ //transform normal
967+ VAR_NORMAL = normalize(u_mNormal * a_normal);
968+
969+ //pass on tex coord
970+ VAR_TEXCOORD = a_texcoord;
971+
972+ //calc vertex pos in view space
973+ vec4 viewPos = u_mModelView * a_vertex;
974+ VAR_VIEWPOS = viewPos.xyz;
975+
976+ #if SHADOWS
977+ //calculate shadowmap coords
978+ VAR_SHADOWCOORD0 = u_mShadow0 * a_vertex;
979+ #if !SINGLE_SHADOW_FRUSTUM
980+ VAR_SHADOWCOORD1 = u_mShadow1 * a_vertex;
981+ VAR_SHADOWCOORD2 = u_mShadow2 * a_vertex;
982+ VAR_SHADOWCOORD3 = u_mShadow3 * a_vertex;
983+ #endif
984+ #endif
985+
986+ #if BUMP
987+ //create View-->TBN matrix
988+ vec3 t = normalize(u_mNormal * a_tangent.xyz);
989+ //bitangent recreated from normal and tangent instead passed as attribute for a bit more orthonormality
990+ vec3 b = cross(VAR_NORMAL, t) * a_tangent.w; //w coordinate stores handedness of tangent space
991+
992+ mat3 TBN = mat3(t.x, b.x, VAR_NORMAL.x,
993+ t.y, b.y, VAR_NORMAL.y,
994+ t.z, b.z, VAR_NORMAL.z);
995+ VAR_LIGHTVEC = TBN * u_vLightDirectionView;
996+ VAR_VIEWPOS = TBN * VAR_VIEWPOS;
997+ #else
998+ VAR_LIGHTVEC = u_vLightDirectionView;
999+ #endif
1000+
1001+ //calc final position
1002+ #if GEOMETRY_SHADER
1003+ gl_Position = a_vertex; //pass on unchanged
1004+ #else
1005+ gl_Position = u_mProjection * viewPos;
1006+ #endif
1007+}
1008\ No newline at end of file
1009
1010=== added file 'data/shaders/s3d_pixellit_es.frag'
1011--- data/shaders/s3d_pixellit_es.frag 1970-01-01 00:00:00 +0000
1012+++ data/shaders/s3d_pixellit_es.frag 2015-04-01 10:27:06 +0000
1013@@ -0,0 +1,277 @@
1014+/*
1015+ * Stellarium Scenery3d Plug-in
1016+ *
1017+ * Copyright (C) 2014, 2015 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1018+ *
1019+ * This program is free software; you can redistribute it and/or
1020+ * modify it under the terms of the GNU General Public License
1021+ * as published by the Free Software Foundation; either version 2
1022+ * of the License, or (at your option) any later version.
1023+ *
1024+ * This program is distributed in the hope that it will be useful,
1025+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1026+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1027+ * GNU General Public License for more details.
1028+ *
1029+ * You should have received a copy of the GNU General Public License
1030+ * along with this program; if not, write to the Free Software
1031+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1032+ */
1033+
1034+
1035+/*
1036+This is a shader for phong/per-pixel lighting with shadowing and bumpmapping.
1037+This is a reduced version of the shader for OpenGL ES2, without shadow filtering/PCSS
1038+*/
1039+
1040+//macros that can be set by ShaderManager (simple true/false flags)
1041+#define BLENDING 1
1042+#define SHADOWS 1
1043+#define SINGLE_SHADOW_FRUSTUM 1
1044+#define MAT_DIFFUSETEX 1
1045+#define MAT_EMISSIVETEX 1
1046+#define MAT_SPECULAR 1
1047+#define BUMP 1
1048+#define HEIGHT 1
1049+#define ALPHATEST 1
1050+#define TORCH 1
1051+
1052+#if MAT_DIFFUSETEX
1053+uniform sampler2D u_texDiffuse;
1054+#endif
1055+#if MAT_EMISSIVETEX
1056+uniform sampler2D u_texEmissive;
1057+#endif
1058+#if BUMP
1059+uniform sampler2D u_texBump;
1060+#endif
1061+#if HEIGHT
1062+uniform sampler2D u_texHeight;
1063+#endif
1064+
1065+//material info
1066+uniform mediump vec3 u_vMixAmbient; // = light ambient * mtl ambient/diffuse depending on Illum model
1067+uniform mediump vec3 u_vMixDiffuse; // light diffuse * mat diffuse
1068+#if MAT_SPECULAR
1069+uniform mediump vec3 u_vMixSpecular;
1070+uniform mediump float u_vMatShininess;
1071+#endif
1072+uniform mediump float u_vMatAlpha;
1073+
1074+uniform mediump vec3 u_vMixEmissive;
1075+
1076+#if SHADOWS
1077+//in a later version, this may become configurable
1078+#if SINGLE_SHADOW_FRUSTUM
1079+#define FRUSTUM_SPLITS 1
1080+#else
1081+#define FRUSTUM_SPLITS 4
1082+#endif
1083+//shadow related uniforms
1084+uniform mediump vec4 u_vSplits; //the frustum splits
1085+
1086+//Basic opengl ES2 does not have shadow samplers, so we compare ourselves
1087+#define SHADOWSAMPLER sampler2D
1088+
1089+//for some reason, Intel does absolutely not like it if the shadowmaps are passed as an array
1090+//nothing is drawn, but no error is shown ...
1091+//therefore, use 4 ugly uniforms
1092+uniform mediump SHADOWSAMPLER u_texShadow0;
1093+#if !SINGLE_SHADOW_FRUSTUM
1094+uniform mediump SHADOWSAMPLER u_texShadow1;
1095+uniform mediump SHADOWSAMPLER u_texShadow2;
1096+uniform mediump SHADOWSAMPLER u_texShadow3;
1097+#endif
1098+
1099+#endif //SHADOWS
1100+
1101+#if ALPHATEST
1102+uniform lowp float u_fAlphaThresh;
1103+#endif
1104+
1105+#if TORCH
1106+uniform mediump vec3 u_vMixTorchDiffuse;
1107+uniform mediump float u_fTorchAttenuation;
1108+#endif
1109+
1110+varying mediump vec3 v_normal;
1111+varying mediump vec2 v_texcoord;
1112+varying mediump vec3 v_lightVec; //light vector, in VIEW or TBN space according to bump settings
1113+varying mediump vec3 v_viewPos; //position of fragment in view space
1114+
1115+#if SHADOWS
1116+//varying arrays seem to cause some problems, so we use 4 vecs for now...
1117+varying mediump vec4 v_shadowCoord0;
1118+#if !SINGLE_SHADOW_FRUSTUM
1119+varying mediump vec4 v_shadowCoord1;
1120+varying mediump vec4 v_shadowCoord2;
1121+varying mediump vec4 v_shadowCoord3;
1122+#endif
1123+#endif
1124+
1125+#if SHADOWS
1126+
1127+lowp float sampleShadow(in mediump SHADOWSAMPLER tex, in mediump vec4 coord)
1128+{
1129+ mediump vec3 texC = coord.xyz / coord.w;
1130+ //no filtering performed, just return the sampled tex
1131+ return (texture2D(tex,texC.xy).r > texC.z ? 1.0 : 0.0);
1132+}
1133+
1134+lowp float getShadow()
1135+{
1136+ //simplification of the smap.f.glsl shader
1137+ //IMPORTANT: use clip coords here, not distance to camera
1138+ mediump float dist = gl_FragCoord.z;
1139+
1140+ //check in which split the fragment falls
1141+ //I tried using indices to simplify the code a bit, but this lead to very strange artifacts...
1142+ //If all calculations are correct, this should be 1cm
1143+ if(dist < u_vSplits.x)
1144+ {
1145+ return sampleShadow(u_texShadow0,v_shadowCoord0);
1146+ }
1147+ #if !SINGLE_SHADOW_FRUSTUM
1148+ else if(dist < u_vSplits.y)
1149+ {
1150+ return sampleShadow(u_texShadow1,v_shadowCoord1);
1151+ }
1152+ else if(dist < u_vSplits.z)
1153+ {
1154+ return sampleShadow(u_texShadow2,v_shadowCoord2);
1155+ }
1156+ else if(dist < u_vSplits.w)
1157+ {
1158+ return sampleShadow(u_texShadow3,v_shadowCoord3);
1159+ }
1160+ #endif
1161+
1162+ return 1.0;
1163+}
1164+#endif
1165+
1166+void calcLighting(in mediump vec3 normal,in mediump vec3 eye,out mediump vec3 texCol,out mediump vec3 specCol)
1167+{
1168+ mediump vec3 L = v_lightVec; //no normalize here, or it may cause divide by zero
1169+
1170+ //basic lambert term
1171+ mediump float NdotL = clamp(dot(normal, L),0.0,1.0);
1172+#if BUMP
1173+ //use the original NdotL (which equals L.z because original normal is (0,0,1) in TBN space!) to modify the result
1174+ //this hides incorrect illumination on the backside of objects
1175+ mediump float origNormalFactor = 1.0 - 1.0 / (1.0 + 100.0 * max(L.z,0.0));
1176+ NdotL *= origNormalFactor;
1177+#endif
1178+ mediump vec3 Idiff = u_vMixDiffuse * NdotL;
1179+
1180+
1181+#if SHADOWS
1182+ lowp float shd = getShadow();
1183+ Idiff *= shd;
1184+#endif
1185+
1186+#if TORCH
1187+ //calculate additional diffuse, modeled by a point light centered on the cam pos
1188+ mediump float camDistSq = dot(v_viewPos,v_viewPos);
1189+ mediump float att = max(0.0, 1.0 - camDistSq * u_fTorchAttenuation);
1190+ att *= att;
1191+
1192+ Idiff += att * u_vMixTorchDiffuse * max(0.0, dot(normal,eye));
1193+#endif
1194+
1195+ #if MAT_SPECULAR
1196+ if(NdotL>0.001)
1197+ {
1198+ //calculate phong reflection vector
1199+ mediump vec3 R = reflect(-L,normal);
1200+
1201+ mediump float RdotE = dot(normalize(R), eye);
1202+
1203+ if(RdotE>0.0)
1204+ {
1205+ //specular term according to Phong model (light specular is assumed to be white for now)
1206+ specCol = u_vMixSpecular * pow( RdotE, u_vMatShininess);
1207+ #if SHADOWS
1208+ specCol *= shd;
1209+ #endif
1210+ #if BUMP
1211+ specCol *= origNormalFactor;
1212+ #endif
1213+ }
1214+ else
1215+ {
1216+ specCol = vec3(0,0,0);
1217+ }
1218+ }
1219+ else
1220+ {
1221+ specCol = vec3(0,0,0);
1222+ }
1223+ #else
1224+ specCol = vec3(0,0,0);
1225+ #endif
1226+
1227+ texCol = u_vMixAmbient + Idiff;
1228+}
1229+
1230+#if BUMP
1231+mediump vec3 getBumpNormal(mediump vec2 texCoords)
1232+{
1233+ return texture2D(u_texBump, texCoords).xyz * 2.0 - 1.0;
1234+}
1235+#endif
1236+
1237+#if HEIGHT
1238+const mediump float heightScale = 0.015; //const for now
1239+#endif
1240+
1241+void main(void)
1242+{
1243+#if MAT_DIFFUSETEX
1244+ lowp vec4 texVal = texture2D(u_texDiffuse,v_texcoord);
1245+ #if ALPHATEST
1246+ //check if alpha lies below threshold
1247+ if(texVal.a < u_fAlphaThresh)
1248+ discard;
1249+ #endif
1250+#endif
1251+
1252+ mediump vec2 texCoords = v_texcoord;
1253+ mediump vec3 eye = normalize(-v_viewPos);
1254+
1255+ #if HEIGHT
1256+ //pertube texture coords with heightmap
1257+ mediump float height = texture2D(u_texHeight, texCoords).r;
1258+ //*scale +bias
1259+ height = height * heightScale - 0.5*heightScale;
1260+
1261+ texCoords = texCoords + (height * eye.xz);
1262+ #endif
1263+
1264+ #if BUMP
1265+ mediump vec3 normal = getBumpNormal(texCoords);
1266+ #else
1267+ mediump vec3 normal = v_normal;
1268+ #endif
1269+
1270+ mediump vec3 texCol,specCol; //texCol gets multiplied with diffuse map, specCol not
1271+ calcLighting(normalize(normal),eye,texCol,specCol);
1272+
1273+ #if MAT_EMISSIVETEX
1274+ //use existing specCol to avoid using another vec3
1275+ specCol += u_vMixEmissive * texture2D(u_texEmissive,v_texcoord).rgb;
1276+ #else
1277+ specCol += u_vMixEmissive;
1278+ #endif
1279+
1280+#if MAT_DIFFUSETEX
1281+ #if BLENDING
1282+ gl_FragColor = vec4(texCol * texVal.rgb + specCol,u_vMatAlpha * texVal.a);
1283+ #else
1284+ //gl_FragColor = vec4(texCol * texVal.rgb + specCol, 1.0);
1285+ gl_FragColor = vec4(texCol * texVal.rgb + specCol, 1.0);
1286+ #endif
1287+#else
1288+ gl_FragColor = vec4(texCol + specCol,u_vMatAlpha); //u_vMatAlpha is automatically set to 1.0 if blending is disabled
1289+#endif
1290+}
1291\ No newline at end of file
1292
1293=== added file 'data/shaders/s3d_texture.frag'
1294--- data/shaders/s3d_texture.frag 1970-01-01 00:00:00 +0000
1295+++ data/shaders/s3d_texture.frag 2015-04-01 10:27:06 +0000
1296@@ -0,0 +1,33 @@
1297+/*
1298+ * Stellarium Scenery3d Plug-in
1299+ *
1300+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1301+ *
1302+ * This program is free software; you can redistribute it and/or
1303+ * modify it under the terms of the GNU General Public License
1304+ * as published by the Free Software Foundation; either version 2
1305+ * of the License, or (at your option) any later version.
1306+ *
1307+ * This program is distributed in the hope that it will be useful,
1308+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1309+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1310+ * GNU General Public License for more details.
1311+ *
1312+ * You should have received a copy of the GNU General Public License
1313+ * along with this program; if not, write to the Free Software
1314+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1315+ */
1316+
1317+
1318+/*
1319+This is a shader that applies a texture to pre-transformed geometry
1320+*/
1321+
1322+uniform sampler2D u_texDiffuse;
1323+
1324+varying mediump vec2 v_texcoord;
1325+
1326+void main(void)
1327+{
1328+ gl_FragColor = texture2D(u_texDiffuse, v_texcoord);
1329+}
1330\ No newline at end of file
1331
1332=== added file 'data/shaders/s3d_texture.vert'
1333--- data/shaders/s3d_texture.vert 1970-01-01 00:00:00 +0000
1334+++ data/shaders/s3d_texture.vert 2015-04-01 10:27:06 +0000
1335@@ -0,0 +1,38 @@
1336+/*
1337+ * Stellarium Scenery3d Plug-in
1338+ *
1339+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1340+ *
1341+ * This program is free software; you can redistribute it and/or
1342+ * modify it under the terms of the GNU General Public License
1343+ * as published by the Free Software Foundation; either version 2
1344+ * of the License, or (at your option) any later version.
1345+ *
1346+ * This program is distributed in the hope that it will be useful,
1347+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1348+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1349+ * GNU General Public License for more details.
1350+ *
1351+ * You should have received a copy of the GNU General Public License
1352+ * along with this program; if not, write to the Free Software
1353+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1354+ */
1355+
1356+
1357+/*
1358+This is a shader that applies a texture to pre-transformed geometry
1359+*/
1360+
1361+//matrices
1362+uniform mat4 u_mProjection;
1363+
1364+attribute vec3 a_vertex;
1365+attribute mediump vec2 a_texcoord;
1366+
1367+varying mediump vec2 v_texcoord;
1368+
1369+void main(void)
1370+{
1371+ v_texcoord = a_texcoord;
1372+ gl_Position = u_mProjection * vec4(a_vertex,1.0);
1373+}
1374\ No newline at end of file
1375
1376=== added file 'data/shaders/s3d_transform.frag'
1377--- data/shaders/s3d_transform.frag 1970-01-01 00:00:00 +0000
1378+++ data/shaders/s3d_transform.frag 2015-04-01 10:27:06 +0000
1379@@ -0,0 +1,41 @@
1380+/*
1381+ * Stellarium Scenery3d Plug-in
1382+ *
1383+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1384+ *
1385+ * This program is free software; you can redistribute it and/or
1386+ * modify it under the terms of the GNU General Public License
1387+ * as published by the Free Software Foundation; either version 2
1388+ * of the License, or (at your option) any later version.
1389+ *
1390+ * This program is distributed in the hope that it will be useful,
1391+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1392+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1393+ * GNU General Public License for more details.
1394+ *
1395+ * You should have received a copy of the GNU General Public License
1396+ * along with this program; if not, write to the Free Software
1397+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1398+ */
1399+
1400+
1401+/*
1402+This fragment shader is only used if the material is alpha-tested to allow for better shadows.
1403+*/
1404+
1405+#define ALPHATEST 1
1406+
1407+#if ALPHATEST
1408+uniform lowp float u_fAlphaThresh;
1409+uniform sampler2D u_texDiffuse;
1410+#endif
1411+
1412+varying mediump vec2 v_texcoord;
1413+
1414+void main(void)
1415+{
1416+#if ALPHATEST
1417+ if(texture2D(u_texDiffuse,v_texcoord).a < u_fAlphaThresh)
1418+ discard;
1419+#endif
1420+}
1421\ No newline at end of file
1422
1423=== added file 'data/shaders/s3d_transform.vert'
1424--- data/shaders/s3d_transform.vert 1970-01-01 00:00:00 +0000
1425+++ data/shaders/s3d_transform.vert 2015-04-01 10:27:06 +0000
1426@@ -0,0 +1,43 @@
1427+/*
1428+ * Stellarium Scenery3d Plug-in
1429+ *
1430+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1431+ *
1432+ * This program is free software; you can redistribute it and/or
1433+ * modify it under the terms of the GNU General Public License
1434+ * as published by the Free Software Foundation; either version 2
1435+ * of the License, or (at your option) any later version.
1436+ *
1437+ * This program is distributed in the hope that it will be useful,
1438+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1439+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1440+ * GNU General Public License for more details.
1441+ *
1442+ * You should have received a copy of the GNU General Public License
1443+ * along with this program; if not, write to the Free Software
1444+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1445+ */
1446+
1447+
1448+/*
1449+This is a shader for MVP transformation only. Used to fill depth maps.
1450+*/
1451+
1452+#define ALPHATEST 1
1453+
1454+//matrices
1455+uniform mat4 u_mMVP;
1456+
1457+attribute vec4 a_vertex;
1458+#if ALPHATEST
1459+attribute vec2 a_texcoord;
1460+varying mediump vec2 v_texcoord;
1461+#endif
1462+
1463+void main(void)
1464+{
1465+#if ALPHATEST
1466+ v_texcoord = a_texcoord;
1467+#endif
1468+ gl_Position = u_mMVP * a_vertex;
1469+}
1470\ No newline at end of file
1471
1472=== added file 'data/shaders/s3d_vertexlit.frag'
1473--- data/shaders/s3d_vertexlit.frag 1970-01-01 00:00:00 +0000
1474+++ data/shaders/s3d_vertexlit.frag 2015-04-01 10:27:06 +0000
1475@@ -0,0 +1,86 @@
1476+/*
1477+ * Stellarium Scenery3d Plug-in
1478+ *
1479+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1480+ *
1481+ * This program is free software; you can redistribute it and/or
1482+ * modify it under the terms of the GNU General Public License
1483+ * as published by the Free Software Foundation; either version 2
1484+ * of the License, or (at your option) any later version.
1485+ *
1486+ * This program is distributed in the hope that it will be useful,
1487+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1488+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1489+ * GNU General Public License for more details.
1490+ *
1491+ * You should have received a copy of the GNU General Public License
1492+ * along with this program; if not, write to the Free Software
1493+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1494+ */
1495+
1496+
1497+/*
1498+This is the fragment shader for vertex lighting, which does not need to do many things
1499+*/
1500+
1501+#define BLENDING 1
1502+#define MAT_DIFFUSETEX 1
1503+#define MAT_EMISSIVETEX 1
1504+#define MAT_SPECULAR 1
1505+#define ALPHATEST 1
1506+
1507+#if MAT_DIFFUSETEX
1508+uniform sampler2D u_texDiffuse;
1509+#endif
1510+#if MAT_EMISSIVETEX
1511+uniform sampler2D u_texEmissive;
1512+#endif
1513+
1514+#if ALPHATEST
1515+uniform lowp float u_fAlphaThresh;
1516+#endif
1517+
1518+uniform mediump vec3 u_vMixEmissive; //material emissive modulated by light angle
1519+uniform mediump float u_vMatAlpha;
1520+
1521+varying mediump vec2 v_texcoord;
1522+varying mediump vec3 v_texillumination;
1523+#if MAT_SPECULAR
1524+varying mediump vec3 v_specillumination;
1525+#endif
1526+
1527+void main(void)
1528+{
1529+#if MAT_DIFFUSETEX
1530+ lowp vec4 texVal = texture2D(u_texDiffuse,v_texcoord);
1531+
1532+ #if ALPHATEST
1533+ if(texVal.a < u_fAlphaThresh)
1534+ discard;
1535+ #endif
1536+
1537+ lowp vec3 color = v_texillumination * texVal.rgb;
1538+#else
1539+ lowp vec3 color = v_texillumination;
1540+#endif
1541+
1542+ #if MAT_SPECULAR
1543+ color += v_specillumination;
1544+ #endif
1545+
1546+ #if MAT_EMISSIVETEX
1547+ color += u_vMixEmissive * texture2D(u_texEmissive,v_texcoord).rgb;
1548+ #else
1549+ color += u_vMixEmissive;
1550+ #endif
1551+
1552+#if MAT_DIFFUSETEX
1553+ #if BLENDING
1554+ gl_FragColor = vec4(color, texVal.a * u_vMatAlpha);
1555+ #else
1556+ gl_FragColor = vec4(color, 1.0);
1557+ #endif
1558+#else
1559+ gl_FragColor = vec4(color,u_vMatAlpha); //u_vMatAlpha is automatically set to 1.0 if blending is disabled
1560+#endif
1561+}
1562\ No newline at end of file
1563
1564=== added file 'data/shaders/s3d_vertexlit.geom'
1565--- data/shaders/s3d_vertexlit.geom 1970-01-01 00:00:00 +0000
1566+++ data/shaders/s3d_vertexlit.geom 2015-04-01 10:27:06 +0000
1567@@ -0,0 +1,69 @@
1568+#version 150
1569+
1570+/*
1571+ * Stellarium Scenery3d Plug-in
1572+ *
1573+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1574+ *
1575+ * This program is free software; you can redistribute it and/or
1576+ * modify it under the terms of the GNU General Public License
1577+ * as published by the Free Software Foundation; either version 2
1578+ * of the License, or (at your option) any later version.
1579+ *
1580+ * This program is distributed in the hope that it will be useful,
1581+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1582+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1583+ * GNU General Public License for more details.
1584+ *
1585+ * You should have received a copy of the GNU General Public License
1586+ * along with this program; if not, write to the Free Software
1587+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1588+ */
1589+
1590+
1591+/*
1592+This is a geometry-shader (using 3.2 core functionality, #version 150) based acceleration of cubemap rendering.
1593+For vertex-based lighting, this is pretty simple: the lighting is performed in the
1594+ Vertex shader in a common view space
1595+*/
1596+
1597+#define MAT_SPECULAR 1
1598+
1599+layout(triangles) in;
1600+layout(triangle_strip,max_vertices = 18) out;
1601+
1602+in vec2 v_texcoordGS[];
1603+in vec3 v_texilluminationGS[];
1604+#if MAT_SPECULAR
1605+in vec3 v_specilluminationGS[];
1606+#endif
1607+
1608+out vec2 v_texcoord;
1609+out vec3 v_texillumination;
1610+#if MAT_SPECULAR
1611+out vec3 v_specillumination;
1612+#endif
1613+
1614+uniform mat4 u_mCubeMVP[6];
1615+
1616+void main(void)
1617+{
1618+ //iterate over cubemap faces
1619+ for(gl_Layer=0; gl_Layer<6;++gl_Layer)
1620+ {
1621+ //iterate over triangle vertices
1622+ for(int vtx = 0;vtx<3;++vtx)
1623+ {
1624+ //calc new position in current cubemap face
1625+ gl_Position = u_mCubeMVP[gl_Layer] * gl_in[vtx].gl_Position;
1626+ //pass on other varyings
1627+ v_texcoord = v_texcoordGS[vtx];
1628+ v_texillumination = v_texilluminationGS[vtx];
1629+ #if MAT_SPECULAR
1630+ v_specillumination = v_specilluminationGS[vtx];
1631+ #endif
1632+ EmitVertex();
1633+ }
1634+ EndPrimitive();
1635+ }
1636+}
1637\ No newline at end of file
1638
1639=== added file 'data/shaders/s3d_vertexlit.vert'
1640--- data/shaders/s3d_vertexlit.vert 1970-01-01 00:00:00 +0000
1641+++ data/shaders/s3d_vertexlit.vert 2015-04-01 10:27:06 +0000
1642@@ -0,0 +1,135 @@
1643+/*
1644+ * Stellarium Scenery3d Plug-in
1645+ *
1646+ * Copyright (C) 2014 Simon Parzer, Peter Neubauer, Georg Zotti, Andrei Borza, Florian Schaukowitsch
1647+ *
1648+ * This program is free software; you can redistribute it and/or
1649+ * modify it under the terms of the GNU General Public License
1650+ * as published by the Free Software Foundation; either version 2
1651+ * of the License, or (at your option) any later version.
1652+ *
1653+ * This program is distributed in the hope that it will be useful,
1654+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1655+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1656+ * GNU General Public License for more details.
1657+ *
1658+ * You should have received a copy of the GNU General Public License
1659+ * along with this program; if not, write to the Free Software
1660+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1661+ */
1662+
1663+
1664+/*
1665+This is a shader for basic vertex lighting. This should be the minimum quality supported.
1666+*/
1667+
1668+#define MAT_SPECULAR 1
1669+#define GEOMETRY_SHADER 1
1670+#define TORCH 1
1671+
1672+//matrices
1673+#if ! GEOMETRY_SHADER
1674+uniform mat4 u_mMVP;
1675+#endif
1676+uniform mat4 u_mModelView;
1677+uniform mat3 u_mNormal;
1678+
1679+//light info
1680+uniform mediump vec3 u_vLightDirectionView; //in view space
1681+
1682+//material info
1683+uniform mediump vec3 u_vMixAmbient; // = light ambient * mtl ambient/diffuse depending on Illum model
1684+uniform mediump vec3 u_vMixDiffuse; // light diffuse * mat diffuse
1685+#if MAT_SPECULAR
1686+uniform mediump vec3 u_vMixSpecular;
1687+uniform mediump float u_vMatShininess;
1688+#endif
1689+
1690+#if TORCH
1691+uniform mediump vec3 u_vMixTorchDiffuse;
1692+uniform mediump float u_fTorchAttenuation;
1693+#endif
1694+
1695+attribute vec4 a_vertex;
1696+attribute vec3 a_normal;
1697+attribute mediump vec2 a_texcoord;
1698+
1699+#if GEOMETRY_SHADER
1700+#define VAR_TEXCOORD v_texcoordGS
1701+#define VAR_TEXILLUMINATION v_texilluminationGS
1702+#define VAR_SPECILLUMINATION v_specilluminationGS
1703+#else
1704+#define VAR_TEXCOORD v_texcoord
1705+#define VAR_TEXILLUMINATION v_texillumination
1706+#define VAR_SPECILLUMINATION v_specillumination
1707+#endif
1708+
1709+varying mediump vec2 VAR_TEXCOORD;
1710+varying mediump vec3 VAR_TEXILLUMINATION;
1711+#if MAT_SPECULAR
1712+varying mediump vec3 VAR_SPECILLUMINATION;
1713+#endif
1714+
1715+void calcLighting(vec3 normal, vec3 viewPos, out vec3 texIll, out vec3 specIll)
1716+{
1717+ //basic lambert term
1718+ float NdotL = dot(normal, u_vLightDirectionView);
1719+ vec3 Idiff = u_vMixDiffuse * max(0.0,NdotL);
1720+
1721+#if MAT_SPECULAR || TORCH
1722+ vec3 eye = normalize(-viewPos);
1723+#endif
1724+
1725+#if TORCH
1726+ //calculate additional diffuse, modeled by a point light centered on the cam pos
1727+ float camDistSq = dot(viewPos,viewPos);
1728+ float att = max(0.0, 1.0 - camDistSq * u_fTorchAttenuation);
1729+ att *= att;
1730+
1731+ Idiff += att * u_vMixTorchDiffuse * max(0.0, dot(normal,eye));
1732+#endif
1733+
1734+ specIll = vec3(0,0,0);
1735+
1736+#if MAT_SPECULAR
1737+ if(NdotL>0.0)
1738+ {
1739+ //calculate phong reflection vector
1740+ vec3 R = reflect(-u_vLightDirectionView,normal);
1741+
1742+ float RdotE = dot(normalize(R), eye);
1743+
1744+ if(RdotE>0.0)
1745+ {
1746+ //specular term according to Phong model (light specular is assumed to be white for now)
1747+ specIll = u_vMixSpecular * pow( RdotE, u_vMatShininess);
1748+ }
1749+ }
1750+#endif
1751+
1752+ texIll = u_vMixAmbient + Idiff;
1753+}
1754+
1755+void main(void)
1756+{
1757+ //transform normal
1758+ vec3 normal = u_mNormal * a_normal;
1759+
1760+ vec4 viewPos = u_mModelView * a_vertex;
1761+
1762+ vec3 texIll,specIll;
1763+ calcLighting(normal,viewPos.xyz,texIll,specIll);
1764+
1765+ VAR_TEXILLUMINATION = texIll;
1766+ #if MAT_SPECULAR
1767+ VAR_SPECILLUMINATION = specIll;
1768+ #endif
1769+
1770+ VAR_TEXCOORD = a_texcoord;
1771+
1772+ #if GEOMETRY_SHADER
1773+ gl_Position = a_vertex; //pass on unchanged
1774+ #else
1775+ gl_Position = u_mMVP * a_vertex;
1776+ #endif
1777+}
1778\ No newline at end of file
1779
1780=== added directory 'plugins/Scenery3d'
1781=== added file 'plugins/Scenery3d/CMakeLists.txt'
1782--- plugins/Scenery3d/CMakeLists.txt 1970-01-01 00:00:00 +0000
1783+++ plugins/Scenery3d/CMakeLists.txt 2015-04-01 10:27:06 +0000
1784@@ -0,0 +1,13 @@
1785+SET(SCENERY3D_VERSION "0.13.0")
1786+
1787+ADD_DEFINITIONS(-DSCENERY3D_PLUGIN_VERSION="${SCENERY3D_VERSION}")
1788+
1789+ADD_SUBDIRECTORY( src )
1790+
1791+IF(APPLE)
1792+ SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/Library/Application\ Support/Stellarium)
1793+ElSE(APPLE)
1794+ SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/.stellarium)
1795+ENDIF(APPLE)
1796+
1797+INSTALL(FILES DESTINATION "modules/Scenery3d")
1798
1799=== added file 'plugins/Scenery3d/COPYING'
1800--- plugins/Scenery3d/COPYING 1970-01-01 00:00:00 +0000
1801+++ plugins/Scenery3d/COPYING 2015-04-01 10:27:06 +0000
1802@@ -0,0 +1,340 @@
1803+ GNU GENERAL PUBLIC LICENSE
1804+ Version 2, June 1991
1805+
1806+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
1807+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1808+ Everyone is permitted to copy and distribute verbatim copies
1809+ of this license document, but changing it is not allowed.
1810+
1811+ Preamble
1812+
1813+ The licenses for most software are designed to take away your
1814+freedom to share and change it. By contrast, the GNU General Public
1815+License is intended to guarantee your freedom to share and change free
1816+software--to make sure the software is free for all its users. This
1817+General Public License applies to most of the Free Software
1818+Foundation's software and to any other program whose authors commit to
1819+using it. (Some other Free Software Foundation software is covered by
1820+the GNU Library General Public License instead.) You can apply it to
1821+your programs, too.
1822+
1823+ When we speak of free software, we are referring to freedom, not
1824+price. Our General Public Licenses are designed to make sure that you
1825+have the freedom to distribute copies of free software (and charge for
1826+this service if you wish), that you receive source code or can get it
1827+if you want it, that you can change the software or use pieces of it
1828+in new free programs; and that you know you can do these things.
1829+
1830+ To protect your rights, we need to make restrictions that forbid
1831+anyone to deny you these rights or to ask you to surrender the rights.
1832+These restrictions translate to certain responsibilities for you if you
1833+distribute copies of the software, or if you modify it.
1834+
1835+ For example, if you distribute copies of such a program, whether
1836+gratis or for a fee, you must give the recipients all the rights that
1837+you have. You must make sure that they, too, receive or can get the
1838+source code. And you must show them these terms so they know their
1839+rights.
1840+
1841+ We protect your rights with two steps: (1) copyright the software, and
1842+(2) offer you this license which gives you legal permission to copy,
1843+distribute and/or modify the software.
1844+
1845+ Also, for each author's protection and ours, we want to make certain
1846+that everyone understands that there is no warranty for this free
1847+software. If the software is modified by someone else and passed on, we
1848+want its recipients to know that what they have is not the original, so
1849+that any problems introduced by others will not reflect on the original
1850+authors' reputations.
1851+
1852+ Finally, any free program is threatened constantly by software
1853+patents. We wish to avoid the danger that redistributors of a free
1854+program will individually obtain patent licenses, in effect making the
1855+program proprietary. To prevent this, we have made it clear that any
1856+patent must be licensed for everyone's free use or not licensed at all.
1857+
1858+ The precise terms and conditions for copying, distribution and
1859+modification follow.
1860+
1861
1862+ GNU GENERAL PUBLIC LICENSE
1863+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1864+
1865+ 0. This License applies to any program or other work which contains
1866+a notice placed by the copyright holder saying it may be distributed
1867+under the terms of this General Public License. The "Program", below,
1868+refers to any such program or work, and a "work based on the Program"
1869+means either the Program or any derivative work under copyright law:
1870+that is to say, a work containing the Program or a portion of it,
1871+either verbatim or with modifications and/or translated into another
1872+language. (Hereinafter, translation is included without limitation in
1873+the term "modification".) Each licensee is addressed as "you".
1874+
1875+Activities other than copying, distribution and modification are not
1876+covered by this License; they are outside its scope. The act of
1877+running the Program is not restricted, and the output from the Program
1878+is covered only if its contents constitute a work based on the
1879+Program (independent of having been made by running the Program).
1880+Whether that is true depends on what the Program does.
1881+
1882+ 1. You may copy and distribute verbatim copies of the Program's
1883+source code as you receive it, in any medium, provided that you
1884+conspicuously and appropriately publish on each copy an appropriate
1885+copyright notice and disclaimer of warranty; keep intact all the
1886+notices that refer to this License and to the absence of any warranty;
1887+and give any other recipients of the Program a copy of this License
1888+along with the Program.
1889+
1890+You may charge a fee for the physical act of transferring a copy, and
1891+you may at your option offer warranty protection in exchange for a fee.
1892+
1893+ 2. You may modify your copy or copies of the Program or any portion
1894+of it, thus forming a work based on the Program, and copy and
1895+distribute such modifications or work under the terms of Section 1
1896+above, provided that you also meet all of these conditions:
1897+
1898+ a) You must cause the modified files to carry prominent notices
1899+ stating that you changed the files and the date of any change.
1900+
1901+ b) You must cause any work that you distribute or publish, that in
1902+ whole or in part contains or is derived from the Program or any
1903+ part thereof, to be licensed as a whole at no charge to all third
1904+ parties under the terms of this License.
1905+
1906+ c) If the modified program normally reads commands interactively
1907+ when run, you must cause it, when started running for such
1908+ interactive use in the most ordinary way, to print or display an
1909+ announcement including an appropriate copyright notice and a
1910+ notice that there is no warranty (or else, saying that you provide
1911+ a warranty) and that users may redistribute the program under
1912+ these conditions, and telling the user how to view a copy of this
1913+ License. (Exception: if the Program itself is interactive but
1914+ does not normally print such an announcement, your work based on
1915+ the Program is not required to print an announcement.)
1916+
1917
1918+These requirements apply to the modified work as a whole. If
1919+identifiable sections of that work are not derived from the Program,
1920+and can be reasonably considered independent and separate works in
1921+themselves, then this License, and its terms, do not apply to those
1922+sections when you distribute them as separate works. But when you
1923+distribute the same sections as part of a whole which is a work based
1924+on the Program, the distribution of the whole must be on the terms of
1925+this License, whose permissions for other licensees extend to the
1926+entire whole, and thus to each and every part regardless of who wrote it.
1927+
1928+Thus, it is not the intent of this section to claim rights or contest
1929+your rights to work written entirely by you; rather, the intent is to
1930+exercise the right to control the distribution of derivative or
1931+collective works based on the Program.
1932+
1933+In addition, mere aggregation of another work not based on the Program
1934+with the Program (or with a work based on the Program) on a volume of
1935+a storage or distribution medium does not bring the other work under
1936+the scope of this License.
1937+
1938+ 3. You may copy and distribute the Program (or a work based on it,
1939+under Section 2) in object code or executable form under the terms of
1940+Sections 1 and 2 above provided that you also do one of the following:
1941+
1942+ a) Accompany it with the complete corresponding machine-readable
1943+ source code, which must be distributed under the terms of Sections
1944+ 1 and 2 above on a medium customarily used for software interchange; or,
1945+
1946+ b) Accompany it with a written offer, valid for at least three
1947+ years, to give any third party, for a charge no more than your
1948+ cost of physically performing source distribution, a complete
1949+ machine-readable copy of the corresponding source code, to be
1950+ distributed under the terms of Sections 1 and 2 above on a medium
1951+ customarily used for software interchange; or,
1952+
1953+ c) Accompany it with the information you received as to the offer
1954+ to distribute corresponding source code. (This alternative is
1955+ allowed only for noncommercial distribution and only if you
1956+ received the program in object code or executable form with such
1957+ an offer, in accord with Subsection b above.)
1958+
1959+The source code for a work means the preferred form of the work for
1960+making modifications to it. For an executable work, complete source
1961+code means all the source code for all modules it contains, plus any
1962+associated interface definition files, plus the scripts used to
1963+control compilation and installation of the executable. However, as a
1964+special exception, the source code distributed need not include
1965+anything that is normally distributed (in either source or binary
1966+form) with the major components (compiler, kernel, and so on) of the
1967+operating system on which the executable runs, unless that component
1968+itself accompanies the executable.
1969+
1970+If distribution of executable or object code is made by offering
1971+access to copy from a designated place, then offering equivalent
1972+access to copy the source code from the same place counts as
1973+distribution of the source code, even though third parties are not
1974+compelled to copy the source along with the object code.
1975+
1976
1977+ 4. You may not copy, modify, sublicense, or distribute the Program
1978+except as expressly provided under this License. Any attempt
1979+otherwise to copy, modify, sublicense or distribute the Program is
1980+void, and will automatically terminate your rights under this License.
1981+However, parties who have received copies, or rights, from you under
1982+this License will not have their licenses terminated so long as such
1983+parties remain in full compliance.
1984+
1985+ 5. You are not required to accept this License, since you have not
1986+signed it. However, nothing else grants you permission to modify or
1987+distribute the Program or its derivative works. These actions are
1988+prohibited by law if you do not accept this License. Therefore, by
1989+modifying or distributing the Program (or any work based on the
1990+Program), you indicate your acceptance of this License to do so, and
1991+all its terms and conditions for copying, distributing or modifying
1992+the Program or works based on it.
1993+
1994+ 6. Each time you redistribute the Program (or any work based on the
1995+Program), the recipient automatically receives a license from the
1996+original licensor to copy, distribute or modify the Program subject to
1997+these terms and conditions. You may not impose any further
1998+restrictions on the recipients' exercise of the rights granted herein.
1999+You are not responsible for enforcing compliance by third parties to
2000+this License.
2001+
2002+ 7. If, as a consequence of a court judgment or allegation of patent
2003+infringement or for any other reason (not limited to patent issues),
2004+conditions are imposed on you (whether by court order, agreement or
2005+otherwise) that contradict the conditions of this License, they do not
2006+excuse you from the conditions of this License. If you cannot
2007+distribute so as to satisfy simultaneously your obligations under this
2008+License and any other pertinent obligations, then as a consequence you
2009+may not distribute the Program at all. For example, if a patent
2010+license would not permit royalty-free redistribution of the Program by
2011+all those who receive copies directly or indirectly through you, then
2012+the only way you could satisfy both it and this License would be to
2013+refrain entirely from distribution of the Program.
2014+
2015+If any portion of this section is held invalid or unenforceable under
2016+any particular circumstance, the balance of the section is intended to
2017+apply and the section as a whole is intended to apply in other
2018+circumstances.
2019+
2020+It is not the purpose of this section to induce you to infringe any
2021+patents or other property right claims or to contest validity of any
2022+such claims; this section has the sole purpose of protecting the
2023+integrity of the free software distribution system, which is
2024+implemented by public license practices. Many people have made
2025+generous contributions to the wide range of software distributed
2026+through that system in reliance on consistent application of that
2027+system; it is up to the author/donor to decide if he or she is willing
2028+to distribute software through any other system and a licensee cannot
2029+impose that choice.
2030+
2031+This section is intended to make thoroughly clear what is believed to
2032+be a consequence of the rest of this License.
2033+
2034
2035+ 8. If the distribution and/or use of the Program is restricted in
2036+certain countries either by patents or by copyrighted interfaces, the
2037+original copyright holder who places the Program under this License
2038+may add an explicit geographical distribution limitation excluding
2039+those countries, so that distribution is permitted only in or among
2040+countries not thus excluded. In such case, this License incorporates
2041+the limitation as if written in the body of this License.
2042+
2043+ 9. The Free Software Foundation may publish revised and/or new versions
2044+of the General Public License from time to time. Such new versions will
2045+be similar in spirit to the present version, but may differ in detail to
2046+address new problems or concerns.
2047+
2048+Each version is given a distinguishing version number. If the Program
2049+specifies a version number of this License which applies to it and "any
2050+later version", you have the option of following the terms and conditions
2051+either of that version or of any later version published by the Free
2052+Software Foundation. If the Program does not specify a version number of
2053+this License, you may choose any version ever published by the Free Software
2054+Foundation.
2055+
2056+ 10. If you wish to incorporate parts of the Program into other free
2057+programs whose distribution conditions are different, write to the author
2058+to ask for permission. For software which is copyrighted by the Free
2059+Software Foundation, write to the Free Software Foundation; we sometimes
2060+make exceptions for this. Our decision will be guided by the two goals
2061+of preserving the free status of all derivatives of our free software and
2062+of promoting the sharing and reuse of software generally.
2063+
2064+ NO WARRANTY
2065+
2066+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2067+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
2068+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2069+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2070+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2071+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
2072+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
2073+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2074+REPAIR OR CORRECTION.
2075+
2076+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2077+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2078+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2079+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2080+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2081+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2082+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2083+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2084+POSSIBILITY OF SUCH DAMAGES.
2085+
2086+ END OF TERMS AND CONDITIONS
2087+
2088
2089+ How to Apply These Terms to Your New Programs
2090+
2091+ If you develop a new program, and you want it to be of the greatest
2092+possible use to the public, the best way to achieve this is to make it
2093+free software which everyone can redistribute and change under these terms.
2094+
2095+ To do so, attach the following notices to the program. It is safest
2096+to attach them to the start of each source file to most effectively
2097+convey the exclusion of warranty; and each file should have at least
2098+the "copyright" line and a pointer to where the full notice is found.
2099+
2100+ <one line to give the program's name and a brief idea of what it does.>
2101+ Copyright (C) <year> <name of author>
2102+
2103+ This program is free software; you can redistribute it and/or modify
2104+ it under the terms of the GNU General Public License as published by
2105+ the Free Software Foundation; either version 2 of the License, or
2106+ (at your option) any later version.
2107+
2108+ This program is distributed in the hope that it will be useful,
2109+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2110+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2111+ GNU General Public License for more details.
2112+
2113+ You should have received a copy of the GNU General Public License
2114+ along with this program; if not, write to the Free Software
2115+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2116+
2117+
2118+Also add information on how to contact you by electronic and paper mail.
2119+
2120+If the program is interactive, make it output a short notice like this
2121+when it starts in an interactive mode:
2122+
2123+ Gnomovision version 69, Copyright (C) year name of author
2124+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2125+ This is free software, and you are welcome to redistribute it
2126+ under certain conditions; type `show c' for details.
2127+
2128+The hypothetical commands `show w' and `show c' should show the appropriate
2129+parts of the General Public License. Of course, the commands you use may
2130+be called something other than `show w' and `show c'; they could even be
2131+mouse-clicks or menu items--whatever suits your program.
2132+
2133+You should also get your employer (if you work as a programmer) or your
2134+school, if any, to sign a "copyright disclaimer" for the program, if
2135+necessary. Here is a sample; alter the names:
2136+
2137+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2138+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
2139+
2140+ <signature of Ty Coon>, 1 April 1989
2141+ Ty Coon, President of Vice
2142+
2143+This General Public License does not permit incorporating your program into
2144+proprietary programs. If your program is a subroutine library, you may
2145+consider it more useful to permit linking proprietary applications with the
2146+library. If this is what you want to do, use the GNU Library General
2147+Public License instead of this License.
2148
2149=== added file 'plugins/Scenery3d/Doxyfile'
2150--- plugins/Scenery3d/Doxyfile 1970-01-01 00:00:00 +0000
2151+++ plugins/Scenery3d/Doxyfile 2015-04-01 10:27:06 +0000
2152@@ -0,0 +1,1484 @@
2153+# Doxyfile 1.5.8
2154+
2155+# This file describes the settings to be used by the documentation system
2156+# doxygen (www.doxygen.org) for a project
2157+#
2158+# All text after a hash (#) is considered a comment and will be ignored
2159+# The format is:
2160+# TAG = value [value, ...]
2161+# For lists items can also be appended using:
2162+# TAG += value [value, ...]
2163+# Values that contain spaces should be placed between quotes (" ")
2164+
2165+#---------------------------------------------------------------------------
2166+# Project related configuration options
2167+#---------------------------------------------------------------------------
2168+
2169+# This tag specifies the encoding used for all characters in the config file
2170+# that follow. The default is UTF-8 which is also the encoding used for all
2171+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
2172+# iconv built into libc) for the transcoding. See
2173+# http://www.gnu.org/software/libiconv for the list of possible encodings.
2174+
2175+DOXYFILE_ENCODING = UTF-8
2176+
2177+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
2178+# by quotes) that should identify the project.
2179+
2180+PROJECT_NAME = "Scenery3d Plug-in"
2181+
2182+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
2183+# This could be handy for archiving the generated documentation or
2184+# if some version control system is used.
2185+
2186+PROJECT_NUMBER =
2187+
2188+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
2189+# base path where the generated documentation will be put.
2190+# If a relative path is entered, it will be relative to the location
2191+# where doxygen was started. If left blank the current directory will be used.
2192+
2193+OUTPUT_DIRECTORY = ./doc
2194+
2195+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
2196+# 4096 sub-directories (in 2 levels) under the output directory of each output
2197+# format and will distribute the generated files over these directories.
2198+# Enabling this option can be useful when feeding doxygen a huge amount of
2199+# source files, where putting all generated files in the same directory would
2200+# otherwise cause performance problems for the file system.
2201+
2202+CREATE_SUBDIRS = NO
2203+
2204+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
2205+# documentation generated by doxygen is written. Doxygen will use this
2206+# information to generate all constant output in the proper language.
2207+# The default language is English, other supported languages are:
2208+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
2209+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
2210+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
2211+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
2212+# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene,
2213+# Spanish, Swedish, and Ukrainian.
2214+
2215+OUTPUT_LANGUAGE = English
2216+
2217+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
2218+# include brief member descriptions after the members that are listed in
2219+# the file and class documentation (similar to JavaDoc).
2220+# Set to NO to disable this.
2221+
2222+BRIEF_MEMBER_DESC = YES
2223+
2224+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
2225+# the brief description of a member or function before the detailed description.
2226+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
2227+# brief descriptions will be completely suppressed.
2228+
2229+REPEAT_BRIEF = YES
2230+
2231+# This tag implements a quasi-intelligent brief description abbreviator
2232+# that is used to form the text in various listings. Each string
2233+# in this list, if found as the leading text of the brief description, will be
2234+# stripped from the text and the result after processing the whole list, is
2235+# used as the annotated text. Otherwise, the brief description is used as-is.
2236+# If left blank, the following values are used ("$name" is automatically
2237+# replaced with the name of the entity): "The $name class" "The $name widget"
2238+# "The $name file" "is" "provides" "specifies" "contains"
2239+# "represents" "a" "an" "the"
2240+
2241+ABBREVIATE_BRIEF =
2242+
2243+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
2244+# Doxygen will generate a detailed section even if there is only a brief
2245+# description.
2246+
2247+ALWAYS_DETAILED_SEC = YES
2248+
2249+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
2250+# inherited members of a class in the documentation of that class as if those
2251+# members were ordinary class members. Constructors, destructors and assignment
2252+# operators of the base classes will not be shown.
2253+
2254+INLINE_INHERITED_MEMB = NO
2255+
2256+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
2257+# path before files name in the file list and in the header files. If set
2258+# to NO the shortest path that makes the file name unique will be used.
2259+
2260+FULL_PATH_NAMES = YES
2261+
2262+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
2263+# can be used to strip a user-defined part of the path. Stripping is
2264+# only done if one of the specified strings matches the left-hand part of
2265+# the path. The tag can be used to show relative paths in the file list.
2266+# If left blank the directory from which doxygen is run is used as the
2267+# path to strip.
2268+
2269+STRIP_FROM_PATH =
2270+
2271+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
2272+# the path mentioned in the documentation of a class, which tells
2273+# the reader which header file to include in order to use a class.
2274+# If left blank only the name of the header file containing the class
2275+# definition is used. Otherwise one should specify the include paths that
2276+# are normally passed to the compiler using the -I flag.
2277+
2278+STRIP_FROM_INC_PATH =
2279+
2280+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
2281+# (but less readable) file names. This can be useful is your file systems
2282+# doesn't support long names like on DOS, Mac, or CD-ROM.
2283+
2284+SHORT_NAMES = NO
2285+
2286+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
2287+# will interpret the first line (until the first dot) of a JavaDoc-style
2288+# comment as the brief description. If set to NO, the JavaDoc
2289+# comments will behave just like regular Qt-style comments
2290+# (thus requiring an explicit @brief command for a brief description.)
2291+
2292+JAVADOC_AUTOBRIEF = YES
2293+
2294+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
2295+# interpret the first line (until the first dot) of a Qt-style
2296+# comment as the brief description. If set to NO, the comments
2297+# will behave just like regular Qt-style comments (thus requiring
2298+# an explicit \brief command for a brief description.)
2299+
2300+QT_AUTOBRIEF = YES
2301+
2302+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
2303+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
2304+# comments) as a brief description. This used to be the default behaviour.
2305+# The new default is to treat a multi-line C++ comment block as a detailed
2306+# description. Set this tag to YES if you prefer the old behaviour instead.
2307+
2308+MULTILINE_CPP_IS_BRIEF = NO
2309+
2310+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
2311+# member inherits the documentation from any documented member that it
2312+# re-implements.
2313+
2314+INHERIT_DOCS = YES
2315+
2316+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
2317+# a new page for each member. If set to NO, the documentation of a member will
2318+# be part of the file/class/namespace that contains it.
2319+
2320+SEPARATE_MEMBER_PAGES = NO
2321+
2322+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
2323+# Doxygen uses this value to replace tabs by spaces in code fragments.
2324+
2325+TAB_SIZE = 8
2326+
2327+# This tag can be used to specify a number of aliases that acts
2328+# as commands in the documentation. An alias has the form "name=value".
2329+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
2330+# put the command \sideeffect (or @sideeffect) in the documentation, which
2331+# will result in a user-defined paragraph with heading "Side Effects:".
2332+# You can put \n's in the value part of an alias to insert newlines.
2333+
2334+ALIASES =
2335+
2336+# Doxygen selects the parser to use depending on the extension of the files it parses.
2337+# With this tag you can assign which parser to use for a given extension.
2338+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
2339+# The format is ext=language, where ext is a file extension, and language is one of
2340+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
2341+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
2342+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
2343+# use: inc=Fortran f=C
2344+
2345+EXTENSION_MAPPING =
2346+
2347+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
2348+# to include (a tag file for) the STL sources as input, then you should
2349+# set this tag to YES in order to let doxygen match functions declarations and
2350+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
2351+# func(std::string) {}). This also make the inheritance and collaboration
2352+# diagrams that involve STL classes more complete and accurate.
2353+
2354+BUILTIN_STL_SUPPORT = NO
2355+
2356+# If you use Microsoft's C++/CLI language, you should set this option to YES to
2357+# enable parsing support.
2358+
2359+CPP_CLI_SUPPORT = NO
2360+
2361+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
2362+# Doxygen will parse them like normal C++ but will assume all classes use public
2363+# instead of private inheritance when no explicit protection keyword is present.
2364+
2365+SIP_SUPPORT = NO
2366+
2367+# For Microsoft's IDL there are propget and propput attributes to indicate getter
2368+# and setter methods for a property. Setting this option to YES (the default)
2369+# will make doxygen to replace the get and set methods by a property in the
2370+# documentation. This will only work if the methods are indeed getting or
2371+# setting a simple type. If this is not the case, or you want to show the
2372+# methods anyway, you should set this option to NO.
2373+
2374+IDL_PROPERTY_SUPPORT = YES
2375+
2376+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
2377+# tag is set to YES, then doxygen will reuse the documentation of the first
2378+# member in the group (if any) for the other members of the group. By default
2379+# all members of a group must be documented explicitly.
2380+
2381+DISTRIBUTE_GROUP_DOC = NO
2382+
2383+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
2384+# the same type (for instance a group of public functions) to be put as a
2385+# subgroup of that type (e.g. under the Public Functions section). Set it to
2386+# NO to prevent subgrouping. Alternatively, this can be done per class using
2387+# the \nosubgrouping command.
2388+
2389+SUBGROUPING = YES
2390+
2391+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
2392+# is documented as struct, union, or enum with the name of the typedef. So
2393+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
2394+# with name TypeT. When disabled the typedef will appear as a member of a file,
2395+# namespace, or class. And the struct will be named TypeS. This can typically
2396+# be useful for C code in case the coding convention dictates that all compound
2397+# types are typedef'ed and only the typedef is referenced, never the tag name.
2398+
2399+TYPEDEF_HIDES_STRUCT = NO
2400+
2401+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
2402+# determine which symbols to keep in memory and which to flush to disk.
2403+# When the cache is full, less often used symbols will be written to disk.
2404+# For small to medium size projects (<1000 input files) the default value is
2405+# probably good enough. For larger projects a too small cache size can cause
2406+# doxygen to be busy swapping symbols to and from disk most of the time
2407+# causing a significant performance penality.
2408+# If the system has enough physical memory increasing the cache will improve the
2409+# performance by keeping more symbols in memory. Note that the value works on
2410+# a logarithmic scale so increasing the size by one will rougly double the
2411+# memory usage. The cache size is given by this formula:
2412+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
2413+# corresponding to a cache size of 2^16 = 65536 symbols
2414+
2415+SYMBOL_CACHE_SIZE = 0
2416+
2417+#---------------------------------------------------------------------------
2418+# Build related configuration options
2419+#---------------------------------------------------------------------------
2420+
2421+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
2422+# documentation are documented, even if no documentation was available.
2423+# Private class members and static file members will be hidden unless
2424+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
2425+
2426+EXTRACT_ALL = YES
2427+
2428+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
2429+# will be included in the documentation.
2430+
2431+EXTRACT_PRIVATE = YES
2432+
2433+# If the EXTRACT_STATIC tag is set to YES all static members of a file
2434+# will be included in the documentation.
2435+
2436+EXTRACT_STATIC = YES
2437+
2438+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
2439+# defined locally in source files will be included in the documentation.
2440+# If set to NO only classes defined in header files are included.
2441+
2442+EXTRACT_LOCAL_CLASSES = YES
2443+
2444+# This flag is only useful for Objective-C code. When set to YES local
2445+# methods, which are defined in the implementation section but not in
2446+# the interface are included in the documentation.
2447+# If set to NO (the default) only methods in the interface are included.
2448+
2449+EXTRACT_LOCAL_METHODS = NO
2450+
2451+# If this flag is set to YES, the members of anonymous namespaces will be
2452+# extracted and appear in the documentation as a namespace called
2453+# 'anonymous_namespace{file}', where file will be replaced with the base
2454+# name of the file that contains the anonymous namespace. By default
2455+# anonymous namespace are hidden.
2456+
2457+EXTRACT_ANON_NSPACES = NO
2458+
2459+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
2460+# undocumented members of documented classes, files or namespaces.
2461+# If set to NO (the default) these members will be included in the
2462+# various overviews, but no documentation section is generated.
2463+# This option has no effect if EXTRACT_ALL is enabled.
2464+
2465+HIDE_UNDOC_MEMBERS = NO
2466+
2467+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
2468+# undocumented classes that are normally visible in the class hierarchy.
2469+# If set to NO (the default) these classes will be included in the various
2470+# overviews. This option has no effect if EXTRACT_ALL is enabled.
2471+
2472+HIDE_UNDOC_CLASSES = NO
2473+
2474+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
2475+# friend (class|struct|union) declarations.
2476+# If set to NO (the default) these declarations will be included in the
2477+# documentation.
2478+
2479+HIDE_FRIEND_COMPOUNDS = NO
2480+
2481+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
2482+# documentation blocks found inside the body of a function.
2483+# If set to NO (the default) these blocks will be appended to the
2484+# function's detailed documentation block.
2485+
2486+HIDE_IN_BODY_DOCS = NO
2487+
2488+# The INTERNAL_DOCS tag determines if documentation
2489+# that is typed after a \internal command is included. If the tag is set
2490+# to NO (the default) then the documentation will be excluded.
2491+# Set it to YES to include the internal documentation.
2492+
2493+INTERNAL_DOCS = NO
2494+
2495+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
2496+# file names in lower-case letters. If set to YES upper-case letters are also
2497+# allowed. This is useful if you have classes or files whose names only differ
2498+# in case and if your file system supports case sensitive file names. Windows
2499+# and Mac users are advised to set this option to NO.
2500+
2501+CASE_SENSE_NAMES = YES
2502+
2503+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
2504+# will show members with their full class and namespace scopes in the
2505+# documentation. If set to YES the scope will be hidden.
2506+
2507+HIDE_SCOPE_NAMES = NO
2508+
2509+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
2510+# will put a list of the files that are included by a file in the documentation
2511+# of that file.
2512+
2513+SHOW_INCLUDE_FILES = YES
2514+
2515+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
2516+# is inserted in the documentation for inline members.
2517+
2518+INLINE_INFO = YES
2519+
2520+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
2521+# will sort the (detailed) documentation of file and class members
2522+# alphabetically by member name. If set to NO the members will appear in
2523+# declaration order.
2524+
2525+SORT_MEMBER_DOCS = YES
2526+
2527+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
2528+# brief documentation of file, namespace and class members alphabetically
2529+# by member name. If set to NO (the default) the members will appear in
2530+# declaration order.
2531+
2532+SORT_BRIEF_DOCS = NO
2533+
2534+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
2535+# hierarchy of group names into alphabetical order. If set to NO (the default)
2536+# the group names will appear in their defined order.
2537+
2538+SORT_GROUP_NAMES = NO
2539+
2540+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
2541+# sorted by fully-qualified names, including namespaces. If set to
2542+# NO (the default), the class list will be sorted only by class name,
2543+# not including the namespace part.
2544+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
2545+# Note: This option applies only to the class list, not to the
2546+# alphabetical list.
2547+
2548+SORT_BY_SCOPE_NAME = NO
2549+
2550+# The GENERATE_TODOLIST tag can be used to enable (YES) or
2551+# disable (NO) the todo list. This list is created by putting \todo
2552+# commands in the documentation.
2553+
2554+GENERATE_TODOLIST = YES
2555+
2556+# The GENERATE_TESTLIST tag can be used to enable (YES) or
2557+# disable (NO) the test list. This list is created by putting \test
2558+# commands in the documentation.
2559+
2560+GENERATE_TESTLIST = YES
2561+
2562+# The GENERATE_BUGLIST tag can be used to enable (YES) or
2563+# disable (NO) the bug list. This list is created by putting \bug
2564+# commands in the documentation.
2565+
2566+GENERATE_BUGLIST = YES
2567+
2568+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
2569+# disable (NO) the deprecated list. This list is created by putting
2570+# \deprecated commands in the documentation.
2571+
2572+GENERATE_DEPRECATEDLIST= YES
2573+
2574+# The ENABLED_SECTIONS tag can be used to enable conditional
2575+# documentation sections, marked by \if sectionname ... \endif.
2576+
2577+ENABLED_SECTIONS =
2578+
2579+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
2580+# the initial value of a variable or define consists of for it to appear in
2581+# the documentation. If the initializer consists of more lines than specified
2582+# here it will be hidden. Use a value of 0 to hide initializers completely.
2583+# The appearance of the initializer of individual variables and defines in the
2584+# documentation can be controlled using \showinitializer or \hideinitializer
2585+# command in the documentation regardless of this setting.
2586+
2587+MAX_INITIALIZER_LINES = 30
2588+
2589+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
2590+# at the bottom of the documentation of classes and structs. If set to YES the
2591+# list will mention the files that were used to generate the documentation.
2592+
2593+SHOW_USED_FILES = YES
2594+
2595+# If the sources in your project are distributed over multiple directories
2596+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
2597+# in the documentation. The default is NO.
2598+
2599+SHOW_DIRECTORIES = NO
2600+
2601+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
2602+# This will remove the Files entry from the Quick Index and from the
2603+# Folder Tree View (if specified). The default is YES.
2604+
2605+SHOW_FILES = YES
2606+
2607+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
2608+# Namespaces page.
2609+# This will remove the Namespaces entry from the Quick Index
2610+# and from the Folder Tree View (if specified). The default is YES.
2611+
2612+SHOW_NAMESPACES = YES
2613+
2614+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
2615+# doxygen should invoke to get the current version for each file (typically from
2616+# the version control system). Doxygen will invoke the program by executing (via
2617+# popen()) the command <command> <input-file>, where <command> is the value of
2618+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
2619+# provided by doxygen. Whatever the program writes to standard output
2620+# is used as the file version. See the manual for examples.
2621+
2622+FILE_VERSION_FILTER =
2623+
2624+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
2625+# doxygen. The layout file controls the global structure of the generated output files
2626+# in an output format independent way. The create the layout file that represents
2627+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
2628+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
2629+# of the layout file.
2630+
2631+LAYOUT_FILE =
2632+
2633+#---------------------------------------------------------------------------
2634+# configuration options related to warning and progress messages
2635+#---------------------------------------------------------------------------
2636+
2637+# The QUIET tag can be used to turn on/off the messages that are generated
2638+# by doxygen. Possible values are YES and NO. If left blank NO is used.
2639+
2640+QUIET = NO
2641+
2642+# The WARNINGS tag can be used to turn on/off the warning messages that are
2643+# generated by doxygen. Possible values are YES and NO. If left blank
2644+# NO is used.
2645+
2646+WARNINGS = YES
2647+
2648+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
2649+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
2650+# automatically be disabled.
2651+
2652+WARN_IF_UNDOCUMENTED = YES
2653+
2654+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
2655+# potential errors in the documentation, such as not documenting some
2656+# parameters in a documented function, or documenting parameters that
2657+# don't exist or using markup commands wrongly.
2658+
2659+WARN_IF_DOC_ERROR = YES
2660+
2661+# This WARN_NO_PARAMDOC option can be abled to get warnings for
2662+# functions that are documented, but have no documentation for their parameters
2663+# or return value. If set to NO (the default) doxygen will only warn about
2664+# wrong or incomplete parameter documentation, but not about the absence of
2665+# documentation.
2666+
2667+WARN_NO_PARAMDOC = NO
2668+
2669+# The WARN_FORMAT tag determines the format of the warning messages that
2670+# doxygen can produce. The string should contain the $file, $line, and $text
2671+# tags, which will be replaced by the file and line number from which the
2672+# warning originated and the warning text. Optionally the format may contain
2673+# $version, which will be replaced by the version of the file (if it could
2674+# be obtained via FILE_VERSION_FILTER)
2675+
2676+WARN_FORMAT = "$file:$line: $text"
2677+
2678+# The WARN_LOGFILE tag can be used to specify a file to which warning
2679+# and error messages should be written. If left blank the output is written
2680+# to stderr.
2681+
2682+WARN_LOGFILE =
2683+
2684+#---------------------------------------------------------------------------
2685+# configuration options related to the input files
2686+#---------------------------------------------------------------------------
2687+
2688+# The INPUT tag can be used to specify the files and/or directories that contain
2689+# documented source files. You may enter file names like "myfile.cpp" or
2690+# directories like "/usr/src/myproject". Separate the files or directories
2691+# with spaces.
2692+
2693+INPUT = ./src ./src/gui
2694+
2695+# This tag can be used to specify the character encoding of the source files
2696+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
2697+# also the default input encoding. Doxygen uses libiconv (or the iconv built
2698+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
2699+# the list of possible encodings.
2700+
2701+INPUT_ENCODING = UTF-8
2702+
2703+# If the value of the INPUT tag contains directories, you can use the
2704+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
2705+# and *.h) to filter out the source-files in the directories. If left
2706+# blank the following patterns are tested:
2707+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
2708+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
2709+
2710+FILE_PATTERNS =
2711+
2712+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
2713+# should be searched for input files as well. Possible values are YES and NO.
2714+# If left blank NO is used.
2715+
2716+RECURSIVE = NO
2717+
2718+# The EXCLUDE tag can be used to specify files and/or directories that should
2719+# excluded from the INPUT source files. This way you can easily exclude a
2720+# subdirectory from a directory tree whose root is specified with the INPUT tag.
2721+
2722+EXCLUDE =
2723+
2724+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
2725+# directories that are symbolic links (a Unix filesystem feature) are excluded
2726+# from the input.
2727+
2728+EXCLUDE_SYMLINKS = NO
2729+
2730+# If the value of the INPUT tag contains directories, you can use the
2731+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
2732+# certain files from those directories. Note that the wildcards are matched
2733+# against the file with absolute path, so to exclude all test directories
2734+# for example use the pattern */test/*
2735+
2736+EXCLUDE_PATTERNS =
2737+
2738+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
2739+# (namespaces, classes, functions, etc.) that should be excluded from the
2740+# output. The symbol name can be a fully qualified name, a word, or if the
2741+# wildcard * is used, a substring. Examples: ANamespace, AClass,
2742+# AClass::ANamespace, ANamespace::*Test
2743+
2744+EXCLUDE_SYMBOLS =
2745+
2746+# The EXAMPLE_PATH tag can be used to specify one or more files or
2747+# directories that contain example code fragments that are included (see
2748+# the \include command).
2749+
2750+EXAMPLE_PATH =
2751+
2752+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
2753+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
2754+# and *.h) to filter out the source-files in the directories. If left
2755+# blank all files are included.
2756+
2757+EXAMPLE_PATTERNS =
2758+
2759+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
2760+# searched for input files to be used with the \include or \dontinclude
2761+# commands irrespective of the value of the RECURSIVE tag.
2762+# Possible values are YES and NO. If left blank NO is used.
2763+
2764+EXAMPLE_RECURSIVE = NO
2765+
2766+# The IMAGE_PATH tag can be used to specify one or more files or
2767+# directories that contain image that are included in the documentation (see
2768+# the \image command).
2769+
2770+IMAGE_PATH =
2771+
2772+# The INPUT_FILTER tag can be used to specify a program that doxygen should
2773+# invoke to filter for each input file. Doxygen will invoke the filter program
2774+# by executing (via popen()) the command <filter> <input-file>, where <filter>
2775+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
2776+# input file. Doxygen will then use the output that the filter program writes
2777+# to standard output.
2778+# If FILTER_PATTERNS is specified, this tag will be
2779+# ignored.
2780+
2781+INPUT_FILTER =
2782+
2783+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
2784+# basis.
2785+# Doxygen will compare the file name with each pattern and apply the
2786+# filter if there is a match.
2787+# The filters are a list of the form:
2788+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
2789+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
2790+# is applied to all files.
2791+
2792+FILTER_PATTERNS =
2793+
2794+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
2795+# INPUT_FILTER) will be used to filter the input files when producing source
2796+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
2797+
2798+FILTER_SOURCE_FILES = NO
2799+
2800+#---------------------------------------------------------------------------
2801+# configuration options related to source browsing
2802+#---------------------------------------------------------------------------
2803+
2804+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
2805+# be generated. Documented entities will be cross-referenced with these sources.
2806+# Note: To get rid of all source code in the generated output, make sure also
2807+# VERBATIM_HEADERS is set to NO.
2808+
2809+SOURCE_BROWSER = NO
2810+
2811+# Setting the INLINE_SOURCES tag to YES will include the body
2812+# of functions and classes directly in the documentation.
2813+
2814+INLINE_SOURCES = NO
2815+
2816+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
2817+# doxygen to hide any special comment blocks from generated source code
2818+# fragments. Normal C and C++ comments will always remain visible.
2819+
2820+STRIP_CODE_COMMENTS = YES
2821+
2822+# If the REFERENCED_BY_RELATION tag is set to YES
2823+# then for each documented function all documented
2824+# functions referencing it will be listed.
2825+
2826+REFERENCED_BY_RELATION = NO
2827+
2828+# If the REFERENCES_RELATION tag is set to YES
2829+# then for each documented function all documented entities
2830+# called/used by that function will be listed.
2831+
2832+REFERENCES_RELATION = NO
2833+
2834+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
2835+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
2836+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
2837+# link to the source code.
2838+# Otherwise they will link to the documentation.
2839+
2840+REFERENCES_LINK_SOURCE = YES
2841+
2842+# If the USE_HTAGS tag is set to YES then the references to source code
2843+# will point to the HTML generated by the htags(1) tool instead of doxygen
2844+# built-in source browser. The htags tool is part of GNU's global source
2845+# tagging system (see http://www.gnu.org/software/global/global.html). You
2846+# will need version 4.8.6 or higher.
2847+
2848+USE_HTAGS = NO
2849+
2850+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
2851+# will generate a verbatim copy of the header file for each class for
2852+# which an include is specified. Set to NO to disable this.
2853+
2854+VERBATIM_HEADERS = YES
2855+
2856+#---------------------------------------------------------------------------
2857+# configuration options related to the alphabetical class index
2858+#---------------------------------------------------------------------------
2859+
2860+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
2861+# of all compounds will be generated. Enable this if the project
2862+# contains a lot of classes, structs, unions or interfaces.
2863+
2864+ALPHABETICAL_INDEX = NO
2865+
2866+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
2867+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
2868+# in which this list will be split (can be a number in the range [1..20])
2869+
2870+COLS_IN_ALPHA_INDEX = 5
2871+
2872+# In case all classes in a project start with a common prefix, all
2873+# classes will be put under the same header in the alphabetical index.
2874+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
2875+# should be ignored while generating the index headers.
2876+
2877+IGNORE_PREFIX =
2878+
2879+#---------------------------------------------------------------------------
2880+# configuration options related to the HTML output
2881+#---------------------------------------------------------------------------
2882+
2883+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
2884+# generate HTML output.
2885+
2886+GENERATE_HTML = YES
2887+
2888+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
2889+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
2890+# put in front of it. If left blank `html' will be used as the default path.
2891+
2892+HTML_OUTPUT = html
2893+
2894+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
2895+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
2896+# doxygen will generate files with .html extension.
2897+
2898+HTML_FILE_EXTENSION = .html
2899+
2900+# The HTML_HEADER tag can be used to specify a personal HTML header for
2901+# each generated HTML page. If it is left blank doxygen will generate a
2902+# standard header.
2903+
2904+HTML_HEADER =
2905+
2906+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
2907+# each generated HTML page. If it is left blank doxygen will generate a
2908+# standard footer.
2909+
2910+HTML_FOOTER =
2911+
2912+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
2913+# style sheet that is used by each HTML page. It can be used to
2914+# fine-tune the look of the HTML output. If the tag is left blank doxygen
2915+# will generate a default style sheet. Note that doxygen will try to copy
2916+# the style sheet file to the HTML output directory, so don't put your own
2917+# stylesheet in the HTML output directory as well, or it will be erased!
2918+
2919+HTML_STYLESHEET = ../../stellarium/doc/doxygen.css
2920+
2921+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
2922+# files or namespaces will be aligned in HTML using tables. If set to
2923+# NO a bullet list will be used.
2924+
2925+HTML_ALIGN_MEMBERS = YES
2926+
2927+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
2928+# documentation will contain sections that can be hidden and shown after the
2929+# page has loaded. For this to work a browser that supports
2930+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
2931+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
2932+
2933+HTML_DYNAMIC_SECTIONS = NO
2934+
2935+# If the GENERATE_DOCSET tag is set to YES, additional index files
2936+# will be generated that can be used as input for Apple's Xcode 3
2937+# integrated development environment, introduced with OSX 10.5 (Leopard).
2938+# To create a documentation set, doxygen will generate a Makefile in the
2939+# HTML output directory. Running make will produce the docset in that
2940+# directory and running "make install" will install the docset in
2941+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
2942+# it at startup.
2943+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
2944+
2945+GENERATE_DOCSET = NO
2946+
2947+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
2948+# feed. A documentation feed provides an umbrella under which multiple
2949+# documentation sets from a single provider (such as a company or product suite)
2950+# can be grouped.
2951+
2952+DOCSET_FEEDNAME = "Doxygen generated docs"
2953+
2954+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
2955+# should uniquely identify the documentation set bundle. This should be a
2956+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
2957+# will append .docset to the name.
2958+
2959+DOCSET_BUNDLE_ID = org.doxygen.Project
2960+
2961+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
2962+# will be generated that can be used as input for tools like the
2963+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
2964+# of the generated HTML documentation.
2965+
2966+GENERATE_HTMLHELP = NO
2967+
2968+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
2969+# be used to specify the file name of the resulting .chm file. You
2970+# can add a path in front of the file if the result should not be
2971+# written to the html output directory.
2972+
2973+CHM_FILE =
2974+
2975+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
2976+# be used to specify the location (absolute path including file name) of
2977+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
2978+# the HTML help compiler on the generated index.hhp.
2979+
2980+HHC_LOCATION =
2981+
2982+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
2983+# controls if a separate .chi index file is generated (YES) or that
2984+# it should be included in the master .chm file (NO).
2985+
2986+GENERATE_CHI = NO
2987+
2988+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
2989+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
2990+# content.
2991+
2992+CHM_INDEX_ENCODING =
2993+
2994+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
2995+# controls whether a binary table of contents is generated (YES) or a
2996+# normal table of contents (NO) in the .chm file.
2997+
2998+BINARY_TOC = NO
2999+
3000+# The TOC_EXPAND flag can be set to YES to add extra items for group members
3001+# to the contents of the HTML help documentation and to the tree view.
3002+
3003+TOC_EXPAND = NO
3004+
3005+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
3006+# are set, an additional index file will be generated that can be used as input for
3007+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
3008+# HTML documentation.
3009+
3010+GENERATE_QHP = NO
3011+
3012+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
3013+# be used to specify the file name of the resulting .qch file.
3014+# The path specified is relative to the HTML output folder.
3015+
3016+QCH_FILE =
3017+
3018+# The QHP_NAMESPACE tag specifies the namespace to use when generating
3019+# Qt Help Project output. For more information please see
3020+# http://doc.trolltech.com/qthelpproject.html#namespace
3021+
3022+QHP_NAMESPACE =
3023+
3024+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
3025+# Qt Help Project output. For more information please see
3026+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
3027+
3028+QHP_VIRTUAL_FOLDER = doc
3029+
3030+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
3031+# For more information please see
3032+# http://doc.trolltech.com/qthelpproject.html#custom-filters
3033+
3034+QHP_CUST_FILTER_NAME =
3035+
3036+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
3037+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
3038+
3039+QHP_CUST_FILTER_ATTRS =
3040+
3041+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
3042+# filter section matches.
3043+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
3044+
3045+QHP_SECT_FILTER_ATTRS =
3046+
3047+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
3048+# be used to specify the location of Qt's qhelpgenerator.
3049+# If non-empty doxygen will try to run qhelpgenerator on the generated
3050+# .qhp file.
3051+
3052+QHG_LOCATION =
3053+
3054+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
3055+# top of each HTML page. The value NO (the default) enables the index and
3056+# the value YES disables it.
3057+
3058+DISABLE_INDEX = NO
3059+
3060+# This tag can be used to set the number of enum values (range [1..20])
3061+# that doxygen will group on one line in the generated HTML documentation.
3062+
3063+ENUM_VALUES_PER_LINE = 4
3064+
3065+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
3066+# structure should be generated to display hierarchical information.
3067+# If the tag value is set to FRAME, a side panel will be generated
3068+# containing a tree-like index structure (just like the one that
3069+# is generated for HTML Help). For this to work a browser that supports
3070+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
3071+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
3072+# probably better off using the HTML help feature. Other possible values
3073+# for this tag are: HIERARCHIES, which will generate the Groups, Directories,
3074+# and Class Hierarchy pages using a tree view instead of an ordered list;
3075+# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which
3076+# disables this behavior completely. For backwards compatibility with previous
3077+# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE
3078+# respectively.
3079+
3080+GENERATE_TREEVIEW = NONE
3081+
3082+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
3083+# used to set the initial width (in pixels) of the frame in which the tree
3084+# is shown.
3085+
3086+TREEVIEW_WIDTH = 250
3087+
3088+# Use this tag to change the font size of Latex formulas included
3089+# as images in the HTML documentation. The default is 10. Note that
3090+# when you change the font size after a successful doxygen run you need
3091+# to manually remove any form_*.png images from the HTML output directory
3092+# to force them to be regenerated.
3093+
3094+FORMULA_FONTSIZE = 10
3095+
3096+#---------------------------------------------------------------------------
3097+# configuration options related to the LaTeX output
3098+#---------------------------------------------------------------------------
3099+
3100+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
3101+# generate Latex output.
3102+
3103+GENERATE_LATEX = NO
3104+
3105+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
3106+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
3107+# put in front of it. If left blank `latex' will be used as the default path.
3108+
3109+LATEX_OUTPUT = latex
3110+
3111+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
3112+# invoked. If left blank `latex' will be used as the default command name.
3113+
3114+LATEX_CMD_NAME = latex
3115+
3116+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
3117+# generate index for LaTeX. If left blank `makeindex' will be used as the
3118+# default command name.
3119+
3120+MAKEINDEX_CMD_NAME = makeindex
3121+
3122+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
3123+# LaTeX documents. This may be useful for small projects and may help to
3124+# save some trees in general.
3125+
3126+COMPACT_LATEX = NO
3127+
3128+# The PAPER_TYPE tag can be used to set the paper type that is used
3129+# by the printer. Possible values are: a4, a4wide, letter, legal and
3130+# executive. If left blank a4wide will be used.
3131+
3132+PAPER_TYPE = a4wide
3133+
3134+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
3135+# packages that should be included in the LaTeX output.
3136+
3137+EXTRA_PACKAGES =
3138+
3139+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
3140+# the generated latex document. The header should contain everything until
3141+# the first chapter. If it is left blank doxygen will generate a
3142+# standard header. Notice: only use this tag if you know what you are doing!
3143+
3144+LATEX_HEADER =
3145+
3146+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
3147+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
3148+# contain links (just like the HTML output) instead of page references
3149+# This makes the output suitable for online browsing using a pdf viewer.
3150+
3151+PDF_HYPERLINKS = YES
3152+
3153+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
3154+# plain latex in the generated Makefile. Set this option to YES to get a
3155+# higher quality PDF documentation.
3156+
3157+USE_PDFLATEX = YES
3158+
3159+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
3160+# command to the generated LaTeX files. This will instruct LaTeX to keep
3161+# running if errors occur, instead of asking the user for help.
3162+# This option is also used when generating formulas in HTML.
3163+
3164+LATEX_BATCHMODE = NO
3165+
3166+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
3167+# include the index chapters (such as File Index, Compound Index, etc.)
3168+# in the output.
3169+
3170+LATEX_HIDE_INDICES = NO
3171+
3172+#---------------------------------------------------------------------------
3173+# configuration options related to the RTF output
3174+#---------------------------------------------------------------------------
3175+
3176+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
3177+# The RTF output is optimized for Word 97 and may not look very pretty with
3178+# other RTF readers or editors.
3179+
3180+GENERATE_RTF = NO
3181+
3182+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
3183+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
3184+# put in front of it. If left blank `rtf' will be used as the default path.
3185+
3186+RTF_OUTPUT = rtf
3187+
3188+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
3189+# RTF documents. This may be useful for small projects and may help to
3190+# save some trees in general.
3191+
3192+COMPACT_RTF = NO
3193+
3194+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
3195+# will contain hyperlink fields. The RTF file will
3196+# contain links (just like the HTML output) instead of page references.
3197+# This makes the output suitable for online browsing using WORD or other
3198+# programs which support those fields.
3199+# Note: wordpad (write) and others do not support links.
3200+
3201+RTF_HYPERLINKS = NO
3202+
3203+# Load stylesheet definitions from file. Syntax is similar to doxygen's
3204+# config file, i.e. a series of assignments. You only have to provide
3205+# replacements, missing definitions are set to their default value.
3206+
3207+RTF_STYLESHEET_FILE =
3208+
3209+# Set optional variables used in the generation of an rtf document.
3210+# Syntax is similar to doxygen's config file.
3211+
3212+RTF_EXTENSIONS_FILE =
3213+
3214+#---------------------------------------------------------------------------
3215+# configuration options related to the man page output
3216+#---------------------------------------------------------------------------
3217+
3218+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
3219+# generate man pages
3220+
3221+GENERATE_MAN = NO
3222+
3223+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
3224+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
3225+# put in front of it. If left blank `man' will be used as the default path.
3226+
3227+MAN_OUTPUT = man
3228+
3229+# The MAN_EXTENSION tag determines the extension that is added to
3230+# the generated man pages (default is the subroutine's section .3)
3231+
3232+MAN_EXTENSION = .3
3233+
3234+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
3235+# then it will generate one additional man file for each entity
3236+# documented in the real man page(s). These additional files
3237+# only source the real man page, but without them the man command
3238+# would be unable to find the correct page. The default is NO.
3239+
3240+MAN_LINKS = NO
3241+
3242+#---------------------------------------------------------------------------
3243+# configuration options related to the XML output
3244+#---------------------------------------------------------------------------
3245+
3246+# If the GENERATE_XML tag is set to YES Doxygen will
3247+# generate an XML file that captures the structure of
3248+# the code including all documentation.
3249+
3250+GENERATE_XML = NO
3251+
3252+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
3253+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
3254+# put in front of it. If left blank `xml' will be used as the default path.
3255+
3256+XML_OUTPUT = xml
3257+
3258+# The XML_SCHEMA tag can be used to specify an XML schema,
3259+# which can be used by a validating XML parser to check the
3260+# syntax of the XML files.
3261+
3262+XML_SCHEMA =
3263+
3264+# The XML_DTD tag can be used to specify an XML DTD,
3265+# which can be used by a validating XML parser to check the
3266+# syntax of the XML files.
3267+
3268+XML_DTD =
3269+
3270+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
3271+# dump the program listings (including syntax highlighting
3272+# and cross-referencing information) to the XML output. Note that
3273+# enabling this will significantly increase the size of the XML output.
3274+
3275+XML_PROGRAMLISTING = YES
3276+
3277+#---------------------------------------------------------------------------
3278+# configuration options for the AutoGen Definitions output
3279+#---------------------------------------------------------------------------
3280+
3281+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
3282+# generate an AutoGen Definitions (see autogen.sf.net) file
3283+# that captures the structure of the code including all
3284+# documentation. Note that this feature is still experimental
3285+# and incomplete at the moment.
3286+
3287+GENERATE_AUTOGEN_DEF = NO
3288+
3289+#---------------------------------------------------------------------------
3290+# configuration options related to the Perl module output
3291+#---------------------------------------------------------------------------
3292+
3293+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
3294+# generate a Perl module file that captures the structure of
3295+# the code including all documentation. Note that this
3296+# feature is still experimental and incomplete at the
3297+# moment.
3298+
3299+GENERATE_PERLMOD = NO
3300+
3301+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
3302+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
3303+# to generate PDF and DVI output from the Perl module output.
3304+
3305+PERLMOD_LATEX = NO
3306+
3307+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
3308+# nicely formatted so it can be parsed by a human reader.
3309+# This is useful
3310+# if you want to understand what is going on.
3311+# On the other hand, if this
3312+# tag is set to NO the size of the Perl module output will be much smaller
3313+# and Perl will parse it just the same.
3314+
3315+PERLMOD_PRETTY = YES
3316+
3317+# The names of the make variables in the generated doxyrules.make file
3318+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
3319+# This is useful so different doxyrules.make files included by the same
3320+# Makefile don't overwrite each other's variables.
3321+
3322+PERLMOD_MAKEVAR_PREFIX =
3323+
3324+#---------------------------------------------------------------------------
3325+# Configuration options related to the preprocessor
3326+#---------------------------------------------------------------------------
3327+
3328+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
3329+# evaluate all C-preprocessor directives found in the sources and include
3330+# files.
3331+
3332+ENABLE_PREPROCESSING = YES
3333+
3334+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
3335+# names in the source code. If set to NO (the default) only conditional
3336+# compilation will be performed. Macro expansion can be done in a controlled
3337+# way by setting EXPAND_ONLY_PREDEF to YES.
3338+
3339+MACRO_EXPANSION = NO
3340+
3341+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
3342+# then the macro expansion is limited to the macros specified with the
3343+# PREDEFINED and EXPAND_AS_DEFINED tags.
3344+
3345+EXPAND_ONLY_PREDEF = NO
3346+
3347+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
3348+# in the INCLUDE_PATH (see below) will be search if a #include is found.
3349+
3350+SEARCH_INCLUDES = YES
3351+
3352+# The INCLUDE_PATH tag can be used to specify one or more directories that
3353+# contain include files that are not input files but should be processed by
3354+# the preprocessor.
3355+
3356+INCLUDE_PATH =
3357+
3358+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
3359+# patterns (like *.h and *.hpp) to filter out the header-files in the
3360+# directories. If left blank, the patterns specified with FILE_PATTERNS will
3361+# be used.
3362+
3363+INCLUDE_FILE_PATTERNS =
3364+
3365+# The PREDEFINED tag can be used to specify one or more macro names that
3366+# are defined before the preprocessor is started (similar to the -D option of
3367+# gcc). The argument of the tag is a list of macros of the form: name
3368+# or name=definition (no spaces). If the definition and the = are
3369+# omitted =1 is assumed. To prevent a macro definition from being
3370+# undefined via #undef or recursively expanded use the := operator
3371+# instead of the = operator.
3372+
3373+PREDEFINED =
3374+
3375+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
3376+# this tag can be used to specify a list of macro names that should be expanded.
3377+# The macro definition that is found in the sources will be used.
3378+# Use the PREDEFINED tag if you want to use a different macro definition.
3379+
3380+EXPAND_AS_DEFINED =
3381+
3382+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
3383+# doxygen's preprocessor will remove all function-like macros that are alone
3384+# on a line, have an all uppercase name, and do not end with a semicolon. Such
3385+# function macros are typically used for boiler-plate code, and will confuse
3386+# the parser if not removed.
3387+
3388+SKIP_FUNCTION_MACROS = YES
3389+
3390+#---------------------------------------------------------------------------
3391+# Configuration::additions related to external references
3392+#---------------------------------------------------------------------------
3393+
3394+# The TAGFILES option can be used to specify one or more tagfiles.
3395+# Optionally an initial location of the external documentation
3396+# can be added for each tagfile. The format of a tag file without
3397+# this location is as follows:
3398+#
3399+# TAGFILES = file1 file2 ...
3400+# Adding location for the tag files is done as follows:
3401+#
3402+# TAGFILES = file1=loc1 "file2 = loc2" ...
3403+# where "loc1" and "loc2" can be relative or absolute paths or
3404+# URLs. If a location is present for each tag, the installdox tool
3405+# does not have to be run to correct the links.
3406+# Note that each tag file must have a unique name
3407+# (where the name does NOT include the path)
3408+# If a tag file is not located in the directory in which doxygen
3409+# is run, you must also specify the path to the tagfile here.
3410+
3411+TAGFILES =
3412+
3413+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
3414+# a tag file that is based on the input files it reads.
3415+
3416+GENERATE_TAGFILE =
3417+
3418+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
3419+# in the class index. If set to NO only the inherited external classes
3420+# will be listed.
3421+
3422+ALLEXTERNALS = NO
3423+
3424+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
3425+# in the modules index. If set to NO, only the current project's groups will
3426+# be listed.
3427+
3428+EXTERNAL_GROUPS = YES
3429+
3430+# The PERL_PATH should be the absolute path and name of the perl script
3431+# interpreter (i.e. the result of `which perl').
3432+
3433+PERL_PATH = /usr/bin/perl
3434+
3435+#---------------------------------------------------------------------------
3436+# Configuration options related to the dot tool
3437+#---------------------------------------------------------------------------
3438+
3439+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
3440+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
3441+# or super classes. Setting the tag to NO turns the diagrams off. Note that
3442+# this option is superseded by the HAVE_DOT option below. This is only a
3443+# fallback. It is recommended to install and use dot, since it yields more
3444+# powerful graphs.
3445+
3446+CLASS_DIAGRAMS = YES
3447+
3448+# You can define message sequence charts within doxygen comments using the \msc
3449+# command. Doxygen will then run the mscgen tool (see
3450+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
3451+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
3452+# the mscgen tool resides. If left empty the tool is assumed to be found in the
3453+# default search path.
3454+
3455+MSCGEN_PATH =
3456+
3457+# If set to YES, the inheritance and collaboration graphs will hide
3458+# inheritance and usage relations if the target is undocumented
3459+# or is not a class.
3460+
3461+HIDE_UNDOC_RELATIONS = YES
3462+
3463+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
3464+# available from the path. This tool is part of Graphviz, a graph visualization
3465+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
3466+# have no effect if this option is set to NO (the default)
3467+
3468+HAVE_DOT = NO
3469+
3470+# By default doxygen will write a font called FreeSans.ttf to the output
3471+# directory and reference it in all dot files that doxygen generates. This
3472+# font does not include all possible unicode characters however, so when you need
3473+# these (or just want a differently looking font) you can specify the font name
3474+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
3475+# which can be done by putting it in a standard location or by setting the
3476+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
3477+# containing the font.
3478+
3479+DOT_FONTNAME = FreeSans
3480+
3481+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
3482+# The default size is 10pt.
3483+
3484+DOT_FONTSIZE = 10
3485+
3486+# By default doxygen will tell dot to use the output directory to look for the
3487+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
3488+# different font using DOT_FONTNAME you can set the path where dot
3489+# can find it using this tag.
3490+
3491+DOT_FONTPATH =
3492+
3493+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
3494+# will generate a graph for each documented class showing the direct and
3495+# indirect inheritance relations. Setting this tag to YES will force the
3496+# the CLASS_DIAGRAMS tag to NO.
3497+
3498+CLASS_GRAPH = YES
3499+
3500+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
3501+# will generate a graph for each documented class showing the direct and
3502+# indirect implementation dependencies (inheritance, containment, and
3503+# class references variables) of the class with other documented classes.
3504+
3505+COLLABORATION_GRAPH = YES
3506+
3507+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
3508+# will generate a graph for groups, showing the direct groups dependencies
3509+
3510+GROUP_GRAPHS = YES
3511+
3512+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
3513+# collaboration diagrams in a style similar to the OMG's Unified Modeling
3514+# Language.
3515+
3516+UML_LOOK = NO
3517+
3518+# If set to YES, the inheritance and collaboration graphs will show the
3519+# relations between templates and their instances.
3520+
3521+TEMPLATE_RELATIONS = NO
3522+
3523+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
3524+# tags are set to YES then doxygen will generate a graph for each documented
3525+# file showing the direct and indirect include dependencies of the file with
3526+# other documented files.
3527+
3528+INCLUDE_GRAPH = YES
3529+
3530+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
3531+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
3532+# documented header file showing the documented files that directly or
3533+# indirectly include this file.
3534+
3535+INCLUDED_BY_GRAPH = YES
3536+
3537+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
3538+# doxygen will generate a call dependency graph for every global function
3539+# or class method. Note that enabling this option will significantly increase
3540+# the time of a run. So in most cases it will be better to enable call graphs
3541+# for selected functions only using the \callgraph command.
3542+
3543+CALL_GRAPH = NO
3544+
3545+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
3546+# doxygen will generate a caller dependency graph for every global function
3547+# or class method. Note that enabling this option will significantly increase
3548+# the time of a run. So in most cases it will be better to enable caller
3549+# graphs for selected functions only using the \callergraph command.
3550+
3551+CALLER_GRAPH = NO
3552+
3553+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
3554+# will graphical hierarchy of all classes instead of a textual one.
3555+
3556+GRAPHICAL_HIERARCHY = YES
3557+
3558+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
3559+# then doxygen will show the dependencies a directory has on other directories
3560+# in a graphical way. The dependency relations are determined by the #include
3561+# relations between the files in the directories.
3562+
3563+DIRECTORY_GRAPH = YES
3564+
3565+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
3566+# generated by dot. Possible values are png, jpg, or gif
3567+# If left blank png will be used.
3568+
3569+DOT_IMAGE_FORMAT = png
3570+
3571+# The tag DOT_PATH can be used to specify the path where the dot tool can be
3572+# found. If left blank, it is assumed the dot tool can be found in the path.
3573+
3574+DOT_PATH =
3575+
3576+# The DOTFILE_DIRS tag can be used to specify one or more directories that
3577+# contain dot files that are included in the documentation (see the
3578+# \dotfile command).
3579+
3580+DOTFILE_DIRS =
3581+
3582+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
3583+# nodes that will be shown in the graph. If the number of nodes in a graph
3584+# becomes larger than this value, doxygen will truncate the graph, which is
3585+# visualized by representing a node as a red box. Note that doxygen if the
3586+# number of direct children of the root node in a graph is already larger than
3587+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
3588+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
3589+
3590+DOT_GRAPH_MAX_NODES = 50
3591+
3592+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
3593+# graphs generated by dot. A depth value of 3 means that only nodes reachable
3594+# from the root by following a path via at most 3 edges will be shown. Nodes
3595+# that lay further from the root node will be omitted. Note that setting this
3596+# option to 1 or 2 may greatly reduce the computation time needed for large
3597+# code bases. Also note that the size of a graph can be further restricted by
3598+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
3599+
3600+MAX_DOT_GRAPH_DEPTH = 0
3601+
3602+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
3603+# background. This is disabled by default, because dot on Windows does not
3604+# seem to support this out of the box. Warning: Depending on the platform used,
3605+# enabling this option may lead to badly anti-aliased labels on the edges of
3606+# a graph (i.e. they become hard to read).
3607+
3608+DOT_TRANSPARENT = NO
3609+
3610+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
3611+# files in one run (i.e. multiple -o and -T options on the command line). This
3612+# makes dot run faster, but since only newer versions of dot (>1.8.10)
3613+# support this, this feature is disabled by default.
3614+
3615+DOT_MULTI_TARGETS = NO
3616+
3617+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
3618+# generate a legend page explaining the meaning of the various boxes and
3619+# arrows in the dot generated graphs.
3620+
3621+GENERATE_LEGEND = YES
3622+
3623+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
3624+# remove the intermediate dot files that are used to generate
3625+# the various graphs.
3626+
3627+DOT_CLEANUP = YES
3628+
3629+#---------------------------------------------------------------------------
3630+# Options related to the search engine
3631+#---------------------------------------------------------------------------
3632+
3633+# The SEARCHENGINE tag specifies whether or not a search engine should be
3634+# used. If set to NO the values of all tags below this one will be ignored.
3635+
3636+SEARCHENGINE = NO
3637
3638=== added file 'plugins/Scenery3d/README'
3639--- plugins/Scenery3d/README 1970-01-01 00:00:00 +0000
3640+++ plugins/Scenery3d/README 2015-04-01 10:27:06 +0000
3641@@ -0,0 +1,34 @@
3642+Scenery3d plugin for Stellarium
3643+================================
3644+
3645+Trying to render a 3D scene inside Stellarium.
3646+
3647+
3648+BUILDING THE PLUGIN
3649+===================
3650+
3651+Please note, these instructions are only directly applicable to Linux.
3652+Windows and OSX targets have not been tested yet.
3653+
3654+0. Install and build the SVN version of Stellarium as per the
3655+instructions on the Stellarium wiki:
3656+
3657+ http://stellarium.org/wiki/index.php/Compilation_on_Linux
3658+
3659+1. Set the environment variable STELROOT to the root of the Stellarium
3660+source tree. The Stellarium build directory is expected to be:
3661+
3662+ $STELROOT/builds/unix
3663+
3664+2. Create a sub-directory builds/unix and change into that directory.
3665+
3666+3. Run:
3667+
3668+ cmake ../..
3669+ make
3670+ make install
3671+
3672+If all goes well, the relevant files should be built and copied to your
3673+~/.stellarium/modules directory.
3674+
3675+
3676
3677=== added directory 'plugins/Scenery3d/doc'
3678=== added file 'plugins/Scenery3d/doc/Scenery3d.pdf'
3679Binary files plugins/Scenery3d/doc/Scenery3d.pdf 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/doc/Scenery3d.pdf 2015-04-01 10:27:06 +0000 differ
3680=== added file 'plugins/Scenery3d/doc/Scenery3d.tex'
3681--- plugins/Scenery3d/doc/Scenery3d.tex 1970-01-01 00:00:00 +0000
3682+++ plugins/Scenery3d/doc/Scenery3d.tex 2015-04-01 10:27:06 +0000
3683@@ -0,0 +1,614 @@
3684+\documentclass[a4paper]{article}
3685+\usepackage[latin1]{inputenc}
3686+\usepackage[T1]{fontenc}
3687+\usepackage{a4wide}
3688+\usepackage{hyperref}
3689+\newcommand{\filename}[1]{\texttt{#1}}
3690+\newcommand{\cmd}[1]{\texttt{#1}}
3691+
3692+\title{Scenery3d - Walkable 3D Models in Stellarium} \author{Georg
3693+Zotti\thanks{\url{Georg.Zotti@univie.ac.at},
3694+\url{http://astrosim.univie.ac.at}}}
3695+\begin{document}
3696+\maketitle
3697+
3698+\section{Introduction}
3699+\label{sec:Introduction}
3700+
3701+
3702+Have you ever wished to be able to walk through Stonehenge or other
3703+ancient building structures described as being constructed with astronomical
3704+orientation in mind, and experience such orientation in 3D?
3705+
3706+The Stellarium Scenery3d plugin allows you to see architectural 3D models
3707+embedded in a landscape combined with the excellent representation of a sky
3708+simulation provided by Stellarium. You can walk around, check for (or
3709+demonstrate) possible astronomical alignments of ancient architecture, see
3710+sundials and other shadow casters in action, etc.
3711+
3712+\section{Usage}
3713+\label{sec:Usage}
3714+
3715+
3716+You activate the plugin with the \emph{circular enclosure} button at screen
3717+bottom or by pressing [Ctrl+3]. The other button with circular enclosure and
3718+tool icon (or [Ctrl+Shift+3]) opens the settings dialog. Once loaded and
3719+displaying, you can walk around pressing [Ctrl] plus cursor keys. Change eye
3720+height with [Ctrl]+[PgUp]/[PgDn] keys. Adding [Shift] key increases speed by 10,
3721+[Alt] by 5 (pressing both keys multiplies by 50!). If you release [Ctrl] before
3722+the cursor key, animation will continue. (Press [Ctrl]+any cursor key to stop
3723+moving.)\footnote{Bug or feature? I (GZ) had to change keyboard handling in the
3724+main program, somewhat breaking the plugin concept. TBD: Discuss with the core
3725+team.}
3726+
3727+Further key bindings exist which can be configured using the Stellarium default
3728+key-binding interface. Some options are also available in the Scenery3d dialog.
3729+For example, coordinate display can be enabled. If you have georeferenced models
3730+in a true geographical coordinate grid, e.g. UTM or Gauss-Krueger, you will
3731+especially like this, and this makes the plugin usable for scientific purposes.
3732+Display shows grid name, Easting, Northing, Altitude of ground, and eye height
3733+above ground.
3734+
3735+Other features include a virtual ``torchlight'', which can be enabled to give
3736+additional local illumination around the viewer to help to see in the dark.
3737+Interesting points of view can be saved and restored later by the user,
3738+including a description of the view. Scene authors can also distribute
3739+predefined viewpoints in their scene.
3740+
3741+The plugin also simulates the shadows of the scene's objects cast by the Sun,
3742+Moon and even Venus (only the 1 shadow caster shown at a time), so you could use
3743+it for examining sundials, or archeological structures.
3744+
3745+\section{Hardware Requirements \& Performance}
3746+\label{sec:HardwareRequirements}
3747+
3748+In order to work with the non-linear projection models in Stellarium, this
3749+plugin uses a trick to create the foreground renderings: it renders the scene
3750+into the six planes of a so-called cubemap, which is then drawn onto a cube
3751+which has been projected correctly. Your graphics card must be able to do this,
3752+i.e. it must support the OpenGL extension called
3753+\texttt{EXT\_framebuffer\_object}. Typical modern 3D cards (by NVidia or
3754+ATI/AMD) support this extension. In case your graphics hardware does not
3755+suppport it, the plugin will still work, but you are limited to perspective
3756+projection.
3757+
3758+You can influence rendering quality, but also speed, using the plugin's
3759+GUI, which provides some options such as enabling the use
3760+of shadows, bumpmapping (provides more realistic surface lighting) or
3761+configuring the sizes of the textures used
3762+for the cubemap or shadowmaps. Larger values there improve the quality,
3763+but require faster hardware and more video memory for smooth results.
3764+
3765+Because the ``cubemap trick'' requires quite a large amount of performance (in
3766+essence, the scene has to be rendered 6 times), there are some options available
3767+that try to reduce this burden. The first option is to change the type of the
3768+``cubemap''. The most compatible setting is \emph{6 textures}, which seems to
3769+work best on older integrated Intel GPUs. The recommended default is the second
3770+setting, \emph{Cubemap}, which uses a more modern OpenGL feature and generally
3771+works a bit faster than \emph{6 textures} on more modern graphics card. Finally,
3772+the \emph{Geometry shader} option tries to render all 6 cube faces at once. This
3773+requires a more recent GPU + drivers (at least OpenGL 3.2 must be supported),
3774+the setting is disabled otherwise. Depending on your hardware and the scene's
3775+complexity, this method may give a speedup, BUT may also give a slowdown.
3776+
3777+Another option prevents re-rendering of the cubemap if nothing relevant has
3778+changed. You can define the interval (in Stellarium's simulation time) in which
3779+nothing is updated in the GUI. You can still rotate the camera without causing a
3780+re-draw, giving a subjective performance that is close to Stellarium's
3781+performance without Scenery3d. When moving, the cubemap will be updated. You can
3782+enable another option that only causes 1 or 2 sides of the cubemap to be updated
3783+while you move, giving a speedup but causing some parts of the image to be
3784+outdated and discontinuous. The whole cubemap will be recreated when you stop
3785+moving automatically.
3786+
3787+Shadow rendering may also cause quite a performance impact. The \emph{Simple
3788+shadows} option can speed this up a lot, at the cost of shadow quality
3789+especially in larger scenes. Another performance/quality factor is shadow
3790+filtering. The sharpest (and fastest) possible shadows are achieved with
3791+filtering \emph{Off}, but depending on shadowmap resolution and scene size the
3792+shadows may look quite ``blocky''. \emph{Hardware} shadow filtering is usually
3793+very fast, but may not improve appearance a lot. Therefore, there are additional
3794+filter options available, the \emph{High} filter option is relatively expensive.
3795+Finally, the \emph{PCSS} option allows to approximate the increase of shadow
3796+penumbras relative to the distance from their shadow casters, i.e. shadows are
3797+sharp near contact points, and more blurred further away. This again requires
3798+quite a bit of performance, and only works if the shadow filter option is set to
3799+\emph{Low} or \emph{High} (without \emph{Hardware}).
3800+
3801+The configuration GUI shows tooltips for most of its settings, which can explain
3802+what a setting does. All settings are saved automatically, and restored when you
3803+reopen Stellarium.
3804+
3805+\section{Model Configuration}
3806+\label{sec:ModelConfiguration}
3807+
3808+\begin{table}[h]
3809+ \centering
3810+\begin{tabular}{rl}
3811+Geometry&Yes\\Lights&Yes\\Clay&No\\Photomatched&Yes\\DefaultUVs&No\\Instanced&No
3812+\end{tabular}
3813+\caption{Kerkythea Export Settings}
3814+ \label{fig:KerkytheaExportSettings}
3815+\end{table}
3816+
3817+The model format supported in Scenery3d is Wavefront .OBJ, which is
3818+pretty common for 3D models. You can use several modeling programs to
3819+build your models. Software such as Blender, Maya, 3D Studio
3820+Max etc.\ can export OBJ.
3821+
3822+A simple and cost-free modeling program is Google Sketchup, commonly
3823+used to create the 3D buildings seen in Google Earth. It can be used
3824+to create georeferenced models. OBJ is not a native export format for
3825+the standard version of Google Sketchup. If you are not willing to
3826+afford Sketchup Pro, you have to find another way to export a textured
3827+OBJ model.
3828+
3829+One good exporter is available in the Kerkythea renderer project
3830+available at \url{http://www.kerkythea.net/joomla/}. You need
3831+\filename{SU2KT~3.17}
3832+or better, and \filename{KT2OBJ~1.1.0} or better. Deselect any selection, then
3833+export your model to the Kerkythea XML format with settings shown in
3834+~\autoref{fig:KerkytheaExportSettings}.
3835+
3836+
3837+%(Or, with selection enabled, make sure settings are No-Yes-Yes-No-Yes-No-No).
3838+You do not have to launch Kerkythea unless you want to create nice renderings of
3839+your model.
3840+Then, use the \filename{KT2OBJ} converter to create an OBJ. You can delete the
3841+XML after the conversion. Note that some texture coordinates may not be
3842+exported correctly. The setting Photomatched:Yes seems now to have
3843+corrected this issue, esp. with distorted/manu\-ally shifted textures.
3844+
3845+Recently, another free OBJ exporter has been made available by
3846+TIG: \filename{OBJexporter.rb}\footnote{Available from
3847+\url{http://forums.sketchucation.com/viewtopic.php?f=323&t=33448}}.
3848+This is the only OBJ exporter capable of handling large TIN landscapes
3849+($>450.000$ triangles).
3850+As of version 2.6 it seems to be the best OBJ exporter available for Sketchup.
3851+
3852+%As of version 1.6 it appears to have valid texture coordinates, but I have
3853+%experienced problems with black faces which need more
3854+%investigation. Maybe you can combine two OBJ files with another 3D
3855+%editor after creating individual OBJs if this is a problem.
3856+
3857+This exporter swaps Y/Z coordinates, but you can add a key to the config file to
3858+correct swapped axes, see below. Other exporters may also provide coordinates in
3859+any order of X, Y, Z -- all those can be properly configured.
3860+
3861+Another (almost) working alternative: \filename{ObjExporter.rb} by author
3862+Honing. Here, export with settings 0xxx00. This will not create a
3863+\filename{TX...} folder but dump all textures in the same directory as the OBJ
3864+and MTL files. Unfortunately, this time some material assignments seem to be
3865+bad.
3866+
3867+Yet another exporter, \filename{su2objmtl}, does also not provide good texture
3868+coordinates and cannot be recommended at this time.
3869+
3870+\subsection{Notes on OBJ file format limitations}
3871+\label{sec:OBJlimitations}
3872+
3873+The OBJ format supported is only a subset of the full OBJ format: Only
3874+(optionally textured) triangle meshes are supported, i.e., only lines containing
3875+statements: \cmd{mtllib}, \cmd{usemtl}, \cmd{v}, \cmd{vn}, \cmd{vt}, \cmd{f}
3876+(with three elements only!), \cmd{g}. Negative vertex numbers (i.e., a
3877+specification of relative positions) are not supported.
3878+
3879+A further recommendation for correct illumination is that all vertices should
3880+have vertex normals. Sketchup models exported with the Kerkythea or TIG plugins
3881+should have correct normals. If your model does not provide them, default
3882+normals will be reconstructed from the triangle edges, resulting in a faceted
3883+look.
3884+
3885+If possible, the model should also be triangulated, but the current loader may
3886+also work with non-triangle geometry. The correct use of objects ('o') and
3887+groups ('g') will improve performance: it is best if you pre-combine all objects
3888+that use the same material into a single one. The loader will try to optimize it
3889+anyways if this is not the case, but can do this only partly (to combine 2
3890+objects with the same material into 1, it requires them to follow directly after
3891+each other in the OBJ). A simple guide to use Blender for this task follows:
3892+
3893+\begin{itemize}
3894+\item Import from Wavefront (.obj) - you may need to change the forward/up axes for correct orientation, try -Y for forward and Z for up
3895+\item Select an object which has a shared material
3896+\item Press Shift+L and select 'By Material'
3897+\item Select 'Join' in the left (main) tool window
3898+\item Repeat for other objects that have shared materials
3899+\item Export the .obj, making sure to select the same forward/up axes as in the import, also make sure ``Write Normals'', ``Write Materials'' and ``Include UVs'' are checked
3900+\end{itemize}
3901+
3902+For transparent objects (with a 'd' or 'Tr' value, alpha testing does NOT need this), this recommendation does NOT hold: for optimal results, each separate transparent object should be exported as a separate ``OBJ object''. This is because they need to be sorted during rendering to achieve correct transparency. If the objects are combined already, you can separate them using Blender:
3903+
3904+\begin{itemize}
3905+\item Import .obj (see above)
3906+\item Select the combined transparent object
3907+\item Enter ``Edit'' mode with TAB and make sure everything is selected (press A if not)
3908+\item Press P and select ``By loose parts'', this should separate the object into it's unconnected regions
3909+\item Export .obj (see above), also check ``Objects as OBJ Objects''
3910+\end{itemize}
3911+
3912+\begin{table}[b]
3913+\begin{tabular}{llll}
3914+Parameter&Default &Range & Meaning\\
3915+\cmd{Ka} &set to \cmd{Kd} values & $0\dots1$ each& R/G/B Ambient color\\
3916+\cmd{Kd} &0.8 0.8 0.8 & $0\dots1$ each& R/G/B Diffuse color\\
3917+\cmd{Ke} &0.0 0.0 0.0 & $0\dots1$ each& R/G/B Emissive color\\
3918+\cmd{Ks} &0.0 0.0 0.0 & $0\dots1$ each& R/G/B Specular color\\
3919+\cmd{Ns} &8.0 & $0\dots\infty$ & shinyness \\
3920+\cmd{d} or \cmd{Tr} &1.0 & $0\dots1$ & opacity \\
3921+\cmd{bAlphatest}&0 & 0 or 1 & perform alpha test \\
3922+\cmd{bBackface}&0 & 0 or 1 & render backface \\
3923+\cmd{map\_Kd} & (none) & filename & texture map to be mixed with Ka, Kd \\
3924+\cmd{map\_Ke} & (none) & filename & texture map to be mixed with Ke \\
3925+\cmd{map\_bump}& (none) & filename & normal map for surface roughness
3926+\end{tabular}
3927+\caption{MTL parameters evaluated}
3928+\label{tab:MTL}
3929+\end{table}
3930+
3931+The MTL file specified by ``mtllib'' contains the material parameters. The
3932+minimum that should be specified is either \cmd{map\_Kd} or a \cmd{Kd} line
3933+specifying color values used for the respective faces. But there are other
3934+options in MTL files, and the supported parameters and defaults are listed in
3935+Table~\ref{tab:MTL}.
3936+
3937+If no ambient color is specified, the diffuse color values are taken for the
3938+ambient color. An optional emissive term \cmd{Ke} can be added, which is
3939+modulated to only be visible during nighttime. This also requires the
3940+landscape's self-illumination layer to be enabled. It allows to model
3941+self-illuminating objects such as street lights, windows etc. It can optionally
3942+also be modulated by the emissive texture \cmd{map\_Ke}.
3943+
3944+If a value for \cmd{Ks} is specified, specularity is evaluated using the
3945+\href{https://en.wikipedia.org/wiki/Phong_reflection_model}{Phong reflection
3946+model} with \cmd{Ns} as the exponential shininess constant. Larger shininess
3947+means smaller specular highlights (more metal-like appearance). Specularity is
3948+not modulated by the texture maps.
3949+
3950+If a value for \cmd{d} or \cmd{Tr} exists, alpha blending is enabled for this
3951+material. This simulates transparency effects. Transparency can be further
3952+controlled using the alpha channel of the \cmd{map\_Kd} texture.
3953+
3954+A simpler and usually more performant way to achieve simple ``cutout''
3955+transparency effects is alpha-testing, by setting \cmd{bAlphatest} to 1. This
3956+simply discards all pixels of the model where the alpha value of the
3957+\cmd{map\_Kd} is below the \cmd{transparency\_threshold} value from
3958+\filename{scenery3d.ini}, making ``holes'' in the model. This also produces
3959+better shadows for such objects. If required, alpha testing can be combined with
3960+``real'' blending-basded transparency.
3961+
3962+Sometimes, some exported objects only have a single side, and are only visible
3963+from one side when looked at in Scenery3d. This is caused by an optimization
3964+called \href{https://en.wikipedia.org/wiki/Back-face_culling}{back-face
3965+culling}, which skips drawing the back sides of objects because they are usually
3966+not visible anyway. If possible, avoid such ``thin'' geometry, this will also
3967+produce better shadows on the object. As a workaround, you can also set
3968+\cmd{bBackface} to 1 to disable back-face culling for this material.
3969+
3970+The optional \cmd{map\_bump} enables the use of a tangent-space
3971+\href{https://en.wikipedia.org/wiki/Normal_mapping}{normal maps}, which provides
3972+a dramatic improvement in surface detail under illumination.
3973+
3974+On reasonably good hardware (tested on a notebook PC with NVidia M9800
3975+GTS), models up to 100.000 triangles are fluent, up to 250.000 are
3976+still ``interactive''. If display is too slow, switch to perspective
3977+projection: all other projections require almost sixfold effort!
3978+You can also try if the new ``lazy'' cubemap mode works for you, where
3979+the scene is only rendered in specific timesteps or when movement happens.
3980+See \autoref{sec:HardwareRequirements} for details.
3981+
3982+
3983+\subsection{Configuring OBJ for Scenery3d}
3984+\label{sec:Configuring}
3985+
3986+The walkaround in your scene can use a ground level (piece of terrain)
3987+on which the observer can walk. The observer eye will always stay ``eye
3988+height'' above ground. Currently, there is no collision detection with
3989+walls implemented, so you can easily walk through walls, or jump on
3990+high towers, if their platform or roof is exported in the ground
3991+layer. If your model has no explicit ground layer, walk will be on the
3992+highest surface of the scenery layer. If you use the special name
3993+NULL as ground layer, walk will be above a zero-height level.
3994+
3995+Technically, if your model has cavities or doors, you should export
3996+your model twice. Once, just the ground plane, i.e. where you will
3997+walk. Of course, for a temple or other building, this includes its
3998+socket above soil, and any steps. This plane is required to compute
3999+eye position above ground. Note that it is not possible to walk in
4000+several floors of a building, or in a multi-plane staircase. You may
4001+have to export several ``ground'' planes and configure several scenery
4002+directories for those rare cases. For optimal performance, the ground
4003+model should consist of as few triangles as you can tolerate.
4004+
4005+The second export includes all visible model parts, and will be used for
4006+rendering. Of course, this requires the ground plane again, but also
4007+all building elements, walls, roofs, etc.
4008+
4009+If you have not done so by yourself, it is recommended to separate
4010+ground and buildings into Sketchup layers in order to easily switch
4011+the model to the right state prior to exporting.
4012+
4013+Filename recommendations:
4014+\begin{verbatim}
4015+<Temple>.skp Name of a Sketchup Model file.
4016+ (The "<>" brackets signal "use your own name here!")
4017+ The SKP file is not used by Scenery3d.
4018+<Temple>.obj Model in OBJ format.
4019+<Temple>_ground.obj Ground layer, if different from Model file.
4020+\end{verbatim}
4021+
4022+OBJ export may also create folders \verb|TX_<Temple>| and
4023+\verb|TX_<Temple>_ground|. You can delete the \verb|TX_<Temple>_ground| folder,
4024+\verb|<Temple>_ground.obj| is just used to compute vertical height.
4025+
4026+Stellarium uses a directory to store additional data per-user. On Windows, this
4027+defaults to \verb|C:\Documents and Settings\<username>\Application Data\Stellarium|, but you can use another directory by using the command-line
4028+argument \cmd{--user-dir <USERDATA>}. We will refer to this directory. Put the
4029+OBJ, MTL and TX directories into a directory, \\
4030+\verb|<USERDATA>/Stellarium/modules/scenery3d/<Temple>|, and add a text file
4031+called \texttt{scenery3d.ini} (This name is fixed!) with content described as
4032+follows.
4033+
4034+% A Sketchup plugin "Write scenery3d.ini for Stellarium" will write this
4035+% file. Locate the directory where the .obj file(s) reside(s), and store
4036+% scenery3d.ini there. If you have other modelers and models, or if your
4037+% model is not georeferenced in Sketchup, write the file yourself and
4038+% use the following format.
4039+%
4040+% TBD GZ: Write this Sketchup export plugin!
4041+
4042+\begin{verbatim}
4043+
4044+[model]
4045+name=<Temple> Unique ID within all models in scenery3d directory.
4046+ Recommendation: use directory name.
4047+landscape=<landscapename> Name of an available Stellarium landscape.
4048+\end{verbatim}
4049+This is required if the landscape file includes geographical
4050+coordinates and your model does not: First, the location coordinates
4051+of the Landscape file are used, then location coordinates given here.
4052+The landscape also provides the background image of your scenery. - If
4053+you want a zero-height (mathematical) horizon, use the provided
4054+landscape called \filename{Zero landscape}.
4055+\begin{verbatim}
4056+scenery=<Temple>.obj The complete model, including visible ground.
4057+ground=<Temple>_ground.obj Optional: separate ground plane. (NULL for zero altitude.)
4058+description=<Description> A basic scene description (including HTML)
4059+\end{verbatim}
4060+The \filename{scenery3d.ini} may contain a simple scene description, but it is
4061+recommended to use the new \emph{localizable} description format: in the scene's
4062+directory (where \filename{scenery3d.ini} lies) create files in the format
4063+\filename{description.<lang\_code>.utf8} which can contain arbitrary
4064+\cmd{UTF-8}-encoded HTML content. \cmd{lang\_code} stands for the ISO 639
4065+language code.
4066+\begin{verbatim}
4067+author=<Your Name yourname@yourplace.com>
4068+copyright=<Copyright Info>
4069+
4070+obj_order=XYZ | Use this if you have used an exporter which swaps Y/Z coordinates.
4071+ | Defaults to XYZ, other options: XZY, YZX, YXZ, ZXY, ZYX
4072+camNearZ=0.3 This defines the distance of the camera near plane, default 0.3.
4073+ Everything closer than this value to the camera can not be
4074+ displayed. Must be larger than zero. It may seem tempting
4075+ to set this very small, but this will lead to accuracy issues.
4076+ Recommendation is not to go under 0.1
4077+camFarZ=10000 Defines the maximal viewing distance, default 10000.
4078+shadowDistance=<val> The maximal distance shadows are displayed. If left out, the
4079+ value from camFarZ is used here. If this is set to a smaller
4080+ value, this may increase the quality of the shadows that are
4081+ still visible.
4082+shadowSplitWeight=0..1 Decimal value for further shadow tweaking. If you require
4083+ better shadows up close, try setting this to higher values.
4084+ The default is calculated using a heuristic that incorporates
4085+ scene size.
4086+
4087+[general]
4088+\end{verbatim}
4089+The general section defines some further import/rendering options.
4090+\begin{verbatim}
4091+transparency_threshold=0.5 Defines the alpha threshold for alpha-testing,
4092+ as described in section 4.1. Default 0.5
4093+scenery_generate_normals=0 Boolean, if true normals are recalculated by the
4094+ plugin, instead of imported. Default false
4095+ground_generate_normals=0 Boolean, same as above, for ground model. Default
4096+false.
4097+
4098+[location]
4099+\end{verbatim}
4100+Optional section to specify geographic longitude $\lambda$, latitude $\varphi$,
4101+and altitude. Required if\\ \verb|coord/convergence_angle==from_grid|, else
4102+location is inherited from landscape.
4103+\begin{verbatim}
4104+planet = Earth
4105+latitude = +48d31'30.4" ; Required if coord/convergence_angle==from_grid
4106+longitude = +16d12'25.5" ; "--"
4107+altitude =from_model|<int> ;
4108+\end{verbatim}
4109+altitude (for astronomical computations) can be computed from the model: if
4110+\verb|from_model|, it is computed as $(z_{min}+z_{max})/2+\mathtt{orig\_H}$,
4111+i.e. from the model bounding box centre height.
4112+
4113+\begin{verbatim}
4114+display_fog = 0
4115+atmospheric_extinction_coefficient = 0.2
4116+atmospheric_temperature = 10.0
4117+atmospheric_pressure = 1013.0
4118+light_pollution = 1
4119+
4120+[coord]
4121+\end{verbatim}
4122+
4123+Entries in the \verb|[coord]| section are again optional, default to zero when
4124+not specified, but are
4125+required if you want to display meaningful eye coordinates in your
4126+survey (world) coordinate system, like UTM or Gauss-Kr\"uger.
4127+
4128+\begin{verbatim}
4129+grid_name=<string>
4130+\end{verbatim}
4131+Name of grid coordinates, e.g. \texttt{``UTM 33 U (WGS 84)''},
4132+\texttt{``Gauss-Kr\"uger M34''} or \texttt{``Relative to <Center>''} This name is
4133+only displayed, there is no evaluation of its contents.
4134+
4135+\begin{verbatim}
4136+orig_E=<double> | (Easting) East-West-distance to zone central meridian
4137+orig_N=<double> | (Northing) North distance from Equator
4138+orig_H=<double> | (Height) Altitude above Mean Sea Level of model origin
4139+\end{verbatim}
4140+These entries describe the offset, in metres, of the model coordinates relative
4141+to coordinates in a geographic grid, like Gauss-Kr\"uger. If you have your model
4142+vertices specified in grid coordinates, do not specify \verb|orig_...| data, but
4143+please add \verb|start_...| data, below.
4144+
4145+
4146+\begin{verbatim}
4147+convergence_angle=from_grid|<double>
4148+grid_meridian=<double>|+<int>d<int>'<float>"
4149+\end{verbatim}
4150+Typically, digital elevation models and building structures built on those are
4151+survey-grid aligned, so true geographical north will not coincide with grid
4152+north, the difference is known as meridian convergence.
4153+\begin{equation}
4154+\gamma(\lambda, \varphi)=\arctan(\tan(\lambda-\lambda_0)\sin\varphi)
4155+\end{equation}
4156+This amount can be given in \verb|convergence_angle| (degrees), so that your
4157+model will be aligned with True North\footnote{%
4158+\url{http://en.wikipedia.org/wiki/Transverse_Mercator_projection}}. Central
4159+meridian $\lambda_0$ of grid zone, e.g. for UTM or Gauss-Kr\"uger.
4160+\verb|grid_meridian| is only required to compute convergence angle if
4161+\verb|convergence_angle="from_grid"|
4162+
4163+\begin{verbatim}
4164+zero_ground_height=<double>
4165+\end{verbatim}
4166+height of terrain outside \filename{ground.OBJ}, or if \verb|ground=NULL|.
4167+Allows smooth approach from outside. This value is relative to the model
4168+origin, or typically close to zero, i.e., use a Z value in model coordinates,
4169+not world coordinates! (If you want the terrain height surrounding your model to
4170+be \verb|orig_H|, use 0, not the correct mean height above sea level!) Defaults
4171+to minimum of height of ground level (or model, resp.) bounding box.
4172+
4173+\begin{verbatim}
4174+start_E=<double>
4175+start_N=<double>
4176+start_H=<double> /* only meaningful if ground==NULL, else H is derived from ground */
4177+start_Eye=<double> /* default: 1.65m */
4178+start_az_alt_fov=<az_deg>,<alt_deg>,<fov_deg> /* initial view direction and field of view.*/
4179+\end{verbatim}
4180+\verb|start_...| defines the view position to be set after loading the scenery.
4181+Defaults to center of model boundingbox.
4182+
4183+It is advisable to use the grid coordinates of the location of the panoramic
4184+photo ("landscape") as \verb|start_...| coordinates, or the correct coordinates
4185+and some carefully selected \texttt{start\_az\_alt\_fov} in case of certain view
4186+corridors (temple axes, \ldots).
4187+
4188+\subsection{Predefined views}
4189+You can also distribute some predefined views with your model in a
4190+\filename{viewpoints.ini} file. See the provided ``Sterngarten'' scene for an
4191+example. These entries are not editable by the user through the interface. The
4192+user can always save its own views, they will be saved into the file
4193+\filename{userviews.ini} in the users home directory, and are editable.
4194+
4195+\begin{verbatim}
4196+[StoredViews]
4197+size=<int> Defines how many entries are in this file.
4198+ Prefix each entry with it's index!
4199+1/label=<string> The name of this entry
4200+1/description=<string> A description of this entry (can include HTML)
4201+1/position=<x,y,z,h> The x,y,z grid coordinates (like orig_* or start_*
4202+ in scenery3d.ini) + the current eye height
4203+1/view_fov=<az_deg,alt_deg,fov_deg> The view direction + FOV
4204+ (like start_az_alt_fov in scenery3d.ini)
4205+; an example for the second entry (note the 2 at the beginning of each line!)
4206+2/label = Signs
4207+2/description = Two signs that describe the Sterngarten
4208+2/position = 593155.2421280354,5333348.6304404084,325.7295809038,0.8805893660
4209+2/view_fov = 84.315399,-8.187078,83.000000
4210+\end{verbatim}
4211+
4212+\subsection{Working with non-georeferenced OBJ files}
4213+\label{sec:NonGeoreferenced}
4214+
4215+
4216+There exists modeling software which produces nice models, but without
4217+concept of georeference. One spectacular example is AutoDesk PhotoFly,
4218+a cloud application which delivers 3D models from a bunch of photos
4219+uploaded via its program interface. This ``technological preview'' is
4220+in version 2 and free of cost as of mid-2011.
4221+
4222+The problem with these models is that you cannot assign surveyed
4223+coordinates to points in the model, so either you can georeference the
4224+models in other applications, or you must find the correct
4225+transformation matrix. Importing the OBJ in Sketchup may take a long
4226+time for detailed photo-generated models, and the texturing may
4227+suffer, so you can cut the model down to the minimum necessary e.g.\ in
4228+Meshlab, and import just a stub required to georeference the model in
4229+Sketchup.
4230+
4231+Now, how would you find the proper orientation? The easiest chance
4232+would be with a structure visible in the photo layer of Google
4233+Earth. So, start a new model and immediately "add location" from the
4234+Google Earth interface. Then you can import the OBJ with TIG's importer
4235+plugin. If the imported model looks perfect, you may just place the
4236+model into the Sketchup landscape and export a complete landscape just
4237+like above. If not, or if you had to cut/simplify the OBJ to be able
4238+to import it, you can rotate/scale the OBJ (it must be grouped!). If
4239+you see a shadow in the photos, you may want to set the date/time of
4240+the photos in the scene and verify that the shadows created by
4241+Sketchup illuminating the model match those in the model's photo
4242+texture. When you are satisfied with placement/orientation, you create
4243+a \filename{scenery3d.ini} like above with the command
4244+\cmd{Plugins->ASTROSIM/Stellarium scenery3d helpers->Create scenery3d.ini}.
4245+
4246+Then, you select the OBJ group, open \cmd{Windows->Ruby Console} and call
4247+\cmd{Plugins->ASTROSIM/Stellarium scenery3d helpers->Export transformation
4248+of selected group (e.g., from PhotoFly import)}.
4249+
4250+On the Ruby console, you will find a line of numbers (the $4\times4$
4251+transformation matrix) which you copy/paste (all in one line!) into the
4252+\filename{[model]} section in \filename{scenery3d.ini}.
4253+\begin{verbatim}
4254+obj2grid_trafo=<a11>,<a12>,<a13>,<a14>,<a21>,<a22>,<a23>,<a24>,
4255+ <a31>,<a32>,<a33>,<a34>,<a41>,<a42>,<a43>,<a44>
4256+\end{verbatim}
4257+You edit the \filename{scenery3d.ini} to use your full (unmodified)
4258+PhotoFly model and, if you don't have a panorama, take \filename{Zero}
4259+landscape as (no-)background. It depends on the model if you want to
4260+be able to step on it, or to declare \verb|ground=NULL| for a
4261+constant-height ground. Run Stellarum once and adjust the
4262+\verb|start_N|, \verb|start_E| and \verb|zero_ground_height|.
4263+
4264+\subsubsection{Rotating OBJs with recognized survey points}
4265+\label{sec:RotatingOBJ}
4266+
4267+If you have survey points measured in a survey grid plus a photomodel
4268+with those points visible, you can use Meshlab to find the model
4269+vertex coordinates in the photo model, and some other program like
4270+CoordTrans in the JavaGraticule3D suite to find either the matrix
4271+values to enter in \filename{scenery3d.ini} or even rotate the OBJ
4272+points. However, this involves more math than can be described here;
4273+if you came that far, you likely know the required steps. Here it
4274+really helps if you know how to operate automatic text processors like
4275+AWK.
4276+
4277+\section*{Authors and Acknowledgements}
4278+\label{Acknowledgments}
4279+
4280+
4281+Scenery3d was conceived by Georg Zotti for the Astrosim project. It was
4282+implemented originally in 2010/2011 by Simon Parzer and Peter Neubauer as
4283+student work supervised by Michael Wimmer (TU Wien). Improvements in
4284+integration, user interaction, .ini option handling, OBJ/MTL loader bugfixes and
4285+georeference testing by Georg Zotti. Andrei Borza in 2011/12 further improved
4286+rendering quality (shadow mapping, normal mapping) and speed. In 2014/15,
4287+Florian Schaukowitsch adapted the code to work with Qt 5 and the current
4288+Stellarium 0.13 codebase, replaced the renderer with a more efficient, fully
4289+shader-based system, implemented various performance, quality and usability
4290+enhancements, and did some code cleanup. Both Andrei and Florian were again
4291+supervised by Michael Wimmer.
4292+
4293+This work has been created during the ASTROSIM project supported 2008-2012 by
4294+the Austrian Science Fund (FWF) under grant number P~21208-G19.
4295+
4296+\end{document}
4297+
4298
4299=== added file 'plugins/Scenery3d/doc/classdiagram.dia'
4300Binary files plugins/Scenery3d/doc/classdiagram.dia 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/doc/classdiagram.dia 2015-04-01 10:27:06 +0000 differ
4301=== added file 'plugins/Scenery3d/doc/developer-doc.odt'
4302Binary files plugins/Scenery3d/doc/developer-doc.odt 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/doc/developer-doc.odt 2015-04-01 10:27:06 +0000 differ
4303=== added file 'plugins/Scenery3d/doc/developer-doc.pdf'
4304Binary files plugins/Scenery3d/doc/developer-doc.pdf 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/doc/developer-doc.pdf 2015-04-01 10:27:06 +0000 differ
4305=== added directory 'plugins/Scenery3d/resources'
4306=== added file 'plugins/Scenery3d/resources/Scenery3d.qrc'
4307--- plugins/Scenery3d/resources/Scenery3d.qrc 1970-01-01 00:00:00 +0000
4308+++ plugins/Scenery3d/resources/Scenery3d.qrc 2015-04-01 10:27:06 +0000
4309@@ -0,0 +1,10 @@
4310+<RCC>
4311+ <qresource prefix="/Scenery3d">
4312+ <file>bt_scenery3d_on.png</file>
4313+ <file>bt_scenery3d_off.png</file>
4314+ <file>bt_scenery3d_settings_on.png</file>
4315+ <file>bt_scenery3d_settings_off.png</file>
4316+ <file>bt_scenery3d_eyepoint_off.png</file>
4317+ <file>bt_scenery3d_eyepoint_on.png</file>
4318+ </qresource>
4319+</RCC>
4320
4321=== added file 'plugins/Scenery3d/resources/bt_scenery3d_eyepoint_off.png'
4322Binary files plugins/Scenery3d/resources/bt_scenery3d_eyepoint_off.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_eyepoint_off.png 2015-04-01 10:27:06 +0000 differ
4323=== added file 'plugins/Scenery3d/resources/bt_scenery3d_eyepoint_on.png'
4324Binary files plugins/Scenery3d/resources/bt_scenery3d_eyepoint_on.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_eyepoint_on.png 2015-04-01 10:27:06 +0000 differ
4325=== added file 'plugins/Scenery3d/resources/bt_scenery3d_icons_master.tif'
4326Binary files plugins/Scenery3d/resources/bt_scenery3d_icons_master.tif 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_icons_master.tif 2015-04-01 10:27:06 +0000 differ
4327=== added file 'plugins/Scenery3d/resources/bt_scenery3d_off.png'
4328Binary files plugins/Scenery3d/resources/bt_scenery3d_off.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_off.png 2015-04-01 10:27:06 +0000 differ
4329=== added file 'plugins/Scenery3d/resources/bt_scenery3d_on.png'
4330Binary files plugins/Scenery3d/resources/bt_scenery3d_on.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_on.png 2015-04-01 10:27:06 +0000 differ
4331=== added file 'plugins/Scenery3d/resources/bt_scenery3d_settings_off.png'
4332Binary files plugins/Scenery3d/resources/bt_scenery3d_settings_off.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_settings_off.png 2015-04-01 10:27:06 +0000 differ
4333=== added file 'plugins/Scenery3d/resources/bt_scenery3d_settings_on.png'
4334Binary files plugins/Scenery3d/resources/bt_scenery3d_settings_on.png 1970-01-01 00:00:00 +0000 and plugins/Scenery3d/resources/bt_scenery3d_settings_on.png 2015-04-01 10:27:06 +0000 differ
4335=== added directory 'plugins/Scenery3d/src'
4336=== added file 'plugins/Scenery3d/src/AABB.cpp'
4337--- plugins/Scenery3d/src/AABB.cpp 1970-01-01 00:00:00 +0000
4338+++ plugins/Scenery3d/src/AABB.cpp 2015-04-01 10:27:06 +0000
4339@@ -0,0 +1,304 @@
4340+#include "AABB.hpp"
4341+#include "GLFuncs.hpp"
4342+#include <limits>
4343+
4344+Box::Box()
4345+{
4346+
4347+}
4348+
4349+void Box::transform(const QMatrix4x4& tf)
4350+{
4351+ for(int i =0;i<8;++i)
4352+ {
4353+ //this is a bit stupid, but only used for debugging, so...
4354+ QVector3D vec(vertices[i].v[0],vertices[i].v[1],vertices[i].v[2]);
4355+ vec = tf * vec;
4356+ vertices[i] = Vec3f(vec.x(),vec.y(),vec.z());
4357+ }
4358+}
4359+
4360+void Box::render() const
4361+{
4362+// Minimum to avoid trouble when building on pure OpenGL ES systems
4363+// Not sure about ANGLE!
4364+#if !defined(QT_OPENGL_ES_2)
4365+ Vec3f nbl = vertices[0];
4366+ Vec3f nbr = vertices[1];
4367+ Vec3f ntr = vertices[2];
4368+ Vec3f ntl = vertices[3];
4369+ Vec3f fbl = vertices[4];
4370+ Vec3f fbr = vertices[5];
4371+ Vec3f ftr = vertices[6];
4372+ Vec3f ftl = vertices[7];
4373+
4374+ glExtFuncs->glColor3f(1.0f,1.0f,1.0f);
4375+ glExtFuncs->glLineWidth(5);
4376+ glExtFuncs->glBegin(GL_LINE_LOOP);
4377+ //near plane
4378+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4379+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4380+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4381+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4382+ glExtFuncs->glEnd();
4383+
4384+ glExtFuncs->glBegin(GL_LINE_LOOP);
4385+ //far plane
4386+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4387+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4388+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4389+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4390+ glExtFuncs->glEnd();
4391+
4392+ glExtFuncs->glBegin(GL_LINE_LOOP);
4393+ //bottom plane
4394+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4395+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4396+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4397+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4398+ glExtFuncs->glEnd();
4399+
4400+ glExtFuncs->glBegin(GL_LINE_LOOP);
4401+ //top plane
4402+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4403+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4404+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4405+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4406+ glExtFuncs->glEnd();
4407+
4408+ glExtFuncs->glBegin(GL_LINE_LOOP);
4409+ //left plane
4410+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4411+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4412+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4413+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4414+ glExtFuncs->glEnd();
4415+
4416+ glExtFuncs->glBegin(GL_LINE_LOOP);
4417+ // right plane
4418+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4419+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4420+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4421+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4422+ glExtFuncs->glEnd();
4423+#endif
4424+}
4425+
4426+AABB::AABB()
4427+{
4428+ *this = AABB(std::numeric_limits<float>::max(),-std::numeric_limits<float>::max());
4429+}
4430+
4431+AABB::AABB(Vec3f min, Vec3f max)
4432+{
4433+ this->min = min;
4434+ this->max = max;
4435+}
4436+
4437+AABB::~AABB() {}
4438+
4439+void AABB::reset()
4440+{
4441+ *this = AABB();
4442+}
4443+
4444+void AABB::resetToZero()
4445+{
4446+ *this = AABB(Vec3f(0.0f),Vec3f(0.0f));
4447+}
4448+
4449+void AABB::expand(const Vec3f &vec)
4450+{
4451+ min = Vec3f( std::min(vec.v[0], min.v[0]),
4452+ std::min(vec.v[1], min.v[1]),
4453+ std::min(vec.v[2], min.v[2]));
4454+ max = Vec3f( std::max(vec.v[0], max.v[0]),
4455+ std::max(vec.v[1], max.v[1]),
4456+ std::max(vec.v[2], max.v[2]));
4457+}
4458+
4459+Vec3f AABB::getCorner(Corner corner) const
4460+{
4461+ Vec3f out;
4462+
4463+ switch(corner)
4464+ {
4465+ case MinMinMin:
4466+ out = min;
4467+ break;
4468+
4469+ case MaxMinMin:
4470+ out = Vec3f(max.v[0], min.v[1], min.v[2]);
4471+ break;
4472+
4473+ case MaxMaxMin:
4474+ out = Vec3f(max.v[0], max.v[1], min.v[2]);
4475+ break;
4476+
4477+ case MinMaxMin:
4478+ out = Vec3f(min.v[0], max.v[1], min.v[2]);
4479+ break;
4480+
4481+ case MinMinMax:
4482+ out = Vec3f(min.v[0], min.v[1], max.v[2]);
4483+ break;
4484+
4485+ case MaxMinMax:
4486+ out = Vec3f(max.v[0], min.v[1], max.v[2]);
4487+ break;
4488+
4489+ case MaxMaxMax:
4490+ out = max;
4491+ break;
4492+
4493+ case MinMaxMax:
4494+ out = Vec3f(min.v[0], max.v[1], max.v[2]);
4495+ break;
4496+
4497+ default:
4498+ break;
4499+ }
4500+
4501+ return out;
4502+}
4503+
4504+Vec4f AABB::getEquation(AABB::Plane p) const
4505+{
4506+ Vec4f out;
4507+
4508+ switch(p)
4509+ {
4510+ case Front:
4511+ out = Vec4f(0.0f, -1.0f, 0.0f, -min.v[1]);
4512+ break;
4513+
4514+ case Back:
4515+ out = Vec4f(0.0f, 1.0f, 0.0f, max.v[1]);
4516+ break;
4517+
4518+ case Bottom:
4519+ out = Vec4f(0.0f, 0.0f, -1.0f, -min.v[2]);
4520+ break;
4521+
4522+ case Top:
4523+ out = Vec4f(0.0f, 0.0f, 1.0f, max.v[2]);
4524+ break;
4525+
4526+ case Left:
4527+ out = Vec4f(-1.0f, 0.0f, 0.0f, -min.v[0]);
4528+ break;
4529+
4530+ case Right:
4531+ out = Vec4f(1.0f, 0.0f, 0.0f, max.v[0]);
4532+ break;
4533+
4534+ default:
4535+ break;
4536+ }
4537+
4538+ return out;
4539+}
4540+
4541+Vec3f AABB::positiveVertex(Vec3f& normal) const
4542+{
4543+ Vec3f out = min;
4544+
4545+ if(normal.v[0] >= 0.0f)
4546+ out.v[0] = max.v[0];
4547+ if(normal.v[1] >= 0.0f)
4548+ out.v[1] = max.v[1];
4549+ if(normal.v[2] >= 0.0f)
4550+ out.v[2] = max.v[2];
4551+
4552+ return out;
4553+}
4554+
4555+Vec3f AABB::negativeVertex(Vec3f& normal) const
4556+{
4557+ Vec3f out = max;
4558+
4559+ if(normal.v[0] >= 0.0f)
4560+ out.v[0] = min.v[0];
4561+ if(normal.v[1] >= 0.0f)
4562+ out.v[1] = min.v[1];
4563+ if(normal.v[2] >= 0.0f)
4564+ out.v[2] = min.v[2];
4565+
4566+ return out;
4567+}
4568+
4569+void AABB::render() const
4570+{
4571+// Minimum to avoid trouble when building on pure OpenGL ES systems
4572+// Not sure about ANGLE!
4573+#if !defined(QT_OPENGL_ES_2)
4574+ Vec3f nbl = getCorner(MinMinMin);
4575+ Vec3f nbr = getCorner(MaxMinMin);
4576+ Vec3f ntr = getCorner(MaxMinMax);
4577+ Vec3f ntl = getCorner(MinMinMax);
4578+ Vec3f fbl = getCorner(MinMaxMin);
4579+ Vec3f fbr = getCorner(MaxMaxMin);
4580+ Vec3f ftr = getCorner(MaxMaxMax);
4581+ Vec3f ftl = getCorner(MinMaxMax);
4582+
4583+ glExtFuncs->glColor3f(1.0f, 1.0f, 1.0f);
4584+ glExtFuncs->glLineWidth(5);
4585+ glExtFuncs->glBegin(GL_LINE_LOOP);
4586+ //near plane
4587+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4588+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4589+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4590+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4591+ glExtFuncs->glEnd();
4592+
4593+ glExtFuncs->glBegin(GL_LINE_LOOP);
4594+ //far plane
4595+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4596+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4597+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4598+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4599+ glExtFuncs->glEnd();
4600+
4601+ glExtFuncs->glBegin(GL_LINE_LOOP);
4602+ //bottom plane
4603+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4604+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4605+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4606+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4607+ glExtFuncs->glEnd();
4608+
4609+ glExtFuncs->glBegin(GL_LINE_LOOP);
4610+ //top plane
4611+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4612+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4613+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4614+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4615+ glExtFuncs->glEnd();
4616+
4617+ glExtFuncs->glBegin(GL_LINE_LOOP);
4618+ //left plane
4619+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4620+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4621+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4622+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4623+ glExtFuncs->glEnd();
4624+
4625+ glExtFuncs->glBegin(GL_LINE_LOOP);
4626+ // right plane
4627+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4628+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4629+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4630+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4631+ glExtFuncs->glEnd();
4632+#endif
4633+}
4634+
4635+Box AABB::toBox()
4636+{
4637+ Box ret;
4638+ for(int i =0;i<CORNERCOUNT;++i)
4639+ {
4640+ ret.vertices[i]= getCorner(static_cast<Corner>(i));
4641+ }
4642+ return ret;
4643+}
4644
4645=== added file 'plugins/Scenery3d/src/AABB.hpp'
4646--- plugins/Scenery3d/src/AABB.hpp 1970-01-01 00:00:00 +0000
4647+++ plugins/Scenery3d/src/AABB.hpp 2015-04-01 10:27:06 +0000
4648@@ -0,0 +1,67 @@
4649+#ifndef _AABB_HPP_
4650+#define _AABB_HPP_
4651+
4652+#include <vector>
4653+#include "VecMath.hpp"
4654+
4655+//! A simple "box" class with 8 arbitrary vertices
4656+class Box
4657+{
4658+public:
4659+ Box();
4660+
4661+ Vec3f vertices[8];
4662+
4663+ //! Transforms the vertices
4664+ void transform(const QMatrix4x4 &tf);
4665+ //! Renders the box
4666+ void render() const;
4667+};
4668+
4669+//! An axis-aligned bounding-box class
4670+class AABB
4671+{
4672+public:
4673+ enum Corner
4674+ {
4675+ MinMinMin = 0, MaxMinMin, MaxMaxMin, MinMaxMin,
4676+ MinMinMax, MaxMinMax, MaxMaxMax, MinMaxMax,
4677+ CORNERCOUNT
4678+ };
4679+
4680+ enum Plane
4681+ {
4682+ Front = 0, Back, Bottom, Top, Left, Right,
4683+ PLANECOUNT
4684+ };
4685+
4686+ Vec3f min, max;
4687+
4688+ //! Creates an AABB with minimum vertex set to infinity and maximum vertex set to -infinity
4689+ AABB();
4690+ AABB(Vec3f min, Vec3f max);
4691+ ~AABB();
4692+
4693+ //! Resets minimum to infinity and maximum to -infinity
4694+ void reset();
4695+ //! Resets minimum and maximum to zero vectors
4696+ void resetToZero();
4697+
4698+ //! Updates the bounding box to include the specified vertex.
4699+ void expand(const Vec3f& vec);
4700+
4701+ Vec3f getCorner(Corner corner) const;
4702+
4703+ //! Used for frustum culling
4704+ Vec3f positiveVertex(Vec3f& normal) const;
4705+ Vec3f negativeVertex(Vec3f& normal) const;
4706+
4707+ void render() const;
4708+
4709+ //! Return the plane equation for specified plane as Vec4f
4710+ Vec4f getEquation(AABB::Plane p) const;
4711+ //! Returns a box object that represents the AABB.
4712+ Box toBox();
4713+};
4714+
4715+#endif
4716
4717=== added file 'plugins/Scenery3d/src/CMakeLists.txt'
4718--- plugins/Scenery3d/src/CMakeLists.txt 1970-01-01 00:00:00 +0000
4719+++ plugins/Scenery3d/src/CMakeLists.txt 2015-04-01 10:27:06 +0000
4720@@ -0,0 +1,66 @@
4721+INCLUDE_DIRECTORIES(
4722+ .
4723+ gui
4724+ ${CMAKE_BINARY_DIR}/plugins/Scenery3d/src
4725+ ${CMAKE_BINARY_DIR}/plugins/Scenery3d/src/gui
4726+)
4727+
4728+LINK_DIRECTORIES(${BUILD_DIR}/src)
4729+
4730+SET(Scenery3d_SRCS
4731+ AABB.hpp
4732+ AABB.cpp
4733+ Frustum.hpp
4734+ Frustum.cpp
4735+ GLFuncs.hpp
4736+ Line.hpp
4737+ Line.cpp
4738+ Plane.hpp
4739+ Plane.cpp
4740+ SPolygon.hpp
4741+ SPolygon.cpp
4742+ Polyhedron.hpp
4743+ Polyhedron.cpp
4744+ S3DEnum.hpp
4745+ SceneInfo.hpp
4746+ SceneInfo.cpp
4747+ Scenery3d.hpp
4748+ Scenery3d.cpp
4749+ Scenery3dMgr.hpp
4750+ Scenery3dMgr.cpp
4751+ gui/Scenery3dDialog.hpp
4752+ gui/Scenery3dDialog_p.hpp
4753+ gui/Scenery3dDialog.cpp
4754+ gui/StoredViewDialog.hpp
4755+ gui/StoredViewDialog_p.hpp
4756+ gui/StoredViewDialog.cpp
4757+ ShaderManager.hpp
4758+ ShaderManager.cpp
4759+ OBJ.hpp
4760+ OBJ.cpp
4761+ Heightmap.hpp
4762+ Heightmap.cpp
4763+)
4764+
4765+################# compiles resources files ############
4766+SET(Scenery3d_RES ../resources/Scenery3d.qrc)
4767+QT5_ADD_RESOURCES(Scenery3d_RES_CXX ${Scenery3d_RES})
4768+
4769+################# compiles .ui files ############
4770+SET(Scenery3d_UIS
4771+ gui/scenery3dDialog.ui
4772+ gui/storedViewDialog.ui
4773+)
4774+QT5_WRAP_UI(Scenery3d_UIS_H ${Scenery3d_UIS})
4775+
4776+SET(extLinkerOption ${QT_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${OPENGL_LIBRARIES} )
4777+
4778+############### For building the static library ######################
4779+ADD_LIBRARY(Scenery3d-static STATIC ${Scenery3d_SRCS} ${Scenery3d_RES_CXX} ${Scenery3d_UIS_H} )
4780+QT5_USE_MODULES(Scenery3d-static Core Concurrent Gui Widgets)
4781+SET_TARGET_PROPERTIES(Scenery3d-static PROPERTIES OUTPUT_NAME "Scenery3d")
4782+TARGET_LINK_LIBRARIES(Scenery3d-static ${extLinkerOption})
4783+SET_TARGET_PROPERTIES(Scenery3d-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
4784+ADD_DEPENDENCIES(AllStaticPlugins Scenery3d-static)
4785+
4786+
4787
4788=== added file 'plugins/Scenery3d/src/Frustum.cpp'
4789--- plugins/Scenery3d/src/Frustum.cpp 1970-01-01 00:00:00 +0000
4790+++ plugins/Scenery3d/src/Frustum.cpp 2015-04-01 10:27:06 +0000
4791@@ -0,0 +1,262 @@
4792+#include "Frustum.hpp"
4793+#include "GLFuncs.hpp"
4794+#include <limits>
4795+
4796+Frustum::Frustum() : bbox(Vec3f(0),Vec3f(0)),drawBbox(Vec3f(0),Vec3f(0))
4797+{
4798+ for(unsigned int i=0; i<CORNERCOUNT; i++)
4799+ {
4800+ corners.push_back(Vec3f(0.0f, 0.0f, 0.0f));
4801+ drawCorners.push_back(Vec3f(0.0f, 0.0f, 0.0f));
4802+ }
4803+
4804+ for(unsigned int i=0; i<PLANECOUNT; i++)
4805+ {
4806+ planes.push_back(new Plane());
4807+ }
4808+
4809+ fov = 0.0f;
4810+ aspect = 0.0f;
4811+ zNear = 0.0f;
4812+ zFar = 0.0f;
4813+}
4814+
4815+Frustum::~Frustum()
4816+{
4817+ for(unsigned int i=0; i<planes.size(); i++)
4818+ {
4819+ delete planes[i];
4820+ }
4821+
4822+ planes.clear();
4823+}
4824+
4825+const Vec3f &Frustum::getCorner(Corner corner) const
4826+{
4827+ return corners[corner];
4828+}
4829+
4830+const Plane &Frustum::getPlane(FrustumPlane plane) const
4831+{
4832+ return *planes[plane];
4833+}
4834+
4835+void Frustum::calcFrustum(Vec3d p, Vec3d l, Vec3d u)
4836+{
4837+ Vec3d Y = -l;
4838+ Y.normalize();
4839+
4840+ Vec3d X = u^Y;
4841+ X.normalize();
4842+
4843+ Vec3d Z = Y^X;
4844+ Z.normalize();
4845+
4846+ float tang = tanf((static_cast<float>(M_PI)/360.0f)*fov);
4847+ float nh = zNear * tang;
4848+ float nw = nh * aspect;
4849+ float fh = zFar * tang;
4850+ float fw = fh * aspect;
4851+
4852+ Vec3d nc = p - Y*zNear;
4853+ Vec3d fc = p - Y*zFar;
4854+
4855+ Vec3d ntl = nc + Z * nh - X * nw;
4856+ Vec3d ntr = nc + Z * nh + X * nw;
4857+ Vec3d nbl = nc - Z * nh - X * nw;
4858+ Vec3d nbr = nc - Z * nh + X * nw;
4859+
4860+ Vec3d ftl = fc + Z * fh - X * fw;
4861+ Vec3d ftr = fc + Z * fh + X * fw;
4862+ Vec3d fbl = fc - Z * fh - X * fw;
4863+ Vec3d fbr = fc - Z * fh + X * fw;
4864+
4865+ corners[NTL] = ntl.toVec3f();
4866+ corners[NTR] = ntr.toVec3f();
4867+ corners[NBL] = nbl.toVec3f();
4868+ corners[NBR] = nbr.toVec3f();
4869+ corners[FTL] = ftl.toVec3f();
4870+ corners[FTR] = ftr.toVec3f();
4871+ corners[FBL] = fbl.toVec3f();
4872+ corners[FBR] = fbr.toVec3f();
4873+
4874+ planes[TOP]->setPoints(corners[NTR], corners[NTL], corners[FTL], SPolygon::CCW);
4875+ planes[BOTTOM]->setPoints(corners[NBL], corners[NBR], corners[FBR], SPolygon::CCW);
4876+ planes[LEFT]->setPoints(corners[NTL], corners[NBL], corners[FBL], SPolygon::CCW);
4877+ planes[RIGHT]->setPoints(corners[NBR], corners[NTR], corners[FBR], SPolygon::CCW);
4878+ planes[NEARP]->setPoints(corners[NTL], corners[NTR], corners[NBR], SPolygon::CCW);
4879+ planes[FARP]->setPoints(corners[FTR], corners[FTL], corners[FBL], SPolygon::CCW);
4880+
4881+
4882+ //reset bbox
4883+ bbox.min = Vec3f(std::numeric_limits<float>::max());
4884+ bbox.max = Vec3f(-std::numeric_limits<float>::max());
4885+
4886+ for(unsigned int i=0; i<CORNERCOUNT; i++)
4887+ {
4888+ Vec3f curVert = corners[i];
4889+ bbox.min = Vec3f(std::min(static_cast<float>(curVert[0]), bbox.min[0]),
4890+ std::min(static_cast<float>(curVert[1]), bbox.min[1]),
4891+ std::min(static_cast<float>(curVert[2]), bbox.min[2]));
4892+
4893+ bbox.max = Vec3f(std::max(static_cast<float>(curVert[0]), bbox.max[0]),
4894+ std::max(static_cast<float>(curVert[1]), bbox.max[1]),
4895+ std::max(static_cast<float>(curVert[2]), bbox.max[2]));
4896+ }
4897+}
4898+
4899+int Frustum::pointInFrustum(const Vec3f& p)
4900+{
4901+ int result = INSIDE;
4902+ for(int i=0; i<PLANECOUNT; i++)
4903+ {
4904+ if(planes[i]->isBehind(p))
4905+ {
4906+ return OUTSIDE;
4907+ }
4908+ }
4909+
4910+ return result;
4911+}
4912+
4913+int Frustum::boxInFrustum(const AABB& bbox)
4914+{
4915+ int result = INSIDE;
4916+ for(unsigned int i=0; i<PLANECOUNT; i++)
4917+ {
4918+ if(planes[i]->isBehind(bbox.positiveVertex(planes[i]->normal)))
4919+ {
4920+ return OUTSIDE;
4921+ }
4922+ }
4923+
4924+ return result;
4925+}
4926+
4927+void Frustum::saveDrawingCorners()
4928+{
4929+ for(unsigned int i=0; i<CORNERCOUNT; i++)
4930+ drawCorners[i] = corners[i];
4931+
4932+ for(unsigned int i=0; i<PLANECOUNT; i++)
4933+ planes[i]->saveValues();
4934+
4935+ drawBbox = bbox;
4936+}
4937+
4938+void Frustum::resetCorners()
4939+{
4940+ for(unsigned int i=0; i<CORNERCOUNT; i++)
4941+ drawCorners[i] = Vec3f(0.0f, 0.0f, 0.0f);
4942+
4943+ for(unsigned int i=0; i<PLANECOUNT; i++)
4944+ planes[i]->resetValues();
4945+}
4946+
4947+void Frustum::drawFrustum() const
4948+{
4949+// Minimum to avoid trouble when building on pure OpenGL ES systems
4950+// Not sure about ANGLE!
4951+#if !defined(QT_OPENGL_ES_2)
4952+
4953+ Vec3f ntl = drawCorners[NTL];
4954+ Vec3f ntr = drawCorners[NTR];
4955+ Vec3f nbr = drawCorners[NBR];
4956+ Vec3f nbl = drawCorners[NBL];
4957+ Vec3f ftr = drawCorners[FTR];
4958+ Vec3f ftl = drawCorners[FTL];
4959+ Vec3f fbl = drawCorners[FBL];
4960+ Vec3f fbr = drawCorners[FBR];
4961+
4962+ glExtFuncs->glColor3f(0.0f, 0.0f, 1.0f);
4963+
4964+ glExtFuncs->glBegin(GL_LINE_LOOP);
4965+ //near plane
4966+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4967+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4968+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4969+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4970+ glExtFuncs->glEnd();
4971+
4972+ glExtFuncs->glBegin(GL_LINE_LOOP);
4973+ //far plane
4974+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4975+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4976+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4977+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4978+ glExtFuncs->glEnd();
4979+
4980+ glExtFuncs->glBegin(GL_LINE_LOOP);
4981+ //bottom plane
4982+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
4983+ glExtFuncs->glVertex3f(nbr.v[0],nbr.v[1],nbr.v[2]);
4984+ glExtFuncs->glVertex3f(fbr.v[0],fbr.v[1],fbr.v[2]);
4985+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
4986+ glExtFuncs->glEnd();
4987+
4988+ glExtFuncs->glBegin(GL_LINE_LOOP);
4989+ //top plane
4990+ glExtFuncs->glVertex3f(ntr.v[0],ntr.v[1],ntr.v[2]);
4991+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4992+ glExtFuncs->glVertex3f(ftl.v[0],ftl.v[1],ftl.v[2]);
4993+ glExtFuncs->glVertex3f(ftr.v[0],ftr.v[1],ftr.v[2]);
4994+ glExtFuncs->glEnd();
4995+
4996+ glExtFuncs->glBegin(GL_LINE_LOOP);
4997+ //left plane
4998+ glExtFuncs->glVertex3f(ntl.v[0],ntl.v[1],ntl.v[2]);
4999+ glExtFuncs->glVertex3f(nbl.v[0],nbl.v[1],nbl.v[2]);
5000+ glExtFuncs->glVertex3f(fbl.v[0],fbl.v[1],fbl.v[2]);
The diff has been truncated for viewing.