update jython to version 2.7.3b1

This commit is contained in:
wyq 2022-07-11 09:41:25 +08:00
parent 0f4812777d
commit 70b3237527
86 changed files with 95 additions and 21 deletions

View File

@ -1,13 +1,13 @@
<component name="libraryTable">
<library name="Maven: org.python:jython-standalone:2.7.2">
<library name="Maven: org.python:jython-standalone:2.7.3b1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.3b1/jython-standalone-2.7.3b1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.3b1/jython-standalone-2.7.3b1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.2/jython-standalone-2.7.2-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/org/python/jython-standalone/2.7.3b1/jython-standalone-2.7.3b1-sources.jar!/" />
</SOURCES>
</library>
</component>

Binary file not shown.

View File

@ -719,6 +719,22 @@ public class Plot3DGL extends Plot implements GLEventListener {
this.transform.setAspectType(this.aspectType);
}
/**
* Get z scale
* @return Z scale
*/
public float getZScale() {
return this.transform.getZScale();
}
/**
* Set z scale
* @param value Z scale
*/
public void setZScale(float value) {
this.transform.zScale = value;
}
/**
* Get x minimum
*
@ -1574,7 +1590,7 @@ public class Plot3DGL extends Plot implements GLEventListener {
gl.glVertex3f(xMax, yMax, zMin);
gl.glVertex3f(xMax, yMax, zMax);
gl.glVertex3f(xMin, yMax, zMax);
gl.glVertex3f(xMin, yMax, xMin);
gl.glVertex3f(xMin, yMax, zMin);
gl.glEnd();
}
}
@ -1614,7 +1630,7 @@ public class Plot3DGL extends Plot implements GLEventListener {
gl.glVertex3f(xMax, yMax, zMin);
gl.glVertex3f(xMax, yMax, zMax);
gl.glVertex3f(xMin, yMax, zMax);
gl.glVertex3f(xMin, yMax, xMin);
gl.glVertex3f(xMin, yMax, zMin);
gl.glEnd();
} else {
gl.glBegin(GL2.GL_LINE_STRIP);

View File

@ -14,6 +14,7 @@ public class Transform {
protected float xmin, xmax = 1.0f, ymin;
protected float ymax = 1.0f, zmin, zmax = 1.0f;
protected Matrix4f transformMatrix = new Matrix4f();
protected float zScale = 1.0f;
/**
* Constructor
@ -95,19 +96,50 @@ public class Transform {
}
}
if (this.zScale != 1) {
float zCenter = (this.zmax + this.zmin) / 2;
float zRange = zmax - zmin;
this.zmin = zCenter - zRange * 0.5f / zScale;
this.zmax = zCenter + zRange * 0.5f / zScale;
}
this.transformMatrix = new Matrix4f()
.translate((this.xmax + this.xmin) / 2, (this.ymax + this.ymin) / 2, (this.zmax + this.zmin) / 2)
.scale((this.xmax - this.xmin) / 2, (this.ymax - this.ymin) / 2, (this.zmax - this.zmin) / 2);
}
/**
* Get aspect type
* @return Aspect type
*/
public AspectType getAspectType() {
return this.aspectType;
}
/**
* Set aspect type
* @param value Aspect type
*/
public void setAspectType(AspectType value) {
this.aspectType = value;
}
/**
* Get z scale
* @return Z scale
*/
public float getZScale() {
return this.zScale;
}
/**
* Set z scale
* @param value Z scale
*/
public void setZScale(float value) {
this.zScale = value;
}
/**
* Get transform matrix
* @return Transform matrix
@ -116,9 +148,16 @@ public class Transform {
return this.transformMatrix;
}
/**
* Check whether this transform equals to another one
* @param other Other transform
* @return Equals or not
*/
public boolean equals(Transform other) {
if (this.aspectType != other.aspectType)
return false;
if (this.zScale != other.zScale)
return false;
if (this.xmin != other.xmin)
return false;
if (this.xmax != other.xmax)
@ -198,6 +237,7 @@ public class Transform {
public Object clone() {
Transform transform = new Transform(xmin, xmax, ymin, ymax, zmin, zmax);
transform.aspectType = this.aspectType;
transform.zScale = this.zScale;
return transform;
}

View File

@ -11,7 +11,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.3b1" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:rsyntaxtextarea:3.2.0" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:autocomplete:3.2.0" level="project" />
<orderEntry type="module" module-name="meteoinfo-ndarray" />

View File

@ -15,7 +15,7 @@
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>2.7.2</version>
<version>2.7.3b1</version>
</dependency>
<dependency>
<groupId>com.fifesoft</groupId>

View File

@ -131,7 +131,7 @@
<orderEntry type="library" name="Maven: org.jogamp.gluegen:gluegen-rt-natives-windows-i586:v2.4.0-rc4" level="project" />
<orderEntry type="library" name="Maven: org.joml:joml:1.10.4" level="project" />
<orderEntry type="module" module-name="meteoinfo-console" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.3b1" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:rsyntaxtextarea:3.2.0" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:autocomplete:3.2.0" level="project" />
<orderEntry type="module" module-name="meteoinfo-ndarray" />

View File

@ -1,30 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\map\topology">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\slice"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\volume"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart\legend"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\contour"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\grads"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\imshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\geoshow"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\topology"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml\classification"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml\regression"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow\geoshow_proj_merc_image.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\map\topology\split.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf\surf_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf\surf_spherical_harmonic_1.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow\geoshow_proj_merc_image.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\map\topology\split.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf\surf_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf\surf_spherical_harmonic_1.py"/>
</RecentFiles>
</File>
<Font>
@ -32,5 +34,5 @@
</Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/>
<Startup MainFormLocation="-7,0" MainFormSize="1469,819"/>
<Startup MainFormLocation="-7,0" MainFormSize="1378,779"/>
</MeteoInfo>

View File

@ -191,10 +191,26 @@ class Axes3DGL(Axes3D):
"""
Set pitch angle.
:param pitch: (*float*) Pitch angle
:param pitch: (*float*) Pitch angle.
"""
self._axes.setPitchAngle(pitch)
def get_zscale(self):
"""
Get z axis scale.
:return: (*float*) Z axis scale.
"""
return self._axes.getZScale()
def set_zscale(self, zscale):
"""
Set z axis scale.
:param zscale: (*float*) Z axis scale.
"""
self._axes.setZScale(zscale)
def set_background(self, color):
"""
Set background color.

View File

@ -122,7 +122,7 @@
<orderEntry type="library" name="Maven: org.jogamp.gluegen:gluegen-rt-natives-windows-i586:v2.4.0-rc4" level="project" />
<orderEntry type="library" name="Maven: org.joml:joml:1.10.4" level="project" />
<orderEntry type="module" module-name="meteoinfo-console" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.python:jython-standalone:2.7.3b1" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:rsyntaxtextarea:3.2.0" level="project" />
<orderEntry type="library" name="Maven: com.fifesoft:autocomplete:3.2.0" level="project" />
<orderEntry type="module" module-name="meteoinfo-ndarray" />