lavavu 1.9.7__tar.gz → 1.9.9__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.
Files changed (154) hide show
  1. {lavavu-1.9.7/lavavu.egg-info → lavavu-1.9.9}/PKG-INFO +2 -2
  2. {lavavu-1.9.7 → lavavu-1.9.9}/README.md +1 -1
  3. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/dict.json +11 -0
  4. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/webview.html +1 -1
  5. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/triShader.vert +4 -6
  6. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/tracers.py +19 -6
  7. {lavavu-1.9.7 → lavavu-1.9.9/lavavu.egg-info}/PKG-INFO +2 -2
  8. {lavavu-1.9.7 → lavavu-1.9.9}/setup.py +3 -2
  9. {lavavu-1.9.7 → lavavu-1.9.9}/src/Geometry.cpp +9 -4
  10. {lavavu-1.9.7 → lavavu-1.9.9}/src/GraphicsUtil.cpp +3 -3
  11. {lavavu-1.9.7 → lavavu-1.9.9}/src/Lines.cpp +2 -3
  12. {lavavu-1.9.7 → lavavu-1.9.9}/src/RenderContext.cpp +18 -0
  13. {lavavu-1.9.7 → lavavu-1.9.9}/src/RenderContext.h +1 -0
  14. lavavu-1.9.9/src/version.cpp +2 -0
  15. lavavu-1.9.7/src/version.cpp +0 -2
  16. {lavavu-1.9.7 → lavavu-1.9.9}/LICENSE.md +0 -0
  17. {lavavu-1.9.7 → lavavu-1.9.9}/MANIFEST.in +0 -0
  18. {lavavu-1.9.7 → lavavu-1.9.9}/Makefile +0 -0
  19. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/LavaVuPython.py +0 -0
  20. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/__init__.py +0 -0
  21. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/__main__.py +0 -0
  22. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/amalgamate.py +0 -0
  23. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/aserver.py +0 -0
  24. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/control.py +0 -0
  25. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/convert.py +0 -0
  26. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/font.bin +0 -0
  27. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/LavaVu-amalgamated.css +0 -0
  28. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/OK-min.js +0 -0
  29. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/baseviewer.js +0 -0
  30. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/control.css +0 -0
  31. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/control.js +0 -0
  32. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/dat-gui-light-theme.css +0 -0
  33. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/dat.gui.min.js +0 -0
  34. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/draw.js +0 -0
  35. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/drawbox.js +0 -0
  36. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/emscripten-template.js +0 -0
  37. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/emscripten.css +0 -0
  38. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/favicon.ico +0 -0
  39. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/gl-matrix-min.js +0 -0
  40. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/gui.css +0 -0
  41. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/menu.js +0 -0
  42. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/server.js +0 -0
  43. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/stats.min.js +0 -0
  44. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/styles.css +0 -0
  45. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/html/webview-template.html +0 -0
  46. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/lavavu.py +0 -0
  47. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/osmesa/LavaVuPython.py +0 -0
  48. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/osmesa/__init__.py +0 -0
  49. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/points.py +0 -0
  50. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/server.py +0 -0
  51. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/default.frag +0 -0
  52. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/default.vert +0 -0
  53. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/fontShader.frag +0 -0
  54. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/fontShader.vert +0 -0
  55. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/lineShader.frag +0 -0
  56. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/lineShader.vert +0 -0
  57. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/pointShader.frag +0 -0
  58. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/pointShader.vert +0 -0
  59. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/triShader.frag +0 -0
  60. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/volumeShader.frag +0 -0
  61. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/shaders/volumeShader.vert +0 -0
  62. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu/vutils.py +0 -0
  63. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu.egg-info/SOURCES.txt +0 -0
  64. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu.egg-info/dependency_links.txt +0 -0
  65. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu.egg-info/entry_points.txt +0 -0
  66. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu.egg-info/requires.txt +0 -0
  67. {lavavu-1.9.7 → lavavu-1.9.9}/lavavu.egg-info/top_level.txt +0 -0
  68. {lavavu-1.9.7 → lavavu-1.9.9}/pyproject.toml +0 -0
  69. {lavavu-1.9.7 → lavavu-1.9.9}/requirements.txt +0 -0
  70. {lavavu-1.9.7 → lavavu-1.9.9}/setup.cfg +0 -0
  71. {lavavu-1.9.7 → lavavu-1.9.9}/src/ApplicationInterface.h +0 -0
  72. {lavavu-1.9.7 → lavavu-1.9.9}/src/ColourMap.cpp +0 -0
  73. {lavavu-1.9.7 → lavavu-1.9.9}/src/ColourMap.h +0 -0
  74. {lavavu-1.9.7 → lavavu-1.9.9}/src/Colours.cpp +0 -0
  75. {lavavu-1.9.7 → lavavu-1.9.9}/src/Colours.h +0 -0
  76. {lavavu-1.9.7 → lavavu-1.9.9}/src/Contour.cpp +0 -0
  77. {lavavu-1.9.7 → lavavu-1.9.9}/src/Contour.h +0 -0
  78. {lavavu-1.9.7 → lavavu-1.9.9}/src/DrawingObject.cpp +0 -0
  79. {lavavu-1.9.7 → lavavu-1.9.9}/src/DrawingObject.h +0 -0
  80. {lavavu-1.9.7 → lavavu-1.9.9}/src/Extensions.cpp +0 -0
  81. {lavavu-1.9.7 → lavavu-1.9.9}/src/Extensions.h +0 -0
  82. {lavavu-1.9.7 → lavavu-1.9.9}/src/FontLine.h +0 -0
  83. {lavavu-1.9.7 → lavavu-1.9.9}/src/FontSans.h +0 -0
  84. {lavavu-1.9.7 → lavavu-1.9.9}/src/GLUtils.cpp +0 -0
  85. {lavavu-1.9.7 → lavavu-1.9.9}/src/GLUtils.h +0 -0
  86. {lavavu-1.9.7 → lavavu-1.9.9}/src/Geometry.h +0 -0
  87. {lavavu-1.9.7 → lavavu-1.9.9}/src/GraphicsUtil.h +0 -0
  88. {lavavu-1.9.7 → lavavu-1.9.9}/src/Include.h +0 -0
  89. {lavavu-1.9.7 → lavavu-1.9.9}/src/InputInterface.h +0 -0
  90. {lavavu-1.9.7 → lavavu-1.9.9}/src/InteractiveViewer.cpp +0 -0
  91. {lavavu-1.9.7 → lavavu-1.9.9}/src/IsoSurface.cpp +0 -0
  92. {lavavu-1.9.7 → lavavu-1.9.9}/src/IsoSurface.h +0 -0
  93. {lavavu-1.9.7 → lavavu-1.9.9}/src/LavaVu.cpp +0 -0
  94. {lavavu-1.9.7 → lavavu-1.9.9}/src/LavaVu.h +0 -0
  95. {lavavu-1.9.7 → lavavu-1.9.9}/src/LavaVuPython_wrap.cxx +0 -0
  96. {lavavu-1.9.7 → lavavu-1.9.9}/src/LinesSorted.cpp +0 -0
  97. {lavavu-1.9.7 → lavavu-1.9.9}/src/Links.cpp +0 -0
  98. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/CGLViewer.cpp +0 -0
  99. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/CGLViewer.h +0 -0
  100. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/CocoaViewer.h +0 -0
  101. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/CocoaViewer.mm +0 -0
  102. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/EGLViewer.cpp +0 -0
  103. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/EGLViewer.h +0 -0
  104. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/GLFWViewer.cpp +0 -0
  105. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/GLFWViewer.h +0 -0
  106. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/OSMesaViewer.cpp +0 -0
  107. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/OSMesaViewer.h +0 -0
  108. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/X11Viewer.cpp +0 -0
  109. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/X11Viewer.h +0 -0
  110. {lavavu-1.9.7 → lavavu-1.9.9}/src/Main/main.cpp +0 -0
  111. {lavavu-1.9.7 → lavavu-1.9.9}/src/Model.cpp +0 -0
  112. {lavavu-1.9.7 → lavavu-1.9.9}/src/Model.h +0 -0
  113. {lavavu-1.9.7 → lavavu-1.9.9}/src/OpenGLViewer.cpp +0 -0
  114. {lavavu-1.9.7 → lavavu-1.9.9}/src/OpenGLViewer.h +0 -0
  115. {lavavu-1.9.7 → lavavu-1.9.9}/src/OutputInterface.h +0 -0
  116. {lavavu-1.9.7 → lavavu-1.9.9}/src/Points.cpp +0 -0
  117. {lavavu-1.9.7 → lavavu-1.9.9}/src/QuadSurfaces.cpp +0 -0
  118. {lavavu-1.9.7 → lavavu-1.9.9}/src/Session.cpp +0 -0
  119. {lavavu-1.9.7 → lavavu-1.9.9}/src/Session.h +0 -0
  120. {lavavu-1.9.7 → lavavu-1.9.9}/src/Shaders.cpp +0 -0
  121. {lavavu-1.9.7 → lavavu-1.9.9}/src/Shaders.h +0 -0
  122. {lavavu-1.9.7 → lavavu-1.9.9}/src/Shapes.cpp +0 -0
  123. {lavavu-1.9.7 → lavavu-1.9.9}/src/TimeStep.h +0 -0
  124. {lavavu-1.9.7 → lavavu-1.9.9}/src/Tracers.cpp +0 -0
  125. {lavavu-1.9.7 → lavavu-1.9.9}/src/TriSurfaces.cpp +0 -0
  126. {lavavu-1.9.7 → lavavu-1.9.9}/src/Triangles.cpp +0 -0
  127. {lavavu-1.9.7 → lavavu-1.9.9}/src/Util.cpp +0 -0
  128. {lavavu-1.9.7 → lavavu-1.9.9}/src/Util.h +0 -0
  129. {lavavu-1.9.7 → lavavu-1.9.9}/src/Vectors.cpp +0 -0
  130. {lavavu-1.9.7 → lavavu-1.9.9}/src/VideoEncoder.cpp +0 -0
  131. {lavavu-1.9.7 → lavavu-1.9.9}/src/VideoEncoder.h +0 -0
  132. {lavavu-1.9.7 → lavavu-1.9.9}/src/View.cpp +0 -0
  133. {lavavu-1.9.7 → lavavu-1.9.9}/src/View.h +0 -0
  134. {lavavu-1.9.7 → lavavu-1.9.9}/src/ViewerApp.h +0 -0
  135. {lavavu-1.9.7 → lavavu-1.9.9}/src/ViewerTypes.h +0 -0
  136. {lavavu-1.9.7 → lavavu-1.9.9}/src/Volumes.cpp +0 -0
  137. {lavavu-1.9.7 → lavavu-1.9.9}/src/base64.cpp +0 -0
  138. {lavavu-1.9.7 → lavavu-1.9.9}/src/base64.h +0 -0
  139. {lavavu-1.9.7 → lavavu-1.9.9}/src/fifo_map.hpp +0 -0
  140. {lavavu-1.9.7 → lavavu-1.9.9}/src/jpeg/jpgd.cpp +0 -0
  141. {lavavu-1.9.7 → lavavu-1.9.9}/src/jpeg/jpgd.h +0 -0
  142. {lavavu-1.9.7 → lavavu-1.9.9}/src/jpeg/jpge.cpp +0 -0
  143. {lavavu-1.9.7 → lavavu-1.9.9}/src/jpeg/jpge.h +0 -0
  144. {lavavu-1.9.7 → lavavu-1.9.9}/src/json.hpp +0 -0
  145. {lavavu-1.9.7 → lavavu-1.9.9}/src/linalg.h +0 -0
  146. {lavavu-1.9.7 → lavavu-1.9.9}/src/miniz/miniz.c +0 -0
  147. {lavavu-1.9.7 → lavavu-1.9.9}/src/miniz/miniz.h +0 -0
  148. {lavavu-1.9.7 → lavavu-1.9.9}/src/png/lodepng.cpp +0 -0
  149. {lavavu-1.9.7 → lavavu-1.9.9}/src/png/lodepng.h +0 -0
  150. {lavavu-1.9.7 → lavavu-1.9.9}/src/sqlite3/sqlite3.c +0 -0
  151. {lavavu-1.9.7 → lavavu-1.9.9}/src/sqlite3/sqlite3.h +0 -0
  152. {lavavu-1.9.7 → lavavu-1.9.9}/src/stb_image_resize.h +0 -0
  153. {lavavu-1.9.7 → lavavu-1.9.9}/src/tiny_obj_loader.h +0 -0
  154. {lavavu-1.9.7 → lavavu-1.9.9}/src/version.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lavavu
