diff --git a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/ChartText3D.java b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/ChartText3D.java index 4610a50e..00ca02b2 100644 --- a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/ChartText3D.java +++ b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/ChartText3D.java @@ -23,7 +23,8 @@ import org.meteoinfo.geometry.shape.PointZ; */ public class ChartText3D extends ChartText { private double z; - private PointZ zdir = null; + private PointZ zdir = null; + private boolean draw3D = false; /** * Get z coordinate value @@ -89,6 +90,22 @@ public class ChartText3D extends ChartText { } this.setZDir(x1, y1, z1); } + + /** + * Get whether draw text at 3D location + * @return Boolean + */ + public boolean isDraw3D() { + return this.draw3D; + } + + /** + * Set whether draw text at 3D location + * @param value Boolean + */ + public void setDraw3D(boolean value) { + this.draw3D = value; + } /** * Set point diff --git a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/jogl/Plot3DGL.java b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/jogl/Plot3DGL.java index 540153df..42925c0a 100644 --- a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/jogl/Plot3DGL.java +++ b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/jogl/Plot3DGL.java @@ -1155,6 +1155,14 @@ public class Plot3DGL extends Plot implements GLEventListener { this.graphics.remove(this.graphics.size() - 1); } + /** + * Remove all graphics + */ + public void removeAllGraphics() { + this.graphics.clear(); + this.renderMap.clear(); + } + /** * Set auto extent */ @@ -1257,7 +1265,7 @@ public class Plot3DGL extends Plot implements GLEventListener { } //Draw text - for (int m = 0; m < this.graphics.getNumGraphics(); m++) { + /*for (int m = 0; m < this.graphics.getNumGraphics(); m++) { Graphic graphic = this.graphics.get(m); if (graphic.getNumGraphics() == 1) { Shape shape = graphic.getGraphicN(0).getShape(); @@ -1272,7 +1280,7 @@ public class Plot3DGL extends Plot implements GLEventListener { } } } - } + }*/ //Stop lighting if (this.lighting.isEnable()) { @@ -2363,6 +2371,37 @@ public class Plot3DGL extends Plot implements GLEventListener { return rect; } + Rectangle2D drawString3D(GL2 gl, ChartText3D text3D, float vx, float vy, float vz) { + return drawString3D(gl, text3D.getText(), text3D.getFont(), text3D.getColor(), vx, vy, vz); + } + + Rectangle2D drawString3D(GL2 gl, String str, Font font, Color color, float vx, float vy, float vz) { + //Get screen coordinates + Vector2f coord = this.toScreen(vx, vy, vz); + float x = coord.x; + float y = coord.y; + + //Rendering text string + TextRenderer textRenderer; + if (this.dpiScale == 1) { + textRenderer = new TextRenderer(font, true, true); + } else { + textRenderer = new TextRenderer(new Font(font.getFontName(), font.getStyle(), + (int)(font.getSize() * (1 + (this.dpiScale - 1) * 0.8))), true, true); + } + textRenderer.beginRendering(this.width, this.height, false); + //textRenderer.begin3DRendering(); + textRenderer.setColor(color); + textRenderer.setSmoothing(true); + Rectangle2D rect = textRenderer.getBounds(str.subSequence(0, str.length())); + textRenderer.draw3D(str, x, y, vz, 1.0f); + //textRenderer.draw3D(str, vx, vy, vz, 1.0f); + textRenderer.endRendering(); + //textRenderer.end3DRendering(); + + return rect; + } + void drawTitle() { if (title != null) { //Rendering text string @@ -2486,7 +2525,11 @@ public class Plot3DGL extends Plot implements GLEventListener { this.drawPoint(gl, graphic); break; case TEXT: - //this.drawText(gl, (ChartText3D) shape); + if (this.clipPlane) + this.disableClipPlane(gl); + this.drawText(gl, (ChartText3D) shape); + if (this.clipPlane) + this.enableClipPlane(gl); break; case POLYLINE: case POLYLINE_Z: @@ -2543,7 +2586,16 @@ public class Plot3DGL extends Plot implements GLEventListener { protected void drawText(GL2 gl, ChartText3D text) { Vector3f xyz = this.transform.transform((float) text.getX(), (float) text.getY(), (float) text.getZ()); - this.drawString(gl, text, xyz.x, xyz.y, xyz.z, text.getXAlign(), text.getYAlign()); + if (text.isDraw3D()) { + this.drawString3D(gl, text, xyz.x, xyz.y, xyz.z); + } else { + this.drawString(gl, text, xyz.x, xyz.y, xyz.z, text.getXAlign(), text.getYAlign()); + } + } + + protected void drawText3D(GL2 gl, ChartText3D text) { + Vector3f xyz = this.transform.transform((float) text.getX(), (float) text.getY(), (float) text.getZ()); + this.drawString3D(gl, text, xyz.x, xyz.y, xyz.z); } private void drawPoint(GL2 gl, Graphic graphic) { diff --git a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java index 3b22b6e1..93db9ed0 100644 --- a/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java +++ b/meteoinfo-chart/src/main/java/org/meteoinfo/chart/render/jogl/VolumeRender.java @@ -323,7 +323,7 @@ public class VolumeRender extends JOGLGraphicRender { gl.glBindTexture(GL_TEXTURE_3D, this.normalsTexture); } - gl.glDisable(GL_DEPTH_TEST); + //gl.glDisable(GL_DEPTH_TEST); gl.glDrawArrays(GL_TRIANGLES, 0, volume.getVertexNumber()); // Starting from vertex 0; 3 vertices total -> 1 triangle @@ -335,7 +335,7 @@ public class VolumeRender extends JOGLGraphicRender { gl.glBindTexture(GL_TEXTURE_3D, 0); //Program.destroyAllPrograms(gl); gl.glUseProgram(0); - gl.glEnable(GL_DEPTH_TEST); + //gl.glEnable(GL_DEPTH_TEST); } catch (Exception e) { e.printStackTrace(); } diff --git a/meteoinfo-chart/src/main/resources/shaders/volume/basic.frag b/meteoinfo-chart/src/main/resources/shaders/volume/basic.frag index f6e64067..bd2f0b84 100644 --- a/meteoinfo-chart/src/main/resources/shaders/volume/basic.frag +++ b/meteoinfo-chart/src/main/resources/shaders/volume/basic.frag @@ -5,6 +5,7 @@ #define mgl_FragColor gl_FragColor #endif +uniform mat4 MVP; uniform vec2 viewSize; uniform mat4 iV; uniform mat4 iP; @@ -16,91 +17,9 @@ uniform vec3 aabbMin; uniform vec3 aabbMax; uniform bool orthographic; - uniform float brightness; -struct Ray { - vec3 origin; - vec3 direction; - vec3 inv_direction; - int sign[3]; -}; - -Ray makeRay(vec3 origin, vec3 direction) { - vec3 inv_direction = vec3(1.0) / direction; - int sign[3]; - sign[0] = inv_direction.x < 0.0 ? 1 : 0; - sign[1] = inv_direction.y < 0.0 ? 1 : 0; - sign[2] = inv_direction.z < 0.0 ? 1 : 0; - - return Ray( - origin, - direction, - inv_direction, - sign - ); -} - -Ray createRayOrthographic(vec2 uv) -{ - float far = 5.0; - - // Transform the camera origin to world space - vec4 origin = iP * vec4(uv, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, far, 1.0); - // Transform the direction from camera to world space and normalize - image = iV* image; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -Ray createRayPerspective(vec2 uv) -{ - // Transform the camera origin to world space - vec4 origin = iP * vec4(0.0, 0.0, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, 1.0, 1.0); - // Transform the direction from camera to world space and normalize - image = iV * image; - image = image / image.w; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -void intersect( - in Ray ray, in vec3 aabb[2], - out float tmin, out float tmax -){ - float tymin, tymax, tzmin, tzmax; - tmin = (aabb[ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tmax = (aabb[1-ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tymin = (aabb[ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tymax = (aabb[1-ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tzmin = (aabb[ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tzmax = (aabb[1-ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tmin = max(max(tmin, tymin), tzmin); - tmax = min(min(tmax, tymax), tzmax); -} - -vec4 premultiplyAlpha(vec4 color) -{ - //return vec4(color.rgb * color.a, color.a); - return color * color.a; -} - -// GL_ONE_MINUS_DST_ALPHA, GL_ONE -void blendToBack(inout vec4 accum, vec4 color) -{ - //accum = color * color.a * (1-accum.a) + accum; - accum = premultiplyAlpha(color) * (1.0 - accum.a) + accum; -} +#include volumeBase.glsl void main(){ vec2 vUV = 2.0 * (gl_FragCoord.xy + vec2(0.5, 0.5)) / viewSize - 1.0; @@ -131,7 +50,7 @@ void main(){ float px = 0.0; vec4 pxColor = vec4(0.0, 0.0, 0.0, 0.0); vec3 texCo = vec3(0.0, 0.0, 0.0); - + float tt = tmin; for(int count = 0; count < sampleCount; count++){ texCo = mix(end, start, float(count) / float(sampleCount));// - originOffset; @@ -145,11 +64,19 @@ void main(){ //value = value + pxColor - pxColor * value.a; blendToBack(value, pxColor); - if(value.a >= 0.95){ - value.a = 1.0; + if (tt == tmin && pxColor.a > 0.01) { + tt = tmax - float(count)/float(sampleCount)*(tmax - tmin); + } + + if (value.a >= 0.95) { break; } } mgl_FragColor = value * brightness; + + gl_FragDepth = calculateDepth(ray.origin + ray.direction * tt); + if (value.a < 0.01) { + gl_FragDepth = 1.0; + } } \ No newline at end of file diff --git a/meteoinfo-chart/src/main/resources/shaders/volume/maxValue.frag b/meteoinfo-chart/src/main/resources/shaders/volume/maxValue.frag index 01365f96..aaa3a71a 100644 --- a/meteoinfo-chart/src/main/resources/shaders/volume/maxValue.frag +++ b/meteoinfo-chart/src/main/resources/shaders/volume/maxValue.frag @@ -5,6 +5,7 @@ #define mgl_FragColor gl_FragColor #endif +uniform mat4 MVP; uniform vec2 viewSize; uniform mat4 iV; uniform mat4 iP; @@ -19,75 +20,7 @@ uniform bool orthographic; uniform float brightness; -struct Ray { - vec3 origin; - vec3 direction; - vec3 inv_direction; - int sign[3]; -}; - -Ray makeRay(vec3 origin, vec3 direction) { - vec3 inv_direction = vec3(1.0) / direction; - int sign[3]; - sign[0] = inv_direction.x < 0.0 ? 1 : 0; - sign[1] = inv_direction.y < 0.0 ? 1 : 0; - sign[2] = inv_direction.z < 0.0 ? 1 : 0; - - return Ray( - origin, - direction, - inv_direction, - sign - ); -} - -Ray createRayOrthographic(vec2 uv) -{ - float far = 5.0; - - // Transform the camera origin to world space - vec4 origin = iP * vec4(uv, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, far, 1.0); - // Transform the direction from camera to world space and normalize - image = iV* image; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -Ray createRayPerspective(vec2 uv) -{ - // Transform the camera origin to world space - vec4 origin = iP * vec4(0.0, 0.0, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, 1.0, 1.0); - // Transform the direction from camera to world space and normalize - image = iV * image; - image = image / image.w; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -void intersect( - in Ray ray, in vec3 aabb[2], - out float tmin, out float tmax -){ - float tymin, tymax, tzmin, tzmax; - tmin = (aabb[ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tmax = (aabb[1-ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tymin = (aabb[ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tymax = (aabb[1-ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tzmin = (aabb[ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tzmax = (aabb[1-ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tmin = max(max(tmin, tymin), tzmin); - tmax = min(min(tmax, tymax), tzmax); -} +#include volumeBase.glsl void main(){ vec2 vUV = 2.0 * (gl_FragCoord.xy + vec2(0.5, 0.5)) / viewSize - 1.0; @@ -116,13 +49,20 @@ void main(){ float px = 0.0; vec4 pxColor = vec4(0.0, 0.0, 0.0, 0.0); vec3 texCo = vec3(0.0, 0.0, 0.0); - + float tt = tmin; + float px0 = 0.0; for(int count = 0; count < sampleCount; count++){ - texCo = mix(start, end, float(count)/float(sampleCount));// - originOffset; + texCo = mix(end, start, float(count)/float(sampleCount));// - originOffset; px = max(px, texture3D(tex, texCo).r); + if (px > px0) { + tt = tmax - float(count)/float(sampleCount)*(tmax - tmin); + } + + px0 = px; + if(px >= 0.99){ break; } @@ -130,4 +70,9 @@ void main(){ pxColor = texture2D(colorMap, vec2(px, 0.0)); mgl_FragColor = pxColor * brightness; + + gl_FragDepth = calculateDepth(ray.origin + ray.direction * tt); + if (pxColor.a < 0.01) { + gl_FragDepth = 1.0; + } } \ No newline at end of file diff --git a/meteoinfo-chart/src/main/resources/shaders/volume/specular.frag b/meteoinfo-chart/src/main/resources/shaders/volume/specular.frag index 3c8c13b3..909e6597 100644 --- a/meteoinfo-chart/src/main/resources/shaders/volume/specular.frag +++ b/meteoinfo-chart/src/main/resources/shaders/volume/specular.frag @@ -5,6 +5,7 @@ #define mgl_FragColor gl_FragColor #endif +uniform mat4 MVP; uniform vec2 viewSize; uniform mat4 iV; uniform mat4 iP; @@ -20,94 +21,13 @@ uniform bool orthographic; uniform float brightness; +#include volumeBase.glsl + vec3 ambientLight = vec3(0.34, 0.32, 0.32); vec3 directionalLight = vec3(0.5, 0.5, 0.5); vec3 lightVector = normalize(vec3(-1.0, -1.0, 1.0)); vec3 specularColor = vec3(0.5, 0.5, 0.5); -struct Ray { - vec3 origin; - vec3 direction; - vec3 inv_direction; - int sign[3]; -}; - -Ray makeRay(vec3 origin, vec3 direction) { - vec3 inv_direction = vec3(1.0) / direction; - int sign[3]; - sign[0] = inv_direction.x < 0.0 ? 1 : 0; - sign[1] = inv_direction.y < 0.0 ? 1 : 0; - sign[2] = inv_direction.z < 0.0 ? 1 : 0; - - return Ray( - origin, - direction, - inv_direction, - sign - ); -} - -Ray createRayOrthographic(vec2 uv) -{ - float far = 5.0; - - // Transform the camera origin to world space - vec4 origin = iP * vec4(uv, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, far, 1.0); - // Transform the direction from camera to world space and normalize - image = iV* image; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -Ray createRayPerspective(vec2 uv) -{ - // Transform the camera origin to world space - vec4 origin = iP * vec4(0.0, 0.0, 0.0, 1.0); - origin = iV * origin; - origin = origin / origin.w; - - // Invert the perspective projection of the view-space position - vec4 image = iP * vec4(uv, 1.0, 1.0); - // Transform the direction from camera to world space and normalize - image = iV * image; - image = image / image.w; - vec4 direction = normalize(origin - image); - return makeRay(origin.xyz, direction.xyz); -} - -void intersect( - in Ray ray, in vec3 aabb[2], - out float tmin, out float tmax -){ - float tymin, tymax, tzmin, tzmax; - tmin = (aabb[ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tmax = (aabb[1-ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; - tymin = (aabb[ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tymax = (aabb[1-ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; - tzmin = (aabb[ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tzmax = (aabb[1-ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; - tmin = max(max(tmin, tymin), tzmin); - tmax = min(min(tmax, tymax), tzmax); -} - -vec4 premultiplyAlpha(vec4 color) -{ - //return vec4(color.rgb * color.a, color.a); - return color * color.a; -} - -// GL_ONE_MINUS_DST_ALPHA, GL_ONE -void blendToBack(inout vec4 accum, vec4 color) -{ - //accum = color * color.a * (1-accum.a) + accum; - accum = premultiplyAlpha(color) * (1.0 - accum.a) + accum; -} - void main(){ vec2 vUV = 2.0 * (gl_FragCoord.xy + vec2(0.5, 0.5)) / viewSize - 1.0; Ray ray; @@ -140,7 +60,7 @@ void main(){ vec3 texCo = vec3(0.0, 0.0, 0.0); vec3 normal = vec3(0.0, 0.0, 0.0); vec4 zero = vec4(0.0); - + float tt = tmin; for(int count = 0; count < sampleCount; count++){ texCo = mix(end, start, float(count)/float(sampleCount));// - originOffset; @@ -173,10 +93,19 @@ void main(){ //value = value + pxColor - pxColor*value.a; blendToBack(value, pxColor); + if (tt == tmin && pxColor.a > 0.01) { + tt = tmax - float(count)/float(sampleCount)*(tmax - tmin); + } + if(value.a >= 0.95){ break; } } mgl_FragColor = value * brightness; + + gl_FragDepth = calculateDepth(ray.origin + ray.direction * tt); + if (value.a < 0.01) { + gl_FragDepth = 1.0; + } } \ No newline at end of file diff --git a/meteoinfo-chart/src/main/resources/shaders/volume/volumeBase.glsl b/meteoinfo-chart/src/main/resources/shaders/volume/volumeBase.glsl new file mode 100644 index 00000000..ee1018b2 --- /dev/null +++ b/meteoinfo-chart/src/main/resources/shaders/volume/volumeBase.glsl @@ -0,0 +1,108 @@ + +struct Ray { + vec3 origin; + vec3 direction; + vec3 inv_direction; + int sign[3]; +}; + +Ray makeRay(vec3 origin, vec3 direction) { + vec3 inv_direction = vec3(1.0) / direction; + int sign[3]; + sign[0] = inv_direction.x < 0.0 ? 1 : 0; + sign[1] = inv_direction.y < 0.0 ? 1 : 0; + sign[2] = inv_direction.z < 0.0 ? 1 : 0; + + return Ray( + origin, + direction, + inv_direction, + sign + ); +} + +Ray createRay(vec2 uv) +{ + float far = 5.0; + + // Transform the camera origin to world space + vec4 origin = iP * vec4(uv, 0.0, 1.0); + origin = iV * origin; + origin = origin / origin.w; + + // Invert the perspective projection of the view-space position + vec4 image = iP * vec4(uv, far, 1.0); + // Transform the direction from camera to world space and normalize + image = iV* image; + vec4 direction = normalize(origin - image); + return makeRay(origin.xyz, direction.xyz); +} + +Ray createRayOrthographic(vec2 uv) +{ + float far = 5.0; + + // Transform the camera origin to world space + vec4 origin = iP * vec4(uv, 0.0, 1.0); + origin = iV * origin; + origin = origin / origin.w; + + // Invert the perspective projection of the view-space position + vec4 image = iP * vec4(uv, far, 1.0); + // Transform the direction from camera to world space and normalize + image = iV* image; + vec4 direction = normalize(origin - image); + return makeRay(origin.xyz, direction.xyz); +} + +Ray createRayPerspective(vec2 uv) +{ + // Transform the camera origin to world space + vec4 origin = iP * vec4(0.0, 0.0, 0.0, 1.0); + origin = iV * origin; + origin = origin / origin.w; + + // Invert the perspective projection of the view-space position + vec4 image = iP * vec4(uv, 1.0, 1.0); + // Transform the direction from camera to world space and normalize + image = iV * image; + image = image / image.w; + vec4 direction = normalize(origin - image); + return makeRay(origin.xyz, direction.xyz); +} + +void intersect( + in Ray ray, in vec3 aabb[2], + out float tmin, out float tmax +){ + float tymin, tymax, tzmin, tzmax; + tmin = (aabb[ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; + tmax = (aabb[1-ray.sign[0]].x - ray.origin.x) * ray.inv_direction.x; + tymin = (aabb[ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; + tymax = (aabb[1-ray.sign[1]].y - ray.origin.y) * ray.inv_direction.y; + tzmin = (aabb[ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; + tzmax = (aabb[1-ray.sign[2]].z - ray.origin.z) * ray.inv_direction.z; + tmin = max(max(tmin, tymin), tzmin); + tmax = min(min(tmax, tymax), tzmax); +} + +vec4 premultiplyAlpha(vec4 color) +{ + //return vec4(color.rgb * color.a, color.a); + return color * color.a; +} + +// GL_ONE_MINUS_DST_ALPHA, GL_ONE +void blendToBack(inout vec4 accum, vec4 color) +{ + //accum = color * color.a * (1-accum.a) + accum; + accum = premultiplyAlpha(color) * (1.0 - accum.a) + accum; +} + +float calculateDepth(vec3 pos) +{ + vec4 ndc = MVP * vec4(pos, 1.0); + ndc.xyz /= ndc.w; + return 0.5 * (gl_DepthRange.diff * ndc.z + (gl_DepthRange.near + gl_DepthRange.far)); + //return ndc.z * 0.5 + 0.5; +} diff --git a/meteoinfo-common/src/main/java/org/meteoinfo/common/util/GlobalUtil.java b/meteoinfo-common/src/main/java/org/meteoinfo/common/util/GlobalUtil.java index fb589285..fa57c9b9 100644 --- a/meteoinfo-common/src/main/java/org/meteoinfo/common/util/GlobalUtil.java +++ b/meteoinfo-common/src/main/java/org/meteoinfo/common/util/GlobalUtil.java @@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream; public static String getVersion(){ String version = GlobalUtil.class.getPackage().getImplementationVersion(); if (version == null || version.equals("")) { - version = "3.3.13"; + version = "3.3.14"; } return version; } diff --git a/meteoinfo-geometry/src/main/java/org/meteoinfo/geometry/graphic/GraphicCollection.java b/meteoinfo-geometry/src/main/java/org/meteoinfo/geometry/graphic/GraphicCollection.java index e30c2bea..903f300d 100644 --- a/meteoinfo-geometry/src/main/java/org/meteoinfo/geometry/graphic/GraphicCollection.java +++ b/meteoinfo-geometry/src/main/java/org/meteoinfo/geometry/graphic/GraphicCollection.java @@ -298,7 +298,7 @@ public class GraphicCollection extends Graphic implements Iterator { /** * Get graphic list size * - * @return Gaphic list size + * @return Graphic list size */ public int size() { return this.graphics.size(); diff --git a/meteoinfo-lab/milconfig.xml b/meteoinfo-lab/milconfig.xml index 58e1ce76..b5efbd6b 100644 --- a/meteoinfo-lab/milconfig.xml +++ b/meteoinfo-lab/milconfig.xml @@ -1,9 +1,6 @@ - - - - + @@ -16,17 +13,22 @@ + + + - - - + + + + - - - + + + + @@ -34,5 +36,5 @@
- + diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d$py.class b/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d$py.class index c7758e47..b0fe7dae 100644 Binary files a/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d$py.class and b/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d$py.class differ diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d.py b/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d.py index d1cd4dd8..a60fabbf 100644 --- a/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d.py +++ b/meteoinfo-lab/pylib/mipylib/plotlib/_axes3d.py @@ -1653,6 +1653,9 @@ class Axes3D(Axes): text.setZDir(zdir[0], zdir[1], zdir[2]) else: text.setZDir(zdir) + draw3D = kwargs.pop('draw3d', None) + if not draw3D is None: + text.setDraw3D(draw3D) if isinstance(x, np.NDArray): graphic = GraphicFactory.createTexts3D(x._array, y._array, z._array, s._array, text)