lavavu 1.9.0__tar.gz → 1.9.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lavavu-1.9.0/lavavu.egg-info → lavavu-1.9.5}/PKG-INFO +14 -11
- {lavavu-1.9.0 → lavavu-1.9.5}/README.md +12 -10
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/control.py +18 -5
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/webview.html +1 -1
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/lavavu.py +17 -7
- {lavavu-1.9.0 → lavavu-1.9.5/lavavu.egg-info}/PKG-INFO +14 -11
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu.egg-info/SOURCES.txt +0 -6
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu.egg-info/requires.txt +1 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/requirements.txt +1 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/setup.py +9 -14
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Geometry.cpp +47 -11
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Geometry.h +8 -6
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Include.h +1 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/InteractiveViewer.cpp +4 -1
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Model.cpp +12 -1
- {lavavu-1.9.0 → lavavu-1.9.5}/src/TriSurfaces.cpp +4 -4
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Triangles.cpp +3 -2
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Util.cpp +3 -2
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Util.h +1 -1
- lavavu-1.9.5/src/version.cpp +2 -0
- lavavu-1.9.0/lavavu/html/LavaVu-amalgamated.js +0 -7241
- lavavu-1.9.0/lavavu/html/LavaVu.data +0 -3923
- lavavu-1.9.0/lavavu/html/LavaVu.html +0 -1296
- lavavu-1.9.0/lavavu/html/LavaVu.js +0 -6035
- lavavu-1.9.0/lavavu/html/LavaVu.wasm +0 -0
- lavavu-1.9.0/lavavu/html/emscripten.js +0 -184
- lavavu-1.9.0/src/version.cpp +0 -2
- {lavavu-1.9.0 → lavavu-1.9.5}/LICENSE.md +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/MANIFEST.in +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/Makefile +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/LavaVuPython.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/__init__.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/__main__.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/amalgamate.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/aserver.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/convert.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/dict.json +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/font.bin +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/LavaVu-amalgamated.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/OK-min.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/baseviewer.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/control.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/control.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/dat-gui-light-theme.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/dat.gui.min.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/draw.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/drawbox.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/emscripten-template.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/emscripten.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/favicon.ico +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/gl-matrix-min.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/gui.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/menu.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/server.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/stats.min.js +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/styles.css +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/html/webview-template.html +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/osmesa/LavaVuPython.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/osmesa/__init__.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/points.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/server.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/default.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/default.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/fontShader.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/fontShader.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/lineShader.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/lineShader.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/pointShader.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/pointShader.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/triShader.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/triShader.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/volumeShader.frag +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/shaders/volumeShader.vert +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/tracers.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu/vutils.py +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu.egg-info/dependency_links.txt +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu.egg-info/entry_points.txt +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/lavavu.egg-info/top_level.txt +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/pyproject.toml +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/setup.cfg +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/ApplicationInterface.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/ColourMap.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/ColourMap.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Colours.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Colours.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Contour.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Contour.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/DrawingObject.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/DrawingObject.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Extensions.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Extensions.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/FontLine.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/FontSans.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/GLUtils.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/GLUtils.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/GraphicsUtil.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/GraphicsUtil.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/InputInterface.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/IsoSurface.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/IsoSurface.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/LavaVu.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/LavaVu.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/LavaVuPython_wrap.cxx +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Lines.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/LinesSorted.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Links.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/CGLViewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/CGLViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/CocoaViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/CocoaViewer.mm +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/EGLViewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/EGLViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/GLFWViewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/GLFWViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/OSMesaViewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/OSMesaViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/X11Viewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/X11Viewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Main/main.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Model.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/OpenGLViewer.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/OpenGLViewer.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/OutputInterface.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Points.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/QuadSurfaces.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/RenderContext.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/RenderContext.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Session.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Session.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Shaders.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Shaders.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Shapes.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/TimeStep.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Tracers.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Vectors.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/VideoEncoder.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/VideoEncoder.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/View.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/View.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/ViewerApp.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/ViewerTypes.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/Volumes.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/base64.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/base64.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/fifo_map.hpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/jpeg/jpgd.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/jpeg/jpgd.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/jpeg/jpge.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/jpeg/jpge.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/json.hpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/linalg.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/miniz/miniz.c +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/miniz/miniz.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/png/lodepng.cpp +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/png/lodepng.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/sqlite3/sqlite3.c +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/sqlite3/sqlite3.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/stb_image_resize.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/tiny_obj_loader.h +0 -0
- {lavavu-1.9.0 → lavavu-1.9.5}/src/version.h +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lavavu
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.5
|
4
4
|
Summary: Python interface to LavaVu OpenGL 3D scientific visualisation utilities
|
5
5
|
Author-email: Owen Kaluza <owen@kaluza.id.au>
|
6
6
|
License: ### Licensing
|
@@ -215,6 +215,7 @@ License-File: LICENSE.md
|
|
215
215
|
Requires-Dist: numpy>=1.18
|
216
216
|
Requires-Dist: aiohttp
|
217
217
|
Requires-Dist: jupyter_server_proxy
|
218
|
+
Requires-Dist: matplotlib
|
218
219
|
Requires-Dist: numpy-quaternion
|
219
220
|
Dynamic: license-file
|
220
221
|
|
@@ -223,7 +224,7 @@ Dynamic: license-file
|
|
223
224
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
|
224
225
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
|
225
226
|
[](https://zenodo.org/badge/latestdoi/45163055)
|
226
|
-
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.
|
227
|
+
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.5)
|
227
228
|
|
228
229
|
A scientific visualisation tool with a python interface for fast and flexible visual analysis.
|
229
230
|
|
@@ -236,7 +237,7 @@ Prior development was funded by the Monash Immersive Visualisation Plaform at [M
|
|
236
237
|
|
237
238
|
The acronym stands for: lightweight, automatable visualisation and analysis viewing utility, but "lava" is also a reference to its primary application as a viewer for geophysical simulations. It was also chosen to be unique enough to find the repository with google.
|
238
239
|
|
239
|
-
The project started
|
240
|
+
The project started as a replacement rendering library for the gLucifer<sup>1</sup> framework, visualising geodynamics simulations. The new OpenGL visualisation code was re-implemented as a more general purpose visualisation tool. gLucifer continues as a set of sampling tools for Underworld simulations as part of the [Underworld2](https://github.com/underworldcode/underworld2/) code. LavaVu provides the rendering library for creating 2d and 3d visualisations to view this sampled data, inline within interactive Jupyter notebooks and offline through saved visualisation databases and images/movies.
|
240
241
|
|
241
242
|
As a standalone tool it is a scriptable 3D visualisation tool capable of producing publication quality high res images and video output from time varying data sets along with HTML5 3D visualisations in WebGL.
|
242
243
|
Rendering features include correctly and efficiently rendering large numbers of opaque and transparent points and surfaces and volume rendering by GPU ray-marching. There are also features for drawing vector fields and tracers (streamlines).
|
@@ -259,13 +260,10 @@ Development happens in the "master" branch with stable releases tagged, so if yo
|
|
259
260
|
It's now in the python package index, so you can install with *pip*:
|
260
261
|
|
261
262
|
```
|
262
|
-
pip install
|
263
|
+
python -m pip install lavavu
|
263
264
|
```
|
264
265
|
|
265
|
-
>
|
266
|
-
|
267
|
-
> Currently no binaries are provided and the installer needs to compile the library, so on Linux you may need some developer tools and headers first, eg: for Ubuntu:
|
268
|
-
`sudo apt install build-essential libgl1-mesa-dev libx11-dev zlib1g-dev`
|
266
|
+
> Currently binary wheels are provided for Linux x86_64, MacOS x86_64 and ARM64 and Windows x86_64.
|
269
267
|
|
270
268
|
To try it out:
|
271
269
|
|
@@ -282,7 +280,12 @@ Alternatively, clone this repository with *git* and build from source:
|
|
282
280
|
```
|
283
281
|
git clone https://github.com/lavavu/LavaVu
|
284
282
|
cd LavaVu
|
283
|
+
python -m pip install .
|
284
|
+
```
|
285
|
+
or
|
286
|
+
```
|
285
287
|
make -j4
|
288
|
+
|
286
289
|
```
|
287
290
|
|
288
291
|
If all goes well the viewer will be built, try running with:
|
@@ -291,14 +294,14 @@ If all goes well the viewer will be built, try running with:
|
|
291
294
|
### Dependencies ###
|
292
295
|
|
293
296
|
* OpenGL and Zlib, present on most systems, headers may need to be installed
|
294
|
-
* To use with python requires python
|
295
|
-
* For video output, requires: libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
297
|
+
* To use with python requires python 3.6+ and NumPy
|
298
|
+
* For video output, requires: PyAV or for built in encoding, libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
296
299
|
* To build the python interface from source requires swig (http://www.swig.org/)
|
297
300
|
|
298
301
|
### Who do I talk to? ###
|
299
302
|
|
300
303
|
* Report bugs/issues here on github: https://github.com/lavavu/LavaVu/issues
|
301
|
-
* Contact developer: Owen Kaluza (at)
|
304
|
+
* Contact developer: Owen Kaluza (at) anu.edu.au
|
302
305
|
|
303
306
|
For further documentation / examples, see the online documentation
|
304
307
|
* https://lavavu.github.io/Documentation
|
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
|
4
4
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
|
5
5
|
[](https://zenodo.org/badge/latestdoi/45163055)
|
6
|
-
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.
|
6
|
+
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.5)
|
7
7
|
|
8
8
|
A scientific visualisation tool with a python interface for fast and flexible visual analysis.
|
9
9
|
|
@@ -16,7 +16,7 @@ Prior development was funded by the Monash Immersive Visualisation Plaform at [M
|
|
16
16
|
|
17
17
|
The acronym stands for: lightweight, automatable visualisation and analysis viewing utility, but "lava" is also a reference to its primary application as a viewer for geophysical simulations. It was also chosen to be unique enough to find the repository with google.
|
18
18
|
|
19
|
-
The project started
|
19
|
+
The project started as a replacement rendering library for the gLucifer<sup>1</sup> framework, visualising geodynamics simulations. The new OpenGL visualisation code was re-implemented as a more general purpose visualisation tool. gLucifer continues as a set of sampling tools for Underworld simulations as part of the [Underworld2](https://github.com/underworldcode/underworld2/) code. LavaVu provides the rendering library for creating 2d and 3d visualisations to view this sampled data, inline within interactive Jupyter notebooks and offline through saved visualisation databases and images/movies.
|
20
20
|
|
21
21
|
As a standalone tool it is a scriptable 3D visualisation tool capable of producing publication quality high res images and video output from time varying data sets along with HTML5 3D visualisations in WebGL.
|
22
22
|
Rendering features include correctly and efficiently rendering large numbers of opaque and transparent points and surfaces and volume rendering by GPU ray-marching. There are also features for drawing vector fields and tracers (streamlines).
|
@@ -39,13 +39,10 @@ Development happens in the "master" branch with stable releases tagged, so if yo
|
|
39
39
|
It's now in the python package index, so you can install with *pip*:
|
40
40
|
|
41
41
|
```
|
42
|
-
pip install
|
42
|
+
python -m pip install lavavu
|
43
43
|
```
|
44
44
|
|
45
|
-
>
|
46
|
-
|
47
|
-
> Currently no binaries are provided and the installer needs to compile the library, so on Linux you may need some developer tools and headers first, eg: for Ubuntu:
|
48
|
-
`sudo apt install build-essential libgl1-mesa-dev libx11-dev zlib1g-dev`
|
45
|
+
> Currently binary wheels are provided for Linux x86_64, MacOS x86_64 and ARM64 and Windows x86_64.
|
49
46
|
|
50
47
|
To try it out:
|
51
48
|
|
@@ -62,7 +59,12 @@ Alternatively, clone this repository with *git* and build from source:
|
|
62
59
|
```
|
63
60
|
git clone https://github.com/lavavu/LavaVu
|
64
61
|
cd LavaVu
|
62
|
+
python -m pip install .
|
63
|
+
```
|
64
|
+
or
|
65
|
+
```
|
65
66
|
make -j4
|
67
|
+
|
66
68
|
```
|
67
69
|
|
68
70
|
If all goes well the viewer will be built, try running with:
|
@@ -71,14 +73,14 @@ If all goes well the viewer will be built, try running with:
|
|
71
73
|
### Dependencies ###
|
72
74
|
|
73
75
|
* OpenGL and Zlib, present on most systems, headers may need to be installed
|
74
|
-
* To use with python requires python
|
75
|
-
* For video output, requires: libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
76
|
+
* To use with python requires python 3.6+ and NumPy
|
77
|
+
* For video output, requires: PyAV or for built in encoding, libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
76
78
|
* To build the python interface from source requires swig (http://www.swig.org/)
|
77
79
|
|
78
80
|
### Who do I talk to? ###
|
79
81
|
|
80
82
|
* Report bugs/issues here on github: https://github.com/lavavu/LavaVu/issues
|
81
|
-
* Contact developer: Owen Kaluza (at)
|
83
|
+
* Contact developer: Owen Kaluza (at) anu.edu.au
|
82
84
|
|
83
85
|
For further documentation / examples, see the online documentation
|
84
86
|
* https://lavavu.github.io/Documentation
|
@@ -1689,13 +1689,26 @@ class _ControlFactory(object):
|
|
1689
1689
|
"""
|
1690
1690
|
if not is_notebook():
|
1691
1691
|
return
|
1692
|
-
|
1692
|
+
from IPython.display import display,HTML,Javascript
|
1693
|
+
display(Javascript(self.redisplay_call()))
|
1694
|
+
|
1695
|
+
def redisplay_call(self):
|
1696
|
+
"""Update the active viewer image if any
|
1697
|
+
Applies changes made in python to the viewer and forces a redisplay
|
1698
|
+
"""
|
1699
|
+
#Find matching viewer id, redisplay first match
|
1700
|
+
ids = self.active_viewers()
|
1701
|
+
return ';'.join('_wi["{0}"].redisplay()'.format(i) for i in ids)
|
1702
|
+
|
1703
|
+
def active_viewers(self):
|
1704
|
+
"""Return matching active viewer IDs
|
1705
|
+
"""
|
1706
|
+
#Find matching viewer ids, all that match
|
1707
|
+
ids = []
|
1693
1708
|
for idx,obj in enumerate(windows):
|
1694
1709
|
if obj == self._target():
|
1695
|
-
|
1696
|
-
|
1697
|
-
#display(Javascript('_wi["{0}"].redisplay();'.format(viewerid)))
|
1698
|
-
display(HTML('<script>_wi["{0}"].redisplay();</script>'.format(viewerid)))
|
1710
|
+
ids.append(winids[idx])
|
1711
|
+
return ids
|
1699
1712
|
|
1700
1713
|
def update(self):
|
1701
1714
|
"""Update the control values from current viewer data
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
<input id="fileinput" type="file" style="visibility:hidden" onchange="useFileInput(this)" />
|
29
29
|
|
30
|
-
<script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.
|
30
|
+
<script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.5/LavaVu-amalgamated.min.js"></script>
|
31
31
|
<!--script src="dat.gui.min.js"></script>
|
32
32
|
<script src="OK-min.js"></script>
|
33
33
|
|
@@ -53,6 +53,7 @@ import weakref
|
|
53
53
|
import asyncio
|
54
54
|
import quaternion as quat
|
55
55
|
import platform
|
56
|
+
import matplotlib
|
56
57
|
|
57
58
|
if sys.version_info[0] < 3:
|
58
59
|
print("Python 3 required. LavaVu no longer supports Python 2.7.")
|
@@ -610,12 +611,12 @@ class Object(dict):
|
|
610
611
|
return key in self.dict
|
611
612
|
|
612
613
|
def __repr__(self):
|
613
|
-
return
|
614
|
+
return self.__str__()
|
614
615
|
|
615
616
|
def __str__(self):
|
616
617
|
#Default string representation
|
617
618
|
self.parent._get() #Ensure in sync
|
618
|
-
return '{\n' + str('\n'.join([' %s=%s' % (k,json.dumps(v)) for k,v in self.dict.items()])) + '\n}
|
619
|
+
return '{\n' + str('\n'.join([' %s=%s' % (k,json.dumps(v)) for k,v in self.dict.items()])) + '\n}'
|
619
620
|
|
620
621
|
#Interface for setting filters
|
621
622
|
def include(self, *args, **kwargs):
|
@@ -1144,7 +1145,12 @@ class Object(dict):
|
|
1144
1145
|
#Re-arrange to array of [r,g,b,a] values
|
1145
1146
|
data = numpy.dstack((data[0],data[1],data[2]))
|
1146
1147
|
|
1147
|
-
|
1148
|
+
#Use the shape as dims for texture image data
|
1149
|
+
if len(data.shape) > 1:
|
1150
|
+
width, height = data.shape[1], data.shape[0]
|
1151
|
+
depth = 4 #4 channel RGBA
|
1152
|
+
|
1153
|
+
self._loadScalar(data, LavaVuPython.lucRGBAData, width, height, depth)
|
1148
1154
|
|
1149
1155
|
|
1150
1156
|
def luminance(self, data):
|
@@ -1271,6 +1277,8 @@ class Object(dict):
|
|
1271
1277
|
self.ref.colourMap = data.ref
|
1272
1278
|
data = None
|
1273
1279
|
else:
|
1280
|
+
if isinstance(data, matplotlib.colors.Colormap):
|
1281
|
+
data = matplotlib_cmap(data)
|
1274
1282
|
if data is None:
|
1275
1283
|
self.parent._get() #Ensure in sync
|
1276
1284
|
cmid = self["colourmap"]
|
@@ -2739,7 +2747,7 @@ class Viewer(dict):
|
|
2739
2747
|
|
2740
2748
|
"""
|
2741
2749
|
|
2742
|
-
def __init__(self, *args, resolution=None, binpath=None, context=
|
2750
|
+
def __init__(self, *args, resolution=None, binpath=None, context=None, port=8080, threads=False, **kwargs):
|
2743
2751
|
"""
|
2744
2752
|
Create and init viewer instance
|
2745
2753
|
|
@@ -2776,7 +2784,9 @@ class Viewer(dict):
|
|
2776
2784
|
self._collections = {}
|
2777
2785
|
self.validate = True #Property validation flag
|
2778
2786
|
self.recording = None
|
2779
|
-
self.context =
|
2787
|
+
self.context = context
|
2788
|
+
if self.context is None:
|
2789
|
+
self.context = os.environ.get('LV_CONTEXT', 'default')
|
2780
2790
|
|
2781
2791
|
#Exit handler to clean up threads
|
2782
2792
|
#(__del__ does not always seem to get called on termination)
|
@@ -4476,10 +4486,10 @@ class Viewer(dict):
|
|
4476
4486
|
for key in ["translate", "rotate", "xyzrotate", "fov", "focus"]:
|
4477
4487
|
if key in src:
|
4478
4488
|
dst[key] = copy.copy(src[key])
|
4479
|
-
#Round down arrays to max
|
4489
|
+
#Round down arrays to max 6 decimal places
|
4480
4490
|
try:
|
4481
4491
|
for r in range(len(dst[key])):
|
4482
|
-
dst[key][r] = round(dst[key][r],
|
4492
|
+
dst[key][r] = round(dst[key][r], 6)
|
4483
4493
|
except:
|
4484
4494
|
#Not a list/array
|
4485
4495
|
pass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: lavavu
|
3
|
-
Version: 1.9.
|
3
|
+
Version: 1.9.5
|
4
4
|
Summary: Python interface to LavaVu OpenGL 3D scientific visualisation utilities
|
5
5
|
Author-email: Owen Kaluza <owen@kaluza.id.au>
|
6
6
|
License: ### Licensing
|
@@ -215,6 +215,7 @@ License-File: LICENSE.md
|
|
215
215
|
Requires-Dist: numpy>=1.18
|
216
216
|
Requires-Dist: aiohttp
|
217
217
|
Requires-Dist: jupyter_server_proxy
|
218
|
+
Requires-Dist: matplotlib
|
218
219
|
Requires-Dist: numpy-quaternion
|
219
220
|
Dynamic: license-file
|
220
221
|
|
@@ -223,7 +224,7 @@ Dynamic: license-file
|
|
223
224
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
|
224
225
|
[](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
|
225
226
|
[](https://zenodo.org/badge/latestdoi/45163055)
|
226
|
-
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.
|
227
|
+
[](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.5)
|
227
228
|
|
228
229
|
A scientific visualisation tool with a python interface for fast and flexible visual analysis.
|
229
230
|
|
@@ -236,7 +237,7 @@ Prior development was funded by the Monash Immersive Visualisation Plaform at [M
|
|
236
237
|
|
237
238
|
The acronym stands for: lightweight, automatable visualisation and analysis viewing utility, but "lava" is also a reference to its primary application as a viewer for geophysical simulations. It was also chosen to be unique enough to find the repository with google.
|
238
239
|
|
239
|
-
The project started
|
240
|
+
The project started as a replacement rendering library for the gLucifer<sup>1</sup> framework, visualising geodynamics simulations. The new OpenGL visualisation code was re-implemented as a more general purpose visualisation tool. gLucifer continues as a set of sampling tools for Underworld simulations as part of the [Underworld2](https://github.com/underworldcode/underworld2/) code. LavaVu provides the rendering library for creating 2d and 3d visualisations to view this sampled data, inline within interactive Jupyter notebooks and offline through saved visualisation databases and images/movies.
|
240
241
|
|
241
242
|
As a standalone tool it is a scriptable 3D visualisation tool capable of producing publication quality high res images and video output from time varying data sets along with HTML5 3D visualisations in WebGL.
|
242
243
|
Rendering features include correctly and efficiently rendering large numbers of opaque and transparent points and surfaces and volume rendering by GPU ray-marching. There are also features for drawing vector fields and tracers (streamlines).
|
@@ -259,13 +260,10 @@ Development happens in the "master" branch with stable releases tagged, so if yo
|
|
259
260
|
It's now in the python package index, so you can install with *pip*:
|
260
261
|
|
261
262
|
```
|
262
|
-
pip install
|
263
|
+
python -m pip install lavavu
|
263
264
|
```
|
264
265
|
|
265
|
-
>
|
266
|
-
|
267
|
-
> Currently no binaries are provided and the installer needs to compile the library, so on Linux you may need some developer tools and headers first, eg: for Ubuntu:
|
268
|
-
`sudo apt install build-essential libgl1-mesa-dev libx11-dev zlib1g-dev`
|
266
|
+
> Currently binary wheels are provided for Linux x86_64, MacOS x86_64 and ARM64 and Windows x86_64.
|
269
267
|
|
270
268
|
To try it out:
|
271
269
|
|
@@ -282,7 +280,12 @@ Alternatively, clone this repository with *git* and build from source:
|
|
282
280
|
```
|
283
281
|
git clone https://github.com/lavavu/LavaVu
|
284
282
|
cd LavaVu
|
283
|
+
python -m pip install .
|
284
|
+
```
|
285
|
+
or
|
286
|
+
```
|
285
287
|
make -j4
|
288
|
+
|
286
289
|
```
|
287
290
|
|
288
291
|
If all goes well the viewer will be built, try running with:
|
@@ -291,14 +294,14 @@ If all goes well the viewer will be built, try running with:
|
|
291
294
|
### Dependencies ###
|
292
295
|
|
293
296
|
* OpenGL and Zlib, present on most systems, headers may need to be installed
|
294
|
-
* To use with python requires python
|
295
|
-
* For video output, requires: libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
297
|
+
* To use with python requires python 3.6+ and NumPy
|
298
|
+
* For video output, requires: PyAV or for built in encoding, libavcodec, libavformat, libavutil, libswscale (from FFmpeg / libav)
|
296
299
|
* To build the python interface from source requires swig (http://www.swig.org/)
|
297
300
|
|
298
301
|
### Who do I talk to? ###
|
299
302
|
|
300
303
|
* Report bugs/issues here on github: https://github.com/lavavu/LavaVu/issues
|
301
|
-
* Contact developer: Owen Kaluza (at)
|
304
|
+
* Contact developer: Owen Kaluza (at) anu.edu.au
|
302
305
|
|
303
306
|
For further documentation / examples, see the online documentation
|
304
307
|
* https://lavavu.github.io/Documentation
|
@@ -26,11 +26,6 @@ lavavu.egg-info/entry_points.txt
|
|
26
26
|
lavavu.egg-info/requires.txt
|
27
27
|
lavavu.egg-info/top_level.txt
|
28
28
|
lavavu/html/LavaVu-amalgamated.css
|
29
|
-
lavavu/html/LavaVu-amalgamated.js
|
30
|
-
lavavu/html/LavaVu.data
|
31
|
-
lavavu/html/LavaVu.html
|
32
|
-
lavavu/html/LavaVu.js
|
33
|
-
lavavu/html/LavaVu.wasm
|
34
29
|
lavavu/html/OK-min.js
|
35
30
|
lavavu/html/baseviewer.js
|
36
31
|
lavavu/html/control.css
|
@@ -41,7 +36,6 @@ lavavu/html/draw.js
|
|
41
36
|
lavavu/html/drawbox.js
|
42
37
|
lavavu/html/emscripten-template.js
|
43
38
|
lavavu/html/emscripten.css
|
44
|
-
lavavu/html/emscripten.js
|
45
39
|
lavavu/html/favicon.ico
|
46
40
|
lavavu/html/gl-matrix-min.js
|
47
41
|
lavavu/html/gui.css
|
@@ -19,7 +19,7 @@ import shutil
|
|
19
19
|
|
20
20
|
#Current version
|
21
21
|
#(must be of the form X.Y.Z to trigger wheel builds)
|
22
|
-
version = "1.9.
|
22
|
+
version = "1.9.5"
|
23
23
|
|
24
24
|
"""
|
25
25
|
To release a new verison:
|
@@ -383,19 +383,9 @@ if __name__ == "__main__":
|
|
383
383
|
#EGL and OSMesa are built as optional extra modules
|
384
384
|
'''
|
385
385
|
if find_library('OpenGL') and find_library('EGL') and check_libraries(['OpenGL', 'EGL'], ['GL/gl.h', 'EGL/egl.h']):
|
386
|
-
#EGL for offscreen OpenGL without X11/GLX - works only with NVidia currently
|
387
|
-
ex = Extension('lavavu.egl._LavaVuPython',
|
388
|
-
define_macros = defines + [('HAVE_EGL', '1')],
|
389
|
-
include_dirs = inc_dirs,
|
390
|
-
libraries = libs + ['OpenGL', 'EGL'],
|
391
|
-
library_dirs = lib_dirs,
|
392
|
-
runtime_library_dirs = rt_lib_dirs,
|
393
|
-
extra_compile_args = cflags,
|
394
|
-
extra_link_args = ldflags,
|
395
|
-
extra_objects=extra_objects,
|
396
|
-
sources = srcs)
|
397
|
-
extensions.append(ex)
|
398
386
|
''';
|
387
|
+
|
388
|
+
#OSMesa built as optional extra module
|
399
389
|
if find_library('OSMesa') and check_libraries(['OSMesa'], ['GL/osmesa.h']):
|
400
390
|
#OSMesa for software rendered offscreen OpenGL, build as additional extension
|
401
391
|
ex = Extension('lavavu.osmesa._LavaVuPython',
|
@@ -411,7 +401,12 @@ if __name__ == "__main__":
|
|
411
401
|
extensions.append(ex)
|
412
402
|
|
413
403
|
#Main extension - use X11 or GLFW
|
414
|
-
if ("
|
404
|
+
if ("LV_EGL" in os.environ and find_library('OpenGL') and find_library('EGL')
|
405
|
+
and check_libraries(['OpenGL', 'EGL'], ['GL/gl.h', 'EGL/egl.h'])):
|
406
|
+
#EGL for offscreen OpenGL without X11/GLX - works with NVidia and latest Mesa
|
407
|
+
defines += [('HAVE_EGL', '1')]
|
408
|
+
libs += ['OpenGL', 'EGL']
|
409
|
+
elif ("LV_GLFW" in os.environ and find_library('glfw')
|
415
410
|
and check_libraries(['glfw'], ['GLFW/glfw3.h'])):
|
416
411
|
#Use GLFW
|
417
412
|
defines += [('HAVE_GLFW', '1')]
|
@@ -1406,21 +1406,21 @@ void Geometry::setState(Geom_Ptr g)
|
|
1406
1406
|
std::string texfn = prop;
|
1407
1407
|
//Support multiple textures, load subsequent from custom props
|
1408
1408
|
//std::cout << label << " = " << prop << std::endl;
|
1409
|
-
//std::cout << "SEARCH LOCAL..." << std::endl;
|
1409
|
+
//std::cout << " SEARCH LOCAL..." << std::endl;
|
1410
1410
|
Texture_Ptr the_texture = nullptr;
|
1411
1411
|
if (draw->textures.find(label) == draw->textures.end() || draw->textures[label]->fn.full != texfn)
|
1412
1412
|
{
|
1413
1413
|
//Search in global textures
|
1414
|
-
//std::cout << "NOT FOUND, SEARCH SHARED..." << std::endl;
|
1414
|
+
//std::cout << " NOT FOUND, SEARCH SHARED..." << std::endl;
|
1415
1415
|
if (session.textures.find(label) != session.textures.end())
|
1416
1416
|
{
|
1417
|
-
//std::cout << "USING SHARED TEXTURE " << label << " : " << texfn << std::endl;
|
1417
|
+
//std::cout << " USING SHARED TEXTURE " << label << " : " << texfn << std::endl;
|
1418
1418
|
//Save a copy in draw->textures so hasTexture returns true
|
1419
1419
|
the_texture = draw->textures[label] = session.textures[label];
|
1420
1420
|
}
|
1421
1421
|
else if (FileExists(texfn))
|
1422
1422
|
{
|
1423
|
-
//std::cout << "NOT FOUND, CREATE/LOAD FROM FILE..." << std::endl;
|
1423
|
+
//std::cout << " NOT FOUND, CREATE/LOAD FROM FILE..." << std::endl;
|
1424
1424
|
//Add a new empty texture container
|
1425
1425
|
draw->textures[label] = std::make_shared<ImageLoader>();
|
1426
1426
|
//Default to the object flip setting
|
@@ -1434,13 +1434,13 @@ void Geometry::setState(Geom_Ptr g)
|
|
1434
1434
|
}
|
1435
1435
|
draw->textures[label]->flip = flip;
|
1436
1436
|
draw->textures[label]->fn = texfn;
|
1437
|
-
//std::cout << "LOADED ADDITIONAL TEX " << label << " : " << texfn << std::endl;
|
1437
|
+
//std::cout << " LOADED ADDITIONAL TEX " << label << " : " << texfn << std::endl;
|
1438
1438
|
the_texture = draw->textures[label];
|
1439
1439
|
}
|
1440
1440
|
}
|
1441
1441
|
else
|
1442
1442
|
{
|
1443
|
-
//std::cout << "FOUND LOCAL." << std::endl;
|
1443
|
+
//std::cout << " FOUND LOCAL." << std::endl;
|
1444
1444
|
the_texture = draw->textures[label];
|
1445
1445
|
}
|
1446
1446
|
|
@@ -1464,10 +1464,18 @@ void Geometry::setState(Geom_Ptr g)
|
|
1464
1464
|
//printf("Texture unit set %d \n", texture_data->unit);
|
1465
1465
|
}
|
1466
1466
|
else
|
1467
|
-
|
1467
|
+
{
|
1468
|
+
//This is fine if texture not set or is empty string
|
1469
|
+
//std::cout << "Texture load failed, data is NULL! " << label << " = " << prop << std::endl;
|
1470
|
+
prog->setUniformi(label, 1024); //Dummy unit
|
1471
|
+
}
|
1468
1472
|
}
|
1469
1473
|
else
|
1470
|
-
|
1474
|
+
{
|
1475
|
+
//This is fine if texture not set or is empty string
|
1476
|
+
//std::cout << "Texture load failed, not found. " << label << " = " << prop << std::endl;
|
1477
|
+
prog->setUniformi(label, 1024); //Dummy unit
|
1478
|
+
}
|
1471
1479
|
}
|
1472
1480
|
else if (!prop.is_null())
|
1473
1481
|
{
|
@@ -1865,7 +1873,26 @@ void Geometry::display(bool refresh)
|
|
1865
1873
|
{
|
1866
1874
|
geom[index]->opaque = true;
|
1867
1875
|
}
|
1876
|
+
}
|
1868
1877
|
|
1878
|
+
//Load RGB/RGBA as texture
|
1879
|
+
if (geom[index]->texwidth && geom[index]->texheight)
|
1880
|
+
{
|
1881
|
+
//printf("TEX %d x %d RGB %d COLOURS %d TEXTURE %d\n", geom[index]->texwidth, geom[index]->texheight, geom[index]->render->rgb.size(), geom[index]->render->colours.size(), geom[index]->hasTexture());
|
1882
|
+
//RGB as ubyte * 3
|
1883
|
+
if (geom[index]->texwidth * geom[index]->texheight == geom[index]->render->rgb.size() * 3)
|
1884
|
+
{
|
1885
|
+
//printf(" - LOADING RGB %d to TEXTURE %d x %d\n", geom[index]->render->rgb.size(), geom[index]->texwidth, geom[index]->texheight);
|
1886
|
+
geom[index]->texture->loadData(static_cast<GLubyte*>(geom[index]->render->rgb.ref()), geom[index]->texwidth, geom[index]->texheight, 3, false);
|
1887
|
+
}
|
1888
|
+
//RGBA as int32 (ubyte * 4)
|
1889
|
+
else if (geom[index]->texwidth * geom[index]->texheight == geom[index]->render->colours.size())
|
1890
|
+
{
|
1891
|
+
//printf(" - LOADING RGBA %d to TEXTURE %d x %d\n", geom[index]->render->colours.size(), geom[index]->texwidth, geom[index]->texheight);
|
1892
|
+
geom[index]->texture->loadData(static_cast<GLubyte*>(geom[index]->render->colours.ref()), geom[index]->texwidth, geom[index]->texheight, 4, false);
|
1893
|
+
//std::ofstream of("texout.png");
|
1894
|
+
//write_png(of, 4, geom[index]->texwidth, geom[index]->texheight, geom[index]->render->colours.ref());
|
1895
|
+
}
|
1869
1896
|
}
|
1870
1897
|
}
|
1871
1898
|
}
|
@@ -2173,9 +2200,18 @@ Geom_Ptr Geometry::read(DrawingObject* draw, unsigned int n, lucGeometryDataType
|
|
2173
2200
|
void Geometry::read(Geom_Ptr geomdata, unsigned int n, lucGeometryDataType dtype, const void* data, int width, int height, int depth)
|
2174
2201
|
{
|
2175
2202
|
//Set width & height if provided
|
2176
|
-
if (
|
2177
|
-
|
2178
|
-
|
2203
|
+
if (type != lucVolumeType && width && height && (dtype == lucRGBData || dtype == lucRGBAData))
|
2204
|
+
{
|
2205
|
+
//Set the texture width/height/depth
|
2206
|
+
geomdata->texwidth = width;
|
2207
|
+
geomdata->texheight = height;
|
2208
|
+
}
|
2209
|
+
else
|
2210
|
+
{
|
2211
|
+
if (width) geomdata->width = width;
|
2212
|
+
if (height) geomdata->height = height;
|
2213
|
+
if (depth) geomdata->depth = depth;
|
2214
|
+
}
|
2179
2215
|
|
2180
2216
|
//Read the data
|
2181
2217
|
if (n > 0)
|
@@ -313,11 +313,13 @@ public:
|
|
313
313
|
bool internal = false;
|
314
314
|
static std::string names[lucMaxType];
|
315
315
|
static std::string datalabels[lucMaxDataType+1];
|
316
|
-
DrawingObject* draw; //Parent drawing object
|
317
|
-
unsigned int width;
|
318
|
-
unsigned int height;
|
319
|
-
unsigned int depth;
|
320
|
-
|
316
|
+
DrawingObject* draw = NULL; //Parent drawing object
|
317
|
+
unsigned int width = 0;
|
318
|
+
unsigned int height = 0;
|
319
|
+
unsigned int depth = 0;
|
320
|
+
unsigned int texwidth = 0;
|
321
|
+
unsigned int texheight = 0;
|
322
|
+
bool opaque = false; //Flag for opaque geometry, render first, don't depth sort
|
321
323
|
Texture_Ptr texture; //Default texture
|
322
324
|
lucGeometryType type; //Holds the object type
|
323
325
|
int step = -1; //Holds the timestep
|
@@ -368,7 +370,7 @@ public:
|
|
368
370
|
}
|
369
371
|
|
370
372
|
GeomData(DrawingObject* draw, lucGeometryType type, int step=-1)
|
371
|
-
: draw(draw),
|
373
|
+
: draw(draw), type(type), step(step)
|
372
374
|
{
|
373
375
|
texture = std::make_shared<ImageLoader>(); //Add a new empty texture container
|
374
376
|
|
@@ -1822,7 +1822,10 @@ bool LavaVu::parseCommand(std::string cmd, bool gethelp)
|
|
1822
1822
|
return false;
|
1823
1823
|
}
|
1824
1824
|
|
1825
|
-
|
1825
|
+
if (amodel->timesteps.size() > 1)
|
1826
|
+
session.timesteps[session.now]->properties.data["title"] = parsed.getall("title", 0);
|
1827
|
+
else
|
1828
|
+
aview->properties.data["title"] = parsed.getall("title", 0);
|
1826
1829
|
}
|
1827
1830
|
else if (parsed.exists("rulers"))
|
1828
1831
|
{
|
@@ -2118,7 +2118,18 @@ void Model::writeGeometryRecord(Database& outdb, lucGeometryType type, lucGeomet
|
|
2118
2118
|
if (!std::isfinite(max[c])) max[c] = 0.0;
|
2119
2119
|
}
|
2120
2120
|
|
2121
|
-
|
2121
|
+
//Use texwidth/height if RGB/RGBA data
|
2122
|
+
int width = data->width;
|
2123
|
+
int height = data->height;
|
2124
|
+
int depth = data->depth;
|
2125
|
+
if (dtype == lucRGBData || dtype == lucRGBAData)
|
2126
|
+
{
|
2127
|
+
width = data->texwidth;
|
2128
|
+
height = data->texheight;
|
2129
|
+
depth = dtype == lucRGBData ? 3 : 4;
|
2130
|
+
}
|
2131
|
+
|
2132
|
+
snprintf(SQL, SQL_QUERY_MAX, "INSERT INTO geometry (object_id, timestep, rank, idx, type, data_type, size, count, width, minimum, maximum, dim_factor, units, minX, minY, minZ, maxX, maxY, maxZ, labels, data) VALUES (%d, %d, %d, %d, %d, %d, %d, %d, %d, %g, %g, %g, '%s', %g, %g, %g, %g, %g, %g, ?, ?)", objid, step, height, depth, type, dtype, block->unitsize(), block->size(), width, block->minimum, block->maximum, 0.0, block->label.c_str(), min[0], min[1], min[2], max[0], max[1], max[2]);
|
2122
2133
|
|
2123
2134
|
/* Prepare statement... */
|
2124
2135
|
if (sqlite3_prepare_v2(outdb.db, SQL, -1, &statement, NULL) != SQLITE_OK)
|
@@ -126,8 +126,8 @@ void TriSurfaces::loadMesh()
|
|
126
126
|
//Sort vertices vector with std::sort & custom compare sort( vec.begin(), vec.end() );
|
127
127
|
//Iterate, for duplicates replace indices with index of first
|
128
128
|
//Remove duplicate vertices Triangles stored as list of indices
|
129
|
-
unsigned int hasColours = geom[index]->colourCount();
|
130
|
-
bool vertColour = hasColours && (hasColours
|
129
|
+
unsigned int hasColours = geom[index]->hasTexture() ? 0 : geom[index]->colourCount();
|
130
|
+
bool vertColour = hasColours && (hasColours == geom[index]->count());
|
131
131
|
t1=tt=clock();
|
132
132
|
|
133
133
|
int triverts = 0;
|
@@ -312,8 +312,8 @@ void TriSurfaces::smoothMesh(int index, std::vector<Vertex> &verts, std::vector<
|
|
312
312
|
debug_print("Calculating normals for triangle surface %d size %d\n", index, geom[index]->render->vertices.size()/3);
|
313
313
|
//Vertex elimination currently only works for per-vertex colouring,
|
314
314
|
// if less colour values provided, must precalc own indices to skip this step
|
315
|
-
unsigned int hasColours = geom[index]->colourCount();
|
316
|
-
bool vertColour = (hasColours && hasColours
|
315
|
+
unsigned int hasColours = geom[index]->hasTexture() ? 0 : geom[index]->colourCount();
|
316
|
+
bool vertColour = (hasColours && hasColours == geom[index]->render->vertices.size()/3);
|
317
317
|
if (hasColours && !vertColour) debug_print("Not enough colour values for per-vertex normalisation %d < %d\n", hasColours, geom[index]->render->vertices.size()/3);
|
318
318
|
bool vnormals = geom[index]->draw->properties["vertexnormals"];
|
319
319
|
int anglemin = geom[index]->draw->properties["smoothangle"];
|