Version 04.12 "vollständiges Programm mit Fehlern"
This commit is contained in:
parent
505b58e8e8
commit
5f211026e4
21
.idea/workspace.xml
generated
21
.idea/workspace.xml
generated
@ -5,7 +5,8 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="4d75e996-cee4-4ec6-b802-5b56d0c0eac4" name="Changes" comment="Version 27.11 ("fertiger" Tracker)">
|
<list default="true" id="4d75e996-cee4-4ec6-b802-5b56d0c0eac4" name="Changes" comment="Version 27.11 ("fertiger" Tracker)">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/GameLoop.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GameLoop.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Main.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/Tracker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Tracker.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/Tracker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Tracker.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
@ -36,6 +37,7 @@
|
|||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Application.GTCar.executor": "Run",
|
"Application.GTCar.executor": "Run",
|
||||||
"Application.GraphicsProgram.executor": "Run",
|
"Application.GraphicsProgram.executor": "Run",
|
||||||
|
"Application.Main.executor": "Run",
|
||||||
"Application.Tracker.executor": "Run",
|
"Application.Tracker.executor": "Run",
|
||||||
"Downloaded.Files.Path.Enabled": "false",
|
"Downloaded.Files.Path.Enabled": "false",
|
||||||
"Repository.Attach.Annotations": "false",
|
"Repository.Attach.Annotations": "false",
|
||||||
@ -46,7 +48,7 @@
|
|||||||
"com.codeium.enabled": "true",
|
"com.codeium.enabled": "true",
|
||||||
"git-widget-placeholder": "master",
|
"git-widget-placeholder": "master",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "C:/Users/david/Documents/Uni/GTCar/opencv/build/java/opencv-4100.jar",
|
"last_opened_file_path": "C:/Users/david/Documents/Uni/GTCar/processing-4.3/core/library/core.jar",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
@ -58,7 +60,7 @@
|
|||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}]]></component>
|
||||||
<component name="RunManager">
|
<component name="RunManager" selected="Application.Main">
|
||||||
<configuration name="GTCar" type="Application" factoryName="Application">
|
<configuration name="GTCar" type="Application" factoryName="Application">
|
||||||
<option name="MAIN_CLASS_NAME" value="Tracker" />
|
<option name="MAIN_CLASS_NAME" value="Tracker" />
|
||||||
<module name="GTCar_V2_maven" />
|
<module name="GTCar_V2_maven" />
|
||||||
@ -67,6 +69,18 @@
|
|||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="Main" />
|
||||||
|
<module name="GTCar_V2_maven" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<recent_temporary>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Application.Main" />
|
||||||
|
</list>
|
||||||
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
@ -78,6 +92,7 @@
|
|||||||
<updated>1732108904989</updated>
|
<updated>1732108904989</updated>
|
||||||
<workItem from="1732108906083" duration="758000" />
|
<workItem from="1732108906083" duration="758000" />
|
||||||
<workItem from="1732113837570" duration="20534000" />
|
<workItem from="1732113837570" duration="20534000" />
|
||||||
|
<workItem from="1733327375447" duration="951000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="First Commit Test">
|
<task id="LOCAL-00001" summary="First Commit Test">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
|
@ -17,8 +17,8 @@ public class GameLoop {
|
|||||||
Player player2;
|
Player player2;
|
||||||
|
|
||||||
public GameLoop(){
|
public GameLoop(){
|
||||||
player1 = new Player(0, "ip", 9000);
|
player1 = new Player(0, "192.168.33.33", 9000);
|
||||||
player2 = new Player(1, "ip", 9000);
|
player2 = new Player(1, "192.168.33.44", 9000);
|
||||||
tracker = new Tracker();
|
tracker = new Tracker();
|
||||||
graphics = new GraphicsProgram();
|
graphics = new GraphicsProgram();
|
||||||
String[] args = {"GraphicsProgram"};
|
String[] args = {"GraphicsProgram"};
|
||||||
@ -69,15 +69,18 @@ public class GameLoop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<Point> track(){
|
private List<Point> track(){
|
||||||
Point p1 = tracker.getP1();
|
org.opencv.core.Point p1 = tracker.getP1();
|
||||||
Point p2 = tracker.getP2();
|
org.opencv.core.Point p2 = tracker.getP2();
|
||||||
|
|
||||||
player1.setKoords(p1.x, p1.y);
|
java.awt.Point p1Java = new java.awt.Point((int) p1.x, (int) p1.y);
|
||||||
player2.setKoords(p2.x, p2.y);
|
java.awt.Point p2Java = new java.awt.Point((int) p2.x, (int) p2.y);
|
||||||
|
|
||||||
|
player1.setKoords(p1Java.x, p1Java.y);
|
||||||
|
player2.setKoords(p2Java.x, p2Java.y);
|
||||||
|
|
||||||
List<Point> output = new ArrayList<>();
|
List<Point> output = new ArrayList<>();
|
||||||
output.set(0, p1);
|
output.set(0, p1Java);
|
||||||
output.add(p2);
|
output.set(1, p2Java);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
public static void main(String[] args){
|
||||||
|
GameLoop gl = new GameLoop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,14 @@ public class Tracker {
|
|||||||
return positions;
|
return positions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Point getP1(){
|
||||||
|
return currentPositionP1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point getP2(){
|
||||||
|
return currentPositionP2;
|
||||||
|
}
|
||||||
|
|
||||||
private void drawMarkers(Mat frame) {
|
private void drawMarkers(Mat frame) {
|
||||||
// Größe der Quadrate
|
// Größe der Quadrate
|
||||||
int size = 10;
|
int size = 10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user