to version 3.5.1

This commit is contained in:
wyq 2022-12-30 16:23:42 +08:00
parent 78adc06e7a
commit ef92f093f2
21 changed files with 94 additions and 67 deletions

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -22,11 +22,11 @@ public class Lighting {
float[] diffuse; float[] diffuse;
float[] specular; float[] specular;
float[] position; float[] position;
float[] mat_ambient; float[] materialAmbient;
float[] mat_diffuse; float[] materialDiffuse;
float[] mat_specular; float[] materialSpecular;
float[] mat_emission; float[] materialEmission;
float mat_shininess; float materialShininess;
/** /**
* Constructor * Constructor
@ -50,11 +50,11 @@ public class Lighting {
this.position = new float[]{0.f, 0.f, 1.f, 0.f}; this.position = new float[]{0.f, 0.f, 1.f, 0.f};
else else
this.position = new float[]{1.f, 1.f, 2.f, 1.f}; this.position = new float[]{1.f, 1.f, 2.f, 1.f};
this.mat_ambient = new float[]{0.2f, 0.2f, 0.2f, 1.f}; this.materialAmbient = new float[]{0.2f, 0.2f, 0.2f, 1.f};
this.mat_diffuse = new float[]{0.8f, 0.8f, 0.8f, 1.f}; this.materialDiffuse = new float[]{0.8f, 0.8f, 0.8f, 1.f};
this.mat_specular = new float[]{ 0.0f, 0.0f, 0.0f, 1.0f }; this.materialSpecular = new float[]{ 0.0f, 0.0f, 0.0f, 1.0f };
this.mat_emission = new float[]{ 0.0f, 0.0f, 0.0f, 1.0f }; this.materialEmission = new float[]{ 0.0f, 0.0f, 0.0f, 1.0f };
this.mat_shininess = 50.0f; this.materialShininess = 50.0f;
} }
/** /**
@ -93,6 +93,15 @@ public class Lighting {
this.ambient = value; this.ambient = value;
} }
/**
* Set ambient
*
* @param value Ambient
*/
public void setAmbient(float value) {
this.ambient = new float[]{value, value, value, 1};
}
/** /**
* Set ambient * Set ambient
* *
@ -134,6 +143,15 @@ public class Lighting {
this.diffuse = value; this.diffuse = value;
} }
/**
* Get diffuse
*
* @param value Diffuse
*/
public void setDiffuse(float value) {
this.diffuse = new float[]{value, value, value, 1};
}
/** /**
* Set diffuse * Set diffuse
* *
@ -170,8 +188,8 @@ public class Lighting {
* Get material shininess * Get material shininess
* @return Material shininess * @return Material shininess
*/ */
public float getMat_shininess() { public float getMaterialShininess() {
return this.mat_shininess; return this.materialShininess;
} }
/** /**
@ -183,6 +201,15 @@ public class Lighting {
this.specular = value; this.specular = value;
} }
/**
* Set specular
*
* @param value Specular
*/
public void setSpecular(float value) {
this.specular = new float[]{value, value, value, 1};
}
/** /**
* Set specular * Set specular
* *
@ -242,8 +269,8 @@ public class Lighting {
* Set material ambient light * Set material ambient light
* @param value Material ambient light * @param value Material ambient light
*/ */
public void setMat_Ambient(float[] value) { public void setMaterialAmbient(float[] value) {
this.mat_ambient = value; this.materialAmbient = value;
} }
/** /**
@ -251,12 +278,12 @@ public class Lighting {
* *
* @param value Material ambient light * @param value Material ambient light
*/ */
public void setMat_Ambient(List value) { public void setMaterialAmbient(List value) {
if (value.size() < 4) { if (value.size() < 4) {
return; return;
} }
this.mat_ambient = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2), this.materialAmbient = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2),
(float) value.get(3)}; (float) value.get(3)};
} }
@ -264,16 +291,16 @@ public class Lighting {
* Set material ambient light * Set material ambient light
* @param value Material ambient light value * @param value Material ambient light value
*/ */
public void setMat_Ambient(float value) { public void setMaterialAmbient(float value) {
this.mat_ambient = new float[]{value, value, value, 1}; this.materialAmbient = new float[]{value, value, value, 1};
} }
/** /**
* Set material diffuse light * Set material diffuse light
* @param value Material diffuse light * @param value Material diffuse light
*/ */
public void setMat_Diffuse(float[] value) { public void setMaterialDiffuse(float[] value) {
this.mat_diffuse = value; this.materialDiffuse = value;
} }
/** /**
@ -281,12 +308,12 @@ public class Lighting {
* *
* @param value Material diffuse light * @param value Material diffuse light
*/ */
public void setMat_Diffuse(List value) { public void setMaterialDiffuse(List value) {
if (value.size() < 4) { if (value.size() < 4) {
return; return;
} }
this.mat_diffuse = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2), this.materialDiffuse = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2),
(float) value.get(3)}; (float) value.get(3)};
} }
@ -294,16 +321,16 @@ public class Lighting {
* Set material diffuse light * Set material diffuse light
* @param value Material diffuse light value * @param value Material diffuse light value
*/ */
public void setMat_Diffuse(float value) { public void setMaterialDiffuse(float value) {
this.mat_diffuse = new float[]{value, value, value, 1}; this.materialDiffuse = new float[]{value, value, value, 1};
} }
/** /**
* Set material specular light * Set material specular light
* @param value Material specular light * @param value Material specular light
*/ */
public void setMat_Specular(float[] value) { public void setMaterialSpecular(float[] value) {
this.mat_specular = value; this.materialSpecular = value;
} }
/** /**
@ -311,12 +338,12 @@ public class Lighting {
* *
* @param value Material specular light * @param value Material specular light
*/ */
public void setMat_Specular(List value) { public void setMaterialSpecular(List value) {
if (value.size() < 4) { if (value.size() < 4) {
return; return;
} }
this.mat_specular = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2), this.materialSpecular = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2),
(float) value.get(3)}; (float) value.get(3)};
} }
@ -324,16 +351,16 @@ public class Lighting {
* Set material specular light * Set material specular light
* @param value Material specular light * @param value Material specular light
*/ */
public void setMat_Specular(float value) { public void setMaterialSpecular(float value) {
this.mat_specular = new float[]{value, value, value, 1}; this.materialSpecular = new float[]{value, value, value, 1};
} }
/** /**
* Set material emission light * Set material emission light
* @param value Material emission light * @param value Material emission light
*/ */
public void setMat_Emission(float[] value) { public void setMaterialEmission(float[] value) {
this.mat_emission = value; this.materialEmission = value;
} }
/** /**
@ -341,12 +368,12 @@ public class Lighting {
* *
* @param value Material emission light * @param value Material emission light
*/ */
public void setMat_Emission(List value) { public void setMaterialEmission(List value) {
if (value.size() < 4) { if (value.size() < 4) {
return; return;
} }
this.mat_emission = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2), this.materialEmission = new float[]{(float) value.get(0), (float) value.get(1), (float) value.get(2),
(float) value.get(3)}; (float) value.get(3)};
} }
@ -354,16 +381,16 @@ public class Lighting {
* Set material emission light * Set material emission light
* @param value Material emission light value * @param value Material emission light value
*/ */
public void setMat_Emission(float value) { public void setMaterialEmission(float value) {
this.mat_emission = new float[]{value, value, value, 1}; this.materialEmission = new float[]{value, value, value, 1};
} }
/** /**
* Set material shininess * Set material shininess
* @param value Material shininess * @param value Material shininess
*/ */
public void setMat_Shininess(float value) { public void setMaterialShininess(float value) {
this.mat_shininess = value; this.materialShininess = value;
} }
/** /**
@ -395,10 +422,10 @@ public class Lighting {
//gl.glLightfv(this.light, GL2.GL_POSITION, position, 0); //gl.glLightfv(this.light, GL2.GL_POSITION, position, 0);
//Material //Material
gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT, mat_ambient, 0); gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT, materialAmbient, 0);
gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_DIFFUSE, mat_diffuse, 0); gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_DIFFUSE, materialDiffuse, 0);
gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_SPECULAR, mat_specular, 0); gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_SPECULAR, materialSpecular, 0);
gl.glMaterialf(GL2.GL_FRONT_AND_BACK, GL2.GL_SHININESS, mat_shininess); gl.glMaterialf(GL2.GL_FRONT_AND_BACK, GL2.GL_SHININESS, materialShininess);
} }
/** /**

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -67,7 +67,7 @@ import java.util.zip.ZipInputStream;
public static String getVersion(){ public static String getVersion(){
String version = GlobalUtil.class.getPackage().getImplementationVersion(); String version = GlobalUtil.class.getPackage().getImplementationVersion();
if (version == null || version.equals("")) { if (version == null || version.equals("")) {
version = "3.5"; version = "3.5.1";
} }
return version; return version;
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile"> <MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\common_math\special"> <Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\funny">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\topology"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\topology"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\LaSW"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\LaSW"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\LaSW\airship"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\LaSW\airship"/>
@ -12,10 +12,10 @@
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\others"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\others"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\special"/> <RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\special"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
</Path> </Path>
<File> <File>
<OpenedFiles> <OpenedFiles>
@ -34,5 +34,5 @@
</Font> </Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/> <LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/> <Figure DoubleBuffering="true"/>
<Startup MainFormLocation="-7,-7" MainFormSize="1293,685"/> <Startup MainFormLocation="-7,0" MainFormSize="1373,771"/>
</MeteoInfo> </MeteoInfo>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<artifactId>meteoinfo-lab</artifactId> <artifactId>meteoinfo-lab</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@ -295,19 +295,19 @@ class Axes3DGL(Axes3D):
lighting.setSpecular(specular) lighting.setSpecular(specular)
mat_ambient = kwargs.pop('mat_ambient', None) mat_ambient = kwargs.pop('mat_ambient', None)
if not mat_ambient is None: if not mat_ambient is None:
lighting.setMat_Ambient(mat_ambient) lighting.setMaterialAmbient(mat_ambient)
mat_diffuse = kwargs.pop('mat_diffuse', None) mat_diffuse = kwargs.pop('mat_diffuse', None)
if not mat_diffuse is None: if not mat_diffuse is None:
lighting.setMat_Diffuse(mat_diffuse) lighting.setMaterailDiffuse(mat_diffuse)
mat_specular = kwargs.pop('mat_specular', None) mat_specular = kwargs.pop('mat_specular', None)
if not mat_specular is None: if not mat_specular is None:
lighting.setMat_Specular(mat_specular) lighting.setMaterialSpecular(mat_specular)
mat_emission = kwargs.pop('mat_emission', None) mat_emission = kwargs.pop('mat_emission', None)
if not mat_emission is None: if not mat_emission is None:
lighting.setMat_Emission(mat_emission) lighting.setMaterialEmission(mat_emission)
mat_shininess = kwargs.pop('mat_shininess', None) mat_shininess = kwargs.pop('mat_shininess', None)
if not mat_shininess is None: if not mat_shininess is None:
lighting.setMat_Shininess(mat_shininess) lighting.setMaterialShininess(mat_shininess)
def set_material(self, mvalues): def set_material(self, mvalues):
""" """

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<artifactId>meteoinfo-map</artifactId> <artifactId>meteoinfo-map</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.meteothink</groupId> <groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId> <artifactId>MeteoInfo</artifactId>
<version>3.5</version> <version>3.6-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>