Commit c67a5961 authored by Numanoglu's avatar Numanoglu
Browse files

Bring over AABB bht work (model + validation + healer tests) from cf200f0

parent 8536ec35
Pipeline #12312 failed with stage
in 1 minute and 41 seconds
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>${org.eclipse.m2e.log.console.threshold:-OFF}</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
</filter>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="workspace"/>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="">
<item key="org.eclipse.jdt.search.resultpage.limit" value="1000"/>
<item key="org.eclipse.jdt.search.resultpage.limit_enabled" value="TRUE"/>
</section>
<section name="org.eclipse.jdt.ui.JavaSearchResultPage">
<item key="org.eclipse.jdt.search.resultpage.limit" value="1000"/>
<item key="org.eclipse.jdt.search.resultpage.limit_enabled" value="TRUE"/>
<item key="org.eclipse.jdt.search.resultpage.grouping" value="4"/>
</section>
<section name="Search">
<list key="Search.processedPageIds">
<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
<item value="org.eclipse.mylyn.tasks.ui.search.page"/>
<item value="org.eclipse.egit.ui.commitSearchPage"/>
<item value="org.eclipse.jdt.ui.JavaSearchPage"/>
</list>
<list key="Search.enabledPageIds">
<item value="org.eclipse.search.internal.ui.text.TextSearchPage"/>
<item value="org.eclipse.mylyn.tasks.ui.search.page"/>
<item value="org.eclipse.egit.ui.commitSearchPage"/>
<item value="org.eclipse.jdt.ui.JavaSearchPage"/>
</list>
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
</section>
#Thu Jun 12 17:38:02 CEST 2025
0.Args=--login -i
0.Icon=C\:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico
0.Name=Git Bash
0.Path=C\:\\Program Files\\Git\\bin\\sh.exe
0.Translate=true
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="quick_assist_proposal_size">
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="CleanDialogSettings">
<item key="TOGGLE_SELECTED" value="false"/>
<item key="DIALOG_WIDTH" value="662"/>
<item key="DIALOG_HEIGHT" value="434"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
<item key="BUILD_NOW" value="true"/>
<item key="BUILD_ALL" value="true"/>
</section>
<section name="org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog">
<item key="ShowStatusLine" value="true"/>
<item key="History" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;History&gt;&#x0D;&#x0A;&lt;historyRootNode/&gt;&#x0D;&#x0A;&lt;/History&gt;"/>
<item key="ShowDerived" value="false"/>
<item key="FilterByLocation" value="false"/>
<item key="WorkingSet" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;workingSet workingSetName=&quot;&quot;/&gt;"/>
<section name="DialogBoundsSettings">
<item key="DIALOG_HEIGHT" value="500"/>
<item key="DIALOG_WIDTH" value="600"/>
<item key="DIALOG_X_ORIGIN" value="669"/>
<item key="DIALOG_Y_ORIGIN" value="191"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<state reopen="false"/>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<item key="hasShownOverlayPopupBefore" value="true"/>
<item key="replaceBarOpen" value="false"/>
<list key="searchhistory">
<item value="Polygon"/>
</list>
<section name="org.eclipse.ui.texteditor.FindReplaceDialog">
<item key="selection" value="error"/>
<item key="wrap" value="true"/>
<item key="casesensitive" value="false"/>
<item key="wholeword" value="false"/>
<item key="incremental" value="false"/>
<item key="isRegEx" value="false"/>
<list key="findhistory">
<item value="ERROR"/>
</list>
<list key="replacehistory">
</list>
</section>
<section name="org.eclipse.ui.texteditor.FindReplaceDialog_dialogBounds">
<item key="DIALOG_X_ORIGIN" value="762"/>
<item key="DIALOG_Y_ORIGIN" value="222"/>
<item key="DIALOG_WIDTH" value="414"/>
<item key="DIALOG_HEIGHT" value="454"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="ImportExportAction">
<item key="ImportExportPage.STORE_SELECTED_IMPORT_WIZARD_ID" value="org.eclipse.m2e.core.wizards.Maven2ImportWizard"/>
<list key="ImportExportPage.STORE_EXPANDED_IMPORT_CATEGORIES">
<item value="org.eclipse.m2e"/>
</list>
<section name="ImportExportWizard.dialogBounds">
</section>
</section>
<section name="WorkbenchPreferenceDialog.dialogBounds">
<item key="DIALOG_X_ORIGIN" value="9"/>
<item key="DIALOG_Y_ORIGIN" value="9"/>
<item key="DIALOG_WIDTH" value="1920"/>
<item key="DIALOG_HEIGHT" value="1030"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
<section name="org.eclipse.ui.internal.QuickAccess">
<item key="org.eclipse.ui.internal.quickaccess.QuickAccessDialogDIALOG_WIDTH" value="600"/>
<item key="org.eclipse.ui.internal.quickaccess.QuickAccessDialogDIALOG_HEIGHT" value="675"/>
<item key="org.eclipse.ui.internal.quickaccess.QuickAccessDialogDIALOG_USE_PERSISTED_SIZE" value="true"/>
<item key="org.eclipse.ui.internal.quickaccess.QuickAccessDialogDIALOG_USE_PERSISTED_LOCATION" value="false"/>
<list key="orderedElements">
<item value="/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/TestUtil.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundingBox.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Geometry.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Check.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/GmlElement.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/CheckableVisitor.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LinearRing.java"/>
<item value="org.eclipse.jdt.ui.preferences.JavaEditorColoringPreferencePage"/>
<item value="/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/checks/Checks.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/CheckError.java"/>
<item value="/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/BoundingBoxCalculator.java"/>
<item value="/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/ValidationConfiguration.java"/>
</list>
<list key="orderedProviders">
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.preferences"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
<item value="org.eclipse.ui.ide/org.eclipse.ui.internal.ide.dialogs.OpenResourceQuickAccessComputer"/>
</list>
<list key="textEntries">
<item value="2"/>
<item value="1"/>
<item value="2"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
<item value="1"/>
</list>
<list key="textArray">
<item value="testut"/>
<item value="test"/>
<item value="boun"/>
<item value="geo"/>
<item value="geometr"/>
<item value="check"/>
<item value="gml"/>
<item value="checkablevisitor"/>
<item value="linea"/>
<item value="semantic"/>
<item value="checks"/>
<item value="checkerror"/>
<item value="boundingbox"/>
<item value="validat"/>
</list>
</section>
<section name="org.eclipse.ui.preferences.keysPreferencePage">
<item key="actionSetFilter" value="true"/>
<item key="internalFilter" value="true"/>
<item key="uncategorizedFilter" value="true"/>
</section>
<section name="NewWizardAction">
<section name="NewWizard.dialogBounds">
<item key="DIALOG_X_ORIGIN" value="619"/>
<item key="DIALOG_Y_ORIGIN" value="199"/>
<item key="DIALOG_WIDTH" value="700"/>
<item key="DIALOG_HEIGHT" value="500"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-15|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
</section>
</section>
<?xml version="1.0" encoding="UTF-8"?>
<workingSetManager>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1749742020580_0" label="Java Main Sources" name="Java Main Sources"/>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1749742020612_1" label="Java Test Sources" name="Java Test Sources"/>
<workingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1749742100570_3" label="CityDoctorParent" name="CityDoctorParent">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorParent" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorModel" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorValidation" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorEdge" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorCheckResult" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorGUI" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorAutoPro" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorHealer" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorHealerGenetic" type="4"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/CityDoctorHealerGUI" type="4"/>
</workingSet>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1749742023343_2" label="Window Working Set" name="Aggregate for window 1749742023342"/>
</workingSetManager>
\ No newline at end of file
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<system systemId="http://maven.apache.org/maven-v4_0_0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/maven-4.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/maven-4.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/maven-4.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.1.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.1.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.2.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.2.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/toolchains-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/toolchains-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/toolchains-1.1.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/toolchains-1.1.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/profiles-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/profiles-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-catalog-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-descriptor-1.0.0.xsd"/>
</catalog>
\ No newline at end of file
#
#Thu Jun 12 17:28:33 CEST 2025
task-tag-projects-already-scanned=CityDoctorEdge,CityDoctorParent,CityDoctorHealer,CityDoctorModel,CityDoctorHealerGUI,CityDoctorGUI,CityDoctorHealerGenetic,CityDoctorCheckResult,CityDoctorValidation,CityDoctorAutoPro
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<nextCatalog catalog="user_catalog.xml" id="user_catalog"/>
<nextCatalog catalog="system_catalog.xml" id="system_catalog"/>
</catalog>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://maven.apache.org/maven-v4_0_0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/maven-4.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/maven-4.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/maven-4.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.1.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.1.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/settings-1.2.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/settings-1.2.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/toolchains-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/toolchains-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/toolchains-1.1.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/toolchains-1.1.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/profiles-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/profiles-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-catalog-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-catalog-1.0.0.xsd"/>
<system systemId="http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" uri="jar:file:/C:/Users/T470/eclipse/java-2024-09/eclipse/../../../.p2/pool/plugins/org.eclipse.m2e.model.edit_2.0.500.20240417-1957.jar!/xsd/archetype-descriptor-1.0.0.xsd"/>
</catalog>
#Fri Jan 09 10:16:03 CET 2026
org.eclipse.core.runtime=2
org.eclipse.platform=4.33.0.v20240903-0240
package de.hft.stuttgart.citydoctor2.datastructure.bht;
import java.util.ArrayList;
import java.util.List;
/**
* Represents an Axis-Aligned Bounding Box (AABB) using six double values.
*/
public class AABB {
private double minX, minY, minZ;
private double maxX, maxY, maxZ;
/**
* Default constructor initializing to a zero-sized box at origin.
*/
/**
* Constructs an AABB from explicit min and max coordinates.
*/
public AABB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
this.minX = Math.min(minX, maxX);
this.minY = Math.min(minY, maxY);
this.minZ = Math.min(minZ, maxZ);
this.maxX = Math.max(minX, maxX);
this.maxY = Math.max(minY, maxY);
this.maxZ = Math.max(minZ, maxZ);
}
public double getMinX() { return minX; }
public double getMinY() { return minY; }
public double getMinZ() { return minZ; }
public double getMaxX() { return maxX; }
public double getMaxY() { return maxY; }
public double getMaxZ() { return maxZ; }
public double getCenterX() { return (minX + maxX) / 2.0; }
public double getCenterY() { return (minY + maxY) / 2.0; }
public double getCenterZ() { return (minZ + maxZ) / 2.0; }
/**
* Returns the center point of the AABB as a double array [x, y, z].
*
* @return the center coordinates
*/
public double[] getCenter() {
double centerX = (minX + maxX) / 2.0;
double centerY = (minY + maxY) / 2.0;
double centerZ = (minZ + maxZ) / 2.0;
return new double[] { centerX, centerY, centerZ };
}
/**
* Returns the 8 corner points of the AABB as list of double[3] arrays.
*/
public List<double[]> getCornerPoints() {
List<double[]> points = new ArrayList<>(8);
points.add(new double[]{minX, minY, minZ});
points.add(new double[]{minX, minY, maxZ});
points.add(new double[]{minX, maxY, minZ});
points.add(new double[]{minX, maxY, maxZ});
points.add(new double[]{maxX, minY, minZ});
points.add(new double[]{maxX, minY, maxZ});
points.add(new double[]{maxX, maxY, minZ});
points.add(new double[]{maxX, maxY, maxZ});
return points;
}
/**
* Checks whether a point lies inside or on the surface of the AABB.
*/
public boolean encloses(double x, double y, double z) {
return minX <= x && x <= maxX &&
minY <= y && y <= maxY &&
minZ <= z && z <= maxZ;
}
/**
* Checks if this and other boxes intersect
*/
public boolean intersects(AABB other) {
return !(other.maxX < this.minX || other.minX > this.maxX ||
other.maxY < this.minY || other.minY > this.maxY ||
other.maxZ < this.minZ || other.minZ > this.maxZ);
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof AABB other)) return false;
return minX == other.minX && minY == other.minY && minZ == other.minZ &&
maxX == other.maxX && maxY == other.maxY && maxZ == other.maxZ;
}
@Override
public int hashCode() {
return Double.hashCode(minX) ^ Double.hashCode(maxX) ^
Double.hashCode(minY) ^ Double.hashCode(maxY) ^
Double.hashCode(minZ) ^ Double.hashCode(maxZ);
}
public void print() {
System.out.printf("min: %.2f, %.2f, %.2f%n", minX, minY, minZ);
System.out.printf("max: %.2f, %.2f, %.2f%n", maxX, maxY, maxZ);
}
}
package de.hft.stuttgart.citydoctor2.datastructure.bht;
import java.util.Comparator;
import java.util.List;
import java.util.ArrayList;
import java.util.function.Function;
/**
* Generic AABB Tree implementation using a binary tree structure.
*
* @param <E> The type of elements stored in the tree, which must be able to provide an AABB.
*/
public class AABBTree<E> {
private BVHStructures.Node<E> root;
private final Function<E, AABB> aabbFunction;
/**
* Creates an empty AABB tree.
*
* @param aabbFunction Function to extract an AABB from an element of type E
*/
public AABBTree(Function<E, AABB> aabbFunction) {
this.root = null;
this.aabbFunction = aabbFunction;
}
/**
* Builds the AABB tree from a list of elements.
*
* @param elements The list of elements to insert into the tree
* @param aabbFunction Function to extract an AABB from an element of type E
*/
public AABBTree(List<E> elements, Function<E, AABB> aabbFunction) {
this.aabbFunction = aabbFunction;
if (elements == null || elements.isEmpty()) {
this.root = null;
} else {
this.root = buildRecursive(elements);
}
}
/**
* Returns the root node of the AABB tree.
*/
public BVHStructures.Node<E> getRoot() {
return root;
}
/**
* Sets the root node manually.
*/
public void setRoot(BVHStructures.Node<E> root) {
this.root = root;
}
/**
* Recursively builds a balanced AABB tree from the list of elements.
*/
private BVHStructures.Node<E> buildRecursive(List<E> elements) {
if (elements.size() == 1) {
E elem = elements.get(0);
BVHStructures.Node<E> leaf = new BVHStructures.Node<>();
leaf.element = elem;
leaf.aabb = aabbFunction.apply(elem);
return leaf;
}
// Compute total AABB
AABB totalAabb = BVHStructures.getAggregateAABB(elements, aabbFunction);
int axis = BVHStructures.findLongestAxis(totalAabb);
// Sort elements along axis
elements.sort(Comparator.comparingDouble(e ->
aabbFunction.apply(e).getCenter()[axis]));
int mid = elements.size() / 2;
List<E> leftList = elements.subList(0, mid);
List<E> rightList = elements.subList(mid, elements.size());
BVHStructures.Node<E> node = new BVHStructures.Node<>();
node.aabb = totalAabb;
node.children.add(buildRecursive(leftList));
node.children.add(buildRecursive(rightList));
return node;
}
/////////////////////////////////////////////////////////////////
/* Sketch: method for rapid intersection dedection */
/*
*
*
*/
public List<E> findCandidates(AABB query) {
List<E> candidates = new ArrayList<>();
findCandidatesRecursive(root, query, candidates);
return candidates;
}
/*
*
*
*
*/
private void findCandidatesRecursive(BVHStructures.Node<E> node, AABB query, List<E> result) {
if (node == null || !node.aabb.intersects(query)) {
return;
}
if (node.isLeaf()) {
if (aabbFunction.apply(node.element).intersects(query)) {
result.add(node.element);
}
} else {
for (BVHStructures.Node<E> child : node.children) {
findCandidatesRecursive(child, query, result);
}
}
}
}
package de.hft.stuttgart.citydoctor2.datastructure.bht;
import de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon;
import de.hft.stuttgart.citydoctor2.datastructure.LinearRing;
import de.hft.stuttgart.citydoctor2.datastructure.Vertex;
import de.hft.stuttgart.citydoctor2.math.Vector3d;
import java.util.*;
/**
* @author Baris Numanoglu
*
* Utility class providing AABB-related helper methods.
*
* Contains functionality for computing axis-aligned bounding boxes (AABBs)
* from geometric data structures such as {@link ConcretePolygon} or {@link LinearRing}.
*
* All methods are static.
*/
public class AABBUtils {
public static AABB getAABB(ConcretePolygon poly) {
LinearRing ring = poly.getExteriorRing();
if (ring == null) return null;
return computeAABBFromRing(ring);
}
/**
* Computes an AABB from a LinearRing by iterating over its vertices.
*
* @param ring the LinearRing whose vertices define the AABB
* @return AABB enclosing the ring; returns an empty AABB if the ring has no vertices
*/
public static AABB computeAABBFromRing(LinearRing ring) {
if (ring == null || ring.getVertices() == null || ring.getVertices().isEmpty()) {
return new AABB(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY,
Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY);
}
double minX = Double.POSITIVE_INFINITY;
double minY = Double.POSITIVE_INFINITY;
double minZ = Double.POSITIVE_INFINITY;
double maxX = Double.NEGATIVE_INFINITY;
double maxY = Double.NEGATIVE_INFINITY;
double maxZ = Double.NEGATIVE_INFINITY;
for (Vertex v : ring.getVertices()) {
double x = v.getX();
double y = v.getY();
double z = v.getZ();
minX = Math.min(minX, x);
minY = Math.min(minY, y);
minZ = Math.min(minZ, z);
maxX = Math.max(maxX, x);
maxY = Math.max(maxY, y);
maxZ = Math.max(maxZ, z);
}
return new AABB(minX, minY, minZ, maxX, maxY, maxZ);
}
public static double[] extractBoundsFromPoints(Point p1, Point p2) {
double minX = Math.min(p1.getX(), p2.getX());
double minY = Math.min(p1.getY(), p2.getY());
double minZ = Math.min(p1.getZ(), p2.getZ());
double maxX = Math.max(p1.getX(), p2.getX());
double maxY = Math.max(p1.getY(), p2.getY());
double maxZ = Math.max(p1.getZ(), p2.getZ());
return new double[] { minX, minY, minZ, maxX, maxY, maxZ };
}
// NOTE: May replaced later: double[] extractBoundsFromPoints(List<? extends Point> points)
public static AABB aabbFromVector3d(List<? extends Vector3d> points) {
double minX = Double.POSITIVE_INFINITY, minY = Double.POSITIVE_INFINITY, minZ = Double.POSITIVE_INFINITY;
double maxX = Double.NEGATIVE_INFINITY, maxY = Double.NEGATIVE_INFINITY, maxZ = Double.NEGATIVE_INFINITY;
for (Vector3d p : points) {
minX = Math.min(minX, p.getX());
minY = Math.min(minY, p.getY());
minZ = Math.min(minZ, p.getZ());
maxX = Math.max(maxX, p.getX());
maxY = Math.max(maxY, p.getY());
maxZ = Math.max(maxZ, p.getZ());
}
return new AABB(minX, minY, minZ, maxX, maxY, maxZ);
}
/**
* Computes an AABB for a single vertex degenerate AABB with min=max=vertex coordinates
*
* @param vertex the vertex to wrap in an AABB
* @return AABB centered at the vertex position
*/
public static AABB computeAABBFromVertex(Vertex vertex) {
if (vertex == null) {
// Return a degenerate AABB with infinite bounds if vertex is null
return new AABB(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY,
Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY);
}
double x = vertex.getX();
double y = vertex.getY();
double z = vertex.getZ();
return new AABB(x, y, z, x, y, z);
}
/** Returns true if the AABB is (nearly) flat in at least two axes. */
public static boolean isDegenerate(AABB aabb, double tol) {
double dx = aabb.getMaxX() - aabb.getMinX();
double dy = aabb.getMaxY() - aabb.getMinY();
double dz = aabb.getMaxZ() - aabb.getMinZ();
int flatAxes = 0;
if (dx <= tol) flatAxes++;
if (dy <= tol) flatAxes++;
if (dz <= tol) flatAxes++;
return flatAxes >= 2; // cannot host 3 distinct points in 3D
}
/**
* Counts distinct vertices of a ring using a tolerance.
* Implementation: uniform quantization (grid hashing) for speed and determinism.
*/
public static int countDistinctVertices(LinearRing ring, double tol) {
if (ring == null || ring.getVertices() == null) return 0;
// Use a quantization resolution based on tol (avoid div by zero).
final double q = (tol > 0) ? tol : 1e-9;
// Hash set of quantized integer triplets "ix|iy|iz"
Set<Long> buckets = new HashSet<>(ring.getVertices().size() * 2);
for (Vertex v : ring.getVertices()) {
long ix = Math.round(v.getX() / q);
long iy = Math.round(v.getY() / q);
long iz = Math.round(v.getZ() / q);
// pack into a 64-bit key (simple mixing; safe if ranges are reasonable)
long key = mix3(ix, iy, iz);
buckets.add(key);
}
return buckets.size();
}
// Simple 3D integer mix to a 64-bit key (Xorshift-ish) from JavaDoc
private static long mix3(long x, long y, long z) {
long h = x * 73856093L ^ y * 19349663L ^ z * 83492791L;
// final avalanche
h ^= (h >>> 33);
h *= 0xff51afd7ed558ccdL;
h ^= (h >>> 33);
h *= 0xc4ceb9fe1a85ec53L;
h ^= (h >>> 33);
return h;
}
/** Returns true if 'outer' fully contains 'inner' (inclusive) in axis-aligned sense. */
public static boolean containsAabb(AABB outer, AABB inner) {
return outer.getMinX() <= inner.getMinX()
&& outer.getMinY() <= inner.getMinY()
&& outer.getMinZ() <= inner.getMinZ()
&& outer.getMaxX() >= inner.getMaxX()
&& outer.getMaxY() >= inner.getMaxY()
&& outer.getMaxZ() >= inner.getMaxZ();
}
/** Builds a padded AABB around a segment (two vertices). */
public static AABB edgeAabb(Vertex a, Vertex b, double pad) {
double minX = Math.min(a.getX(), b.getX()) - pad;
double minY = Math.min(a.getY(), b.getY()) - pad;
double minZ = Math.min(a.getZ(), b.getZ()) - pad;
double maxX = Math.max(a.getX(), b.getX()) + pad;
double maxY = Math.max(a.getY(), b.getY()) + pad;
double maxZ = Math.max(a.getZ(), b.getZ()) + pad;
return new AABB(minX, minY, minZ, maxX, maxY, maxZ);
}
/** Returns true if two AABBs overlap (inclusive). */
public static boolean overlaps(AABB a, AABB b) {
return !(a.getMaxX() < b.getMinX() ||
a.getMinX() > b.getMaxX() ||
a.getMaxY() < b.getMinY() ||
a.getMinY() > b.getMaxY() ||
a.getMaxZ() < b.getMinZ() ||
a.getMinZ() > b.getMaxZ());
}
/** Returns true if there exists any overlapping AABB pair. */
public static boolean anyOverlap(AABB[] boxes) {
for (int i = 0; i < boxes.length - 1; i++) {
AABB a = boxes[i];
for (int j = i + 1; j < boxes.length; j++) {
AABB b = boxes[j];
if (AABBUtils.overlaps(a, b)) return true;
}
}
return false;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment