Skip to content

Commit

Permalink
Tweaks for HDDBSCAN support (#62)
Browse files Browse the repository at this point in the history
* Tweaks for HDDBSCAN support

* 3D Orbit support for Manifold3D objects

* Manifold 3D export support.

* fix copyright

* vendor com.clust4j

* No need for extraModuleInfo for commons-lang3

* fmt

* fmt clust4j

* clust4j junit4 -> junit5 migration

* small version adjustments

* ci adjustment

* fmt

* Fixed Pom to longer use license header plugin.

* HitShape3D destructible. Splitting logic functional based on convex centroid.

* PlayerShip can now rotate and fire independently from Camera transform. Fireball has distance based Time to Live.

* HitEventHandler now flashes points scored on hits.

* Fixed Skybox to use simple space textures.
New VidePane player with intro logic for projectilesystem.

* Added Thrust and flipCheck support for player

* FireBalls emitted from player now use player location as starting point.
Max thrust limiter logic added.

* WIP Alien ship can now be added to projectile system.
Animates with velocity but does not yet fire or collide with asteroids.
Endlessly flips at the moment, need to remove after flip like in original game.

* Empty Vision (mtyV) now broadcasting

* Aliens now fire stuff!

* Tracer Rounds implemented.
WIP MaterialModel

* Joystick controls connected to projectile system.

* Fixed Joystick layout to include Fire and Thrust Buttons.
Cleaned up visibility issues with ProjectionPane and ProjectileSystem mode.

* Fixed hittable flip check logic.
Updated ViewControlsMenu with back to work option.

* remove unrelated changes

* chore: fmt

---------

Co-authored-by: samypr100 <[email protected]>
  • Loading branch information
Birdasaur and samypr100 authored Jun 26, 2024
1 parent d2cdfd6 commit 3a8bb72
Show file tree
Hide file tree
Showing 292 changed files with 56,887 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .idea/runConfigurations/TrinityMainMaven.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dependencies {
}
implementation group: 'com.github.quickhull3d', name: 'quickhull3d', version: '1.0.0'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
implementation group: 'org.zeromq', name: 'jeromq', version: '0.6.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.17.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.17.0'
Expand All @@ -71,6 +72,7 @@ dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.12'

testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.junit.platform:junit-platform-suite:1.10.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ org.gradle.java.installations.auto-detect=true

# Project Build Properties
env=dev
javafx.version=21.0.2
javafx.version=21.0.3
javafx.static.version=21-ea+11.2
37 changes: 37 additions & 0 deletions nbactions-assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>clean</goal>
<goal>javafx:run</goal>
</goals>
<properties>
<exec.executable>java</exec.executable>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs}</exec.args>
<exec.mainClass>edu.jhuapl.trinity.TrinityMain</exec.mainClass>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>clean</goal>
<goal>javafx:run@debug</goal>
</goals>
<properties>
<skipTests>true</skipTests>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
<jpda.address>8000</jpda.address>
<exec.vmArgs>-Dprism.maxvram=2G</exec.vmArgs>
<exec.args>${exec.vmArgs} -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=8000 -classpath %classpath edu.jhuapl.trinity.App</exec.args>
</properties>
</action>
</actions>
53 changes: 18 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>21</java.version>
<javafx.version>21.0.2</javafx.version>
<javafx.version>21.0.3</javafx.version>
<javafx.static.version>21-ea+11.2</javafx.static.version>
<maven.min.version>3.6.3</maven.min.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand All @@ -40,19 +40,18 @@
<git.commit.maven.plugin.version>8.0.2</git.commit.maven.plugin.version>
<org.owasp.dependency-check-maven.plugin.version>9.0.10</org.owasp.dependency-check-maven.plugin.version>
<junit.jupiter.version>5.10.2</junit.jupiter.version>
<junit.jupiter.platform.version>1.10.2</junit.jupiter.platform.version>
<litfx.controls.version>0.1.3</litfx.controls.version>
<fxyz3d.version>0.6.0</fxyz3d.version>
<hansolo.charts.version>21.0.7</hansolo.charts.version>
<quickhull3d.version>1.0.0</quickhull3d.version>
<apache.commons.math3.version>3.6.1</apache.commons.math3.version>
<apache.commons.lang3.version>3.14.0</apache.commons.lang3.version>
<zeromq.jeromq.version>0.6.0</zeromq.jeromq.version>
<jackson.version>2.17.0</jackson.version>
<sarxos.webcam.capture.version>0.3.12</sarxos.webcam.capture.version>
<org.jflac.jflac-codec.version>1.5.2</org.jflac.jflac-codec.version>
<slf4j.version>2.0.12</slf4j.version>
<license.organizationName>The Johns Hopkins University Applied Physics Laboratory LLC</license.organizationName>
<license.licenceFile>LICENSE.md</license.licenceFile>
<license.licenseName>apache_v2</license.licenseName>
<mainClassName>edu.jhuapl.trinity.TrinityMain</mainClassName>
<!-- Values for build.properties -->
<trinity.title>Trinity</trinity.title>
Expand Down Expand Up @@ -96,14 +95,20 @@
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit.jupiter.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>${junit.jupiter.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -131,6 +136,11 @@
<artifactId>commons-math3</artifactId>
<version>${apache.commons.math3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache.commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>org.zeromq</groupId>
<artifactId>jeromq</artifactId>
Expand Down Expand Up @@ -266,33 +276,6 @@
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
<!-- Adding license header to file, and copying license into metadata -->
<!-- Currently only used Manually -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${codehaus.license.plugin.version}</version>
<configuration>
<licenseName>apache_v2</licenseName>
<canUpdateCopyright>false</canUpdateCopyright>
<canUpdateDescription>false</canUpdateDescription>
<roots>
<root>src/main/java</root>
<root>src/test/java</root>
</roots>
<excludes>
<exclude>**/*.json</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>update-file-header</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
Expand Down
77 changes: 77 additions & 0 deletions src/main/java/com/clust4j/Clust4j.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*******************************************************************************
* Copyright 2015, 2016 Taylor G Smith
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.clust4j;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

/**
* The absolute super type for all clust4j objects (models and datasets)
* that should be able to commonly serialize their data.
*
* @author Taylor G Smith
*/
public abstract class Clust4j implements java.io.Serializable {
private static final long serialVersionUID = -4522135376738501625L;

/**
* Load a model from a FileInputStream
*
* @param fos
* @return
* @throws IOException
* @throws ClassNotFoundException
*/
public static Clust4j loadObject(final FileInputStream fis) throws IOException, ClassNotFoundException {
ObjectInputStream in = null;
Clust4j bm = null;

try {
in = new ObjectInputStream(fis);
bm = (Clust4j) in.readObject();
} finally {
if (null != in)
in.close();

fis.close();
}

return bm;
}

/**
* Save a model to FileOutputStream
*
* @param fos
* @throws IOException
*/
public void saveObject(final FileOutputStream fos) throws IOException {
ObjectOutputStream out = null;

try {
out = new ObjectOutputStream(fos);
out.writeObject(this);
} finally {
if (null != out)
out.close();

fos.close();
}
}
}
Loading

0 comments on commit 3a8bb72

Please sign in to comment.