3
- Version: 1.9.7
3
+ Version: 1.9.9
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
@@ -224,7 +224,7 @@ Dynamic: license-file
224
224
  [![Build Status](https://github.com/lavavu/LavaVu/workflows/Test/badge.svg)](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
225
225
  [![Deploy Status](https://github.com/lavavu/LavaVu/workflows/Deploy/badge.svg?branch=1.7.3)](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
226
226
  [![DOI](https://zenodo.org/badge/45163055.svg)](https://zenodo.org/badge/latestdoi/45163055)
227
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.7)
227
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.9)
228
228
 
229
229
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
230
230
 
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://github.com/lavavu/LavaVu/workflows/Test/badge.svg)](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
4
4
  [![Deploy Status](https://github.com/lavavu/LavaVu/workflows/Deploy/badge.svg?branch=1.7.3)](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
5
5
  [![DOI](https://zenodo.org/badge/45163055.svg)](https://zenodo.org/badge/latestdoi/45163055)
6
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.7)
6
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.9)
7
7
 
8
8
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
9
9
 
@@ -2147,6 +2147,17 @@
2147
2147
  false
2148
2148
  ]
2149
2149
  },
2150
+ "upscalelines": {
2151
+ "default": false,
2152
+ "target": "global",
2153
+ "type": "real",
2154
+ "desc": "Enable to scale lines with the viewport size.",
2155
+ "strict": true,
2156
+ "redraw": 0,
2157
+ "control": [
2158
+ true
2159
+ ]
2160
+ },
2150
2161
  "fps": {
2151
2162
  "default": false,
2152
2163
  "target": "global",
@@ -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.7/LavaVu-amalgamated.min.js"></script>
30
+ <script async src="https://cdn.jsdelivr.net/gh/lavavu/lavavu.github.io@1.9.9/LavaVu-amalgamated.min.js"></script>
31
31
  <!--script src="dat.gui.min.js"></script>
32
32
  <script src="OK-min.js"></script>
33
33
 
@@ -8,7 +8,6 @@ uniform mat4 uMVMatrix;
8
8
  uniform mat4 uPMatrix;
9
9
  uniform mat4 uNMatrix;
10
10
 
11
- uniform vec4 uColour;
12
11
  uniform vec4 uLightPos;
13
12
 
14
13
  out vec4 vColour;
@@ -26,11 +25,10 @@ void main(void)
26
25
 
27
26
  vNormal = normalize(mat3(uNMatrix) * aVertexNormal);
28
27
 
29
- if (uColour.a > 0.0)
30
- vColour = uColour;
31
- else
32
- vColour = aVertexColour;
33
-
28
+ //This shader only applies attribute colour
29
+ //uColour is set for other/custom shaders
30
+ //Note uOpacity is "alpha" prop, "oapcity" is passed via attrib
31
+ vColour = aVertexColour;
34
32
  vTexCoord = aVertexTexCoord;
35
33
  vFlatColour = vColour;
36
34
  vVertex = aVertexPosition;
@@ -24,7 +24,7 @@ def random_particles(count, lowerbound=[0,0,0], upperbound=[1,1,1], dims=3):
24
24
  return numpy.stack(p).T
25
25
 
26
26
  class Tracers():
27
- def __init__(self, grid, count=1000, lowerbound=None, upperbound=None, limit=None, age=4, respawn_chance=0.2, speed_multiply=1.0, height=0.0, viewer=None):
27
+ def __init__(self, grid, count=1000, lowerbound=None, upperbound=None, limit=None, age=4, respawn_chance=0.2, speed_multiply=1.0, height=0.0, label='', viewer=None):
28
28
  """
29
29
  Seed random particles into a vector field and trace their positions
30
30
 
@@ -52,6 +52,8 @@ class Tracers():
52
52
  Speed multiplier, scaling factor for the velocity taken from the vector values
53
53
  height : float
54
54
  A fixed height value, all positions will be given this height as their Z component
55
+ label : str
56
+ Name label prefix for the visualisation objects when plotting
55
57
  viewer : lavavu.Viewer
56
58
  Viewer object for plotting functions
57
59
  """
@@ -100,6 +102,7 @@ class Tracers():
100
102
  self.speed_multiply = speed_multiply
101
103
  self.height = height
102
104
 
105
+ self.label = label
103
106
  self.lv = viewer
104
107
  self.points = None
105
108
  self.arrows = None
@@ -157,8 +160,8 @@ class Tracers():
157
160
  self.speed[r] = 0.0
158
161
 
159
162
  if self.lv:
160
- positions = self.positions
161
- if self.dims == 2 and self.height != 0:
163
+ positions = self.get_positions()
164
+ if positions.shape[1] == 2 and self.height != 0:
162
165
  #Convert to 3d and set z coord to height
163
166
  shape = list(positions.shape)
164
167
  shape[-1] = 3
@@ -180,15 +183,25 @@ class Tracers():
180
183
  if len(self.tracers["colourmap"]):
181
184
  self.tracers.values(self.speed)
182
185
 
186
+ def get_positions(self):
187
+ """
188
+ This funcion can be overridden if positions need to be transformed
189
+ in any way before plotting, eg: plotting on spherical earth model
190
+ """
191
+ return self.positions
192
+
193
+ def prefix(self):
194
+ return self.label + '_' if len(self.label) else ''
195
+
183
196
  def plot_points(self, **kwargs):
184
197
  if self.lv is not None and self.points is None:
185
- self.points = self.lv.points('tracer_points', **kwargs)
198
+ self.points = self.lv.points(self.prefix() + 'tracer_points', **kwargs)
186
199
 
187
200
  def plot_arrows(self, **kwargs):
188
201
  if self.lv is not None and self.arrows is None:
189
- self.arrows = self.lv.vectors('tracer_arrows', **kwargs)
202
+ self.arrows = self.lv.vectors(self.prefix() + 'tracer_arrows', **kwargs)
190
203
 
191
204
  def plot_tracers(self, **kwargs):
192
205
  if self.lv is not None and self.tracers is None:
193
- self.tracers = self.lv.tracers('tracers', dims=self.count, limit=self.limit, **kwargs)
206
+ self.tracers = self.lv.tracers(self.prefix() + 'tracers', dims=self.count, limit=self.limit, **kwargs)
194
207
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lavavu
3
- Version: 1.9.7
3
+ Version: 1.9.9
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
@@ -224,7 +224,7 @@ Dynamic: license-file
224
224
  [![Build Status](https://github.com/lavavu/LavaVu/workflows/Test/badge.svg)](https://github.com/lavavu/LavaVu/actions?query=workflow:Test)
225
225
  [![Deploy Status](https://github.com/lavavu/LavaVu/workflows/Deploy/badge.svg?branch=1.7.3)](https://github.com/lavavu/LavaVu/actions?query=workflow:Deploy)
226
226
  [![DOI](https://zenodo.org/badge/45163055.svg)](https://zenodo.org/badge/latestdoi/45163055)
227
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.7)
227
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lavavu/LavaVu/1.9.9)
228
228
 
229
229
  A scientific visualisation tool with a python interface for fast and flexible visual analysis.
230
230
 
@@ -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.7"
22
+ version = "1.9.9"
23
23
 
24
24
  """
25
25
  To release a new verison:
@@ -386,7 +386,8 @@ if __name__ == "__main__":
386
386
  ''';
387
387
 
388
388
  #OSMesa built as optional extra module
389
- if find_library('OSMesa') and check_libraries(['OSMesa'], ['GL/osmesa.h']):
389
+ if ("LV_OSMESA" in os.environ and find_library('OSMesa')
390
+ and check_libraries(['OSMesa'], ['GL/osmesa.h'])):
390
391
  #OSMesa for software rendered offscreen OpenGL, build as additional extension
391
392
  ex = Extension('lavavu.osmesa._LavaVuPython',
392
393
  define_macros = defines + [('HAVE_OSMESA', '1')],
@@ -1357,10 +1357,8 @@ void Geometry::setState(Geom_Ptr g)
1357
1357
  }
1358
1358
 
1359
1359
  //Default line width
1360
- float lineWidth = (float)props["linewidth"] * session.context.scale2d; //Include 2d scale factor
1361
- if (session.context.core && lineWidth > 1.0) lineWidth = 1.0;
1362
- glLineWidth(lineWidth);
1363
- GL_Error_Check;
1360
+ float lineWidth = (float)props["linewidth"];
1361
+ session.context.setLineWidth(lineWidth, props["upscalelines"]);
1364
1362
 
1365
1363
  //Disable depth test by default for 2d lines, otherwise enable
1366
1364
  bool depthTestDefault = (view->is3d || type != lucLineType);
@@ -1493,6 +1491,13 @@ void Geometry::setState(Geom_Ptr g)
1493
1491
  bool allopaque = session.global("opaque");
1494
1492
  if (allopaque) opacity = 1.0;
1495
1493
  prog->setUniformf("uOpacity", opacity);
1494
+ if (props.has("colour") && !draw->colourMap && g->render->colours.size() == 0)
1495
+ prog->setUniform("uColour", draw->colour);
1496
+ else
1497
+ {
1498
+ Colour clear(0.0, 0.0, 0.0, 0.0);
1499
+ prog->setUniform("uColour", clear);
1500
+ }
1496
1501
  prog->setUniformi("uLighting", lighting);
1497
1502
  prog->setUniformf("uBrightness", props["brightness"]);
1498
1503
  prog->setUniformf("uContrast", props["contrast"]);
@@ -203,7 +203,10 @@ Colour FontManager::setFont(Properties& properties, float scaling, bool print3d)
203
203
  //Set font type
204
204
  //Hershey line font for very small text
205
205
  if (fonttype == "line" || fonttype == "small")
206
+ {
206
207
  charset = FONT_LINE;
208
+ context->setLineWidth(0.75, properties["upscalelines"]);
209
+ }
207
210
  //Mesh vector font is the default
208
211
  else
209
212
  charset = FONT_VECTOR;
@@ -280,9 +283,6 @@ void FontManager::printString(const char* str)
280
283
  else
281
284
  {
282
285
  //Line font
283
- float lineWidth = (context->scale2d - 0.5) * 1.5;
284
- if (context->core && lineWidth > 1.0) lineWidth = 1.0;
285
- glLineWidth(lineWidth);
286
286
  for (unsigned int c=0; c<strlen(str); c++)
287
287
  {
288
288
  //Render character
@@ -308,10 +308,9 @@ void Lines::draw()
308
308
  float scaling = props["scalelines"];
309
309
  //Don't apply object scaling to internal lines objects
310
310
  if (!internal) scaling *= (float)props["scaling"];
311
- float lineWidth = (float)props["linewidth"] * scaling * session.context.scale2d; //Include 2d scale factor
311
+ float lineWidth = (float)props["linewidth"] * scaling;
312
312
  if (lineWidth <= 0) lineWidth = scaling;
313
- if (session.context.core && lineWidth > 1.0) lineWidth = 1.0;
314
- glLineWidth(lineWidth);
313
+ session.context.setLineWidth(lineWidth, props["upscalelines"]);
315
314
 
316
315
  if (props["loop"])
317
316
  primitive = GL_LINE_LOOP;
@@ -157,3 +157,21 @@ mat4 RenderContext::ortho(float left, float right, float bottom, float top, floa
157
157
  return M;
158
158
  }
159
159
 
160
+ void RenderContext::setLineWidth(float lineWidth, bool upscale)
161
+ {
162
+ //Attempt to set line width, even in core profile
163
+ //Previously we prevented this but in some drivers it still works
164
+ GL_Error_Check
165
+ //if (core && lineWidth > 1.0) lineWidth = 1.0;
166
+ if (upscale)
167
+ lineWidth *= scale2d; //Include 2d scale factor
168
+ glLineWidth(lineWidth);
169
+ if (glGetError() == GL_INVALID_VALUE)
170
+ {
171
+ debug_print("WARNING: line width > 1.0 not supported in core profile (%f)\n", lineWidth);
172
+ glLineWidth(1.0);
173
+ }
174
+ GL_Error_Check
175
+ }
176
+
177
+
@@ -86,6 +86,7 @@ public:
86
86
  int project(float objx, float objy, float objz, float *windowCoordinate);
87
87
  int project(float x, float y, float z, int* viewport, float* windowCoordinate);
88
88
  mat4 ortho(float left, float right, float bottom, float top, float nearc, float farc);
89
+ void setLineWidth(float lineWidth, bool upscale);
89
90
  };
90
91
 
91
92
  #endif //RenderContext__
@@ -0,0 +1,2 @@
1
+ #include "version.h"
2
+ const std::string version = "1.9.9";
@@ -1,2 +0,0 @@
1
- #include "version.h"
2
- const std::string version = "1.9.7";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes