This commit is contained in:
Andrea Cavalli 2018-07-28 23:30:51 +02:00
commit 6cea02af81
16 changed files with 861 additions and 802 deletions

2
.gitignore vendored
View File

@ -5,6 +5,7 @@
# Package Files #
!/target/*.jar
!/libs/*.jar
*.war
*.jar
*.ear
@ -20,6 +21,7 @@ VBO_Example.java
/target/
!/target/*.jar
!libs/**/*.jar
/backups/
/Resources_and_Videos/

13
.idea/compiler.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="warppi-calculator" />
</profile>
</annotationProcessing>
</component>
</project>

6
.idea/encodings.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
</component>
</project>

14
.idea/misc.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

86
pom.xml
View File

@ -14,6 +14,7 @@
<src.dir>src/main/java</src.dir>
<src.dir2>src/main/java</src.dir2>
<src.resdir>src/main/resources</src.resdir>
<buildprops.exclude1>veryverylongandparticularpath/abcd</buildprops.exclude1>
</properties>
<repositories>
<repository>
@ -45,16 +46,29 @@
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>jarprofile</id>
<properties>
<src.dir>jar-specific</src.dir>
<src.resdir>src/main/rules</src.resdir>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<profile>
<id>aarch64</id>
<activation>
<!--<os>
<family>Linux</family>
<arch>aarch64</arch>
</os>-->
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<buildprops.exclude1>org/warp/picalculator/gui/graphicengine/gpu/*</buildprops.exclude1>
</properties>
</profile>
<profile>
<id>jarprofile</id>
<properties>
<src.dir>jar-specific</src.dir>
<src.resdir>src/main/rules</src.resdir>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.jogamp.jogl</groupId>
<artifactId>jogl-all-main</artifactId>
@ -65,27 +79,27 @@
<artifactId>gluegen-rt-main</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.6.1</version>
</dependency>
</dependencies>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.6.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Set a compiler level -->
@ -94,22 +108,22 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<excludes>
<exclude>org/warp/picalculator/gui/graphicengine/html/*</exclude>
</excludes>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<excludes>
<exclude>${buildprops.exclude1}</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profile>
<profile>
<id>jsprofile</id>
<properties>
<src.dir>js-specific</src.dir>
<src.dir2>src/main/rules</src.dir2>
<src.dir2>src/main/rules</src.dir2>
</properties>
<activation>
<activeByDefault>false</activeByDefault>

View File

@ -1,13 +1,18 @@
package org.warp.picalculator.deps;
import org.warp.picalculator.ClassUtils;
import org.warp.picalculator.StaticVars;
import org.warp.picalculator.gui.graphicengine.GraphicEngine;
import org.warp.picalculator.gui.graphicengine.cpu.CPUEngine;
import org.warp.picalculator.gui.graphicengine.framebuffer.FBEngine;
public class DEngine {
public static GraphicEngine newGPUEngine() {
return new org.warp.picalculator.gui.graphicengine.gpu.GPUEngine();
try {
return (GraphicEngine) ClassUtils.newClassInstance("org.warp.picalculator.gui.graphicengine.gpu.GPUEngine");
} catch (NullPointerException ex) {
return null;
}
}
public static GraphicEngine newHeadless24bitEngine() {
return new org.warp.picalculator.gui.graphicengine.headless24bit.Headless24bitEngine();

View File

@ -25,11 +25,10 @@ import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.io.IOUtils;
import org.warp.picalculator.ClassUtils;
import org.warp.picalculator.Main;
import com.jogamp.common.util.IOUtil;
public class StorageUtils {
public static final boolean exists(Path f) {
return Files.exists(f);
@ -77,7 +76,7 @@ public class StorageUtils {
tempFile.deleteOnExit();
try (FileOutputStream out = new FileOutputStream(tempFile))
{
IOUtil.copyStream2Stream(is, out, (int) tempFile.length());
IOUtils.copy(is, out, (int) tempFile.length());
}
resourcesCache.put(string, tempFile);

View File

@ -153,7 +153,7 @@ public class BigComplex {
* The branch is chosen such that the imaginary part of the result
* has the
* same sign as the imaginary part of this.
* @see Tim Ahrendt, <a href="http://dx.doi.org/10.1145/236869.236924">Fast
* @see Tim Ahrendt, <a href="https://doi.org/10.1145/236869.236924">Fast
* High-precision computation of complex square roots</a>,
* ISSAC 1996 p142-149.
* @since 2008-10-27

View File

@ -580,7 +580,7 @@ public class BigIntegerMath {
* @since 2009-08-06
* @author Richard J. Mathar
* @throws Error
* @see <a href="http://dx.doi.org/10.1080/01630568908816313">P. L. Butzer
* @see <a href="https://doi.org/10.1080/01630568908816313">P. L. Butzer
* et al, Num. Funct. Anal. Opt. 10 (5)( 1989) 419-488</a>
*/
static public Rational centrlFactNumt(int n, int k) throws Error {
@ -627,7 +627,7 @@ public class BigIntegerMath {
* @return T(n,k)
* @since 2009-08-06
* @author Richard J. Mathar
* @see <a href="http://dx.doi.org/10.1080/01630568908816313">P. L. Butzer
* @see <a href="https://doi.org/10.1080/01630568908816313">P. L. Butzer
* et al, Num. Funct. Anal. Opt. 10 (5)( 1989) 419-488</a>
*/
static public Rational centrlFactNumT(int n, int k) {

View File

@ -137,7 +137,7 @@ public class Wigner3j {
* separated. Only as many as announced by the m1 parameter are
* used; trailing numbers are ignored.
* @see A. Bar-Shalom and M. Klapisch,
* <a href="http://dx.doi.org/10.1016/0010-4655(88)90192-0">NJGRAF...
* <a href="https://doi.org/10.1016/0010-4655(88)90192-0">NJGRAF...
* </a>, Comp. Phys Comm. 50 (3) (1988) 375
* @since 2011-02-13
* @since 2012-02-15 Upgraded return value to BigSurdVec