Commit 81be0b1d authored by Riegel's avatar Riegel
Browse files

Merge branch 'dev_GUI' into 'dev'

Open source release of CityDoctorGUI and other extensions.

See merge request !6
parents 12d96d95 5a4d0a74
Pipeline #10056 passed with stage
in 1 minute and 6 seconds
......@@ -26,6 +26,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.CityObject;
* @author Matthias Betz
*
*/
@FunctionalInterface
public interface FeatureCheckedListener {
public void featureChecked(CityObject co);
......
......@@ -78,7 +78,7 @@ public class SelfIntersectionUtil {
private static final Logger logger = LogManager.getLogger(SelfIntersectionUtil.class);
private static GeometryFactory factory = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING));
private static final GeometryFactory factory = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING));
private SelfIntersectionUtil() {
......@@ -93,7 +93,7 @@ public class SelfIntersectionUtil {
List<PolygonIntersection> intersections = new ArrayList<>();
MeshSurface meshSurface = MeshSurface.of(g);
Map<Polygon, EdgePolygon> edgePolyMap = new IdentityHashMap<>();
for (EdgePolygon poly : meshSurface.getPolygons()) {
for (EdgePolygon poly : meshSurface.polygons()) {
edgePolyMap.put(poly.getOriginal(), poly);
}
for (int i = 0; i < polygons.size() - 1; i++) {
......@@ -213,12 +213,10 @@ public class SelfIntersectionUtil {
// intersection is only an edge, not a polygon
// edge intersections are allowed
return PolygonIntersection.none();
} else if (intersection instanceof GeometryCollection) {
GeometryCollection col = (GeometryCollection) intersection;
} else if (intersection instanceof GeometryCollection col) {
for (int i = 0; i < col.getNumGeometries(); i++) {
org.locationtech.jts.geom.Geometry interGeom = col.getGeometryN(i);
if (interGeom instanceof org.locationtech.jts.geom.Polygon) {
org.locationtech.jts.geom.Polygon intPoly = (org.locationtech.jts.geom.Polygon) interGeom;
if (interGeom instanceof org.locationtech.jts.geom.Polygon intPoly) {
ConcretePolygon poly = convertToPolygon(plane1, projectionAxis, intPoly);
return PolygonIntersection.polygon(poly, p1.getOriginal(), p2.getOriginal());
}
......@@ -226,8 +224,7 @@ public class SelfIntersectionUtil {
// no polygon in collection, so no intersection
return PolygonIntersection.none();
}
if (intersection instanceof org.locationtech.jts.geom.Polygon) {
org.locationtech.jts.geom.Polygon intPoly = (org.locationtech.jts.geom.Polygon) intersection;
if (intersection instanceof org.locationtech.jts.geom.Polygon intPoly) {
ConcretePolygon poly = convertToPolygon(plane1, projectionAxis, intPoly);
return PolygonIntersection.polygon(poly, p1.getOriginal(), p2.getOriginal());
} else {
......@@ -412,7 +409,7 @@ public class SelfIntersectionUtil {
Triangle3d t2 = p2.getTriangles().get(p2Index);
if (t1.doesIntersect(t2)) {
logger.trace("{} intersects {}", t1, t2);
logger.trace("{} intersects {}", t1.getPartOf().getOriginal().getGmlId(),
logger.trace("GML-ID: {} intersects {}", t1.getPartOf().getOriginal().getGmlId(),
t2.getPartOf().getOriginal().getGmlId());
return new GeometrySelfIntersection(t1.getPartOf().getOriginal(), t2.getPartOf().getOriginal(), t1,
t2);
......
......@@ -52,22 +52,20 @@ public class ArgumentParser {
HashMap<String, List<String>> params = new HashMap<>();
List<String> options = null;
for (int i = 0; i < args.length; i++) {
final String a = args[i];
if (a.charAt(0) == '-') {
if (a.length() < 2) {
ErrorHandler.printHelpAndTerminate("Error while parsing argument " + a);
}
String flag = a.substring(1).toLowerCase();
options = new ArrayList<>();
params.put(flag, options);
} else if (options != null) {
options.add(a);
} else {
ErrorHandler.printHelpAndTerminate("Illegal parameter usage at " + a);
}
}
for (final String a : args) {
if (a.charAt(0) == '-') {
if (a.length() < 2) {
ErrorHandler.printHelpAndTerminate("Error while parsing argument " + a);
}
String flag = a.substring(1).toLowerCase();
options = new ArrayList<>();
params.put(flag, options);
} else if (options != null) {
options.add(a);
} else {
ErrorHandler.printHelpAndTerminate("Illegal parameter usage at " + a);
}
}
return params;
}
......
......@@ -31,7 +31,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public class ErrorStatisticsCollector {
private Map<String, AtomicInteger> errorCounts = new HashMap<>();
private final Map<String, AtomicInteger> errorCounts = new HashMap<>();
public void addError(String errorName) {
AtomicInteger numErrors = errorCounts.get(errorName);
......
......@@ -56,8 +56,8 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
*/
public class XmlStreamErrorHandler implements ErrorReport {
private ErrorDetails details;
private BasicCoordinateTransform originalTransform;
private final ErrorDetails details;
private final BasicCoordinateTransform originalTransform;
public XmlStreamErrorHandler(ParserConfiguration config) {
originalTransform = config.getOriginalTransform();
......
......@@ -74,11 +74,11 @@ public class XmlStreamReporter implements StreamReporter {
private static final Logger logger = LogManager.getLogger(XmlStreamReporter.class);
private OutputStream output;
private final OutputStream output;
private CheckReport report;
private Map<String, FeatureReport> reportMap;
private ValidationConfiguration config;
private final CheckReport report;
private final Map<String, FeatureReport> reportMap;
private final ValidationConfiguration config;
public XmlStreamReporter(OutputStream output, String fileName, ValidationConfiguration config) {
this.output = output;
......@@ -141,18 +141,18 @@ public class XmlStreamReporter implements StreamReporter {
@Override
public void report(CityObject co) {
if (co instanceof Building) {
reportBuilding((Building) co);
} else if (co instanceof Vegetation) {
reportVegetation((Vegetation) co);
} else if (co instanceof TransportationObject) {
reportTrans((TransportationObject) co);
} else if (co instanceof BridgeObject) {
reportBridge((BridgeObject) co);
} else if (co instanceof WaterObject) {
reportWater((WaterObject) co);
} else if (co instanceof LandObject) {
reportLand((LandObject) co);
if (co instanceof Building bu) {
reportBuilding(bu);
} else if (co instanceof Vegetation ve) {
reportVegetation(ve);
} else if (co instanceof TransportationObject to) {
reportTrans(to);
} else if (co instanceof BridgeObject bo) {
reportBridge(bo);
} else if (co instanceof WaterObject wo) {
reportWater(wo);
} else if (co instanceof LandObject lo) {
reportLand(lo);
} else {
throw new IllegalStateException("Not reportable CityObject found: " + co.getClass().getSimpleName());
}
......@@ -240,26 +240,10 @@ public class XmlStreamReporter implements StreamReporter {
@Override
public void finishReport() throws CheckReportWriteException {
GlobalStatistics stats = new GlobalStatistics();
GlobalErrorStatistics globErrStats = new GlobalErrorStatistics();
globErrStats
.setNumErrorBridgeObjects(getNumberOfErrorFeatures(report.getValidationResults().getBridgeReports()));
globErrStats.setNumErrorBuildings(getNumberOfErrorFeatures(report.getValidationResults().getBuildingReports()));
globErrStats.setNumErrorLandObjects(getNumberOfErrorFeatures(report.getValidationResults().getLandReports()));
globErrStats.setNumErrorTransportation(
getNumberOfErrorFeatures(report.getValidationResults().getTransportationReports()));
globErrStats
.setNumErrorVegetation(getNumberOfErrorFeatures(report.getValidationResults().getVegetationReports()));
globErrStats.setNumErrorWaterObjects(getNumberOfErrorFeatures(report.getValidationResults().getWaterReports()));
stats.setGlobalErrorStats(globErrStats);
ModelStatistics modelStats = new ModelStatistics();
modelStats.setNumBridgeObjects(report.getValidationResults().getBridgeReports().size());
modelStats.setNumBuildings(report.getValidationResults().getBuildingReports().size());
modelStats.setNumLandObjects(report.getValidationResults().getLandReports().size());
modelStats.setNumTransportation(report.getValidationResults().getTransportationReports().size());
modelStats.setNumVegetation(report.getValidationResults().getVegetationReports().size());
modelStats.setNumWaterObjects(report.getValidationResults().getWaterReports().size());
stats.setModelStats(modelStats);
stats.setGlobalErrorStats(getReportGlobalErrorStatistics());
stats.setModelStats(getReportModelStatistics());
ErrorStatisticsCollector globalErrorCount = new ErrorStatisticsCollector();
......@@ -279,6 +263,31 @@ public class XmlStreamReporter implements StreamReporter {
report.saveAs(output);
}
private ModelStatistics getReportModelStatistics() {
ModelStatistics modelStats = new ModelStatistics();
modelStats.setNumBridgeObjects(report.getValidationResults().getBridgeReports().size());
modelStats.setNumBuildings(report.getValidationResults().getBuildingReports().size());
modelStats.setNumLandObjects(report.getValidationResults().getLandReports().size());
modelStats.setNumTransportation(report.getValidationResults().getTransportationReports().size());
modelStats.setNumVegetation(report.getValidationResults().getVegetationReports().size());
modelStats.setNumWaterObjects(report.getValidationResults().getWaterReports().size());
return modelStats;
}
private GlobalErrorStatistics getReportGlobalErrorStatistics() {
GlobalErrorStatistics globErrStats = new GlobalErrorStatistics();
globErrStats
.setNumErrorBridgeObjects(getNumberOfErrorFeatures(report.getValidationResults().getBridgeReports()));
globErrStats.setNumErrorBuildings(getNumberOfErrorFeatures(report.getValidationResults().getBuildingReports()));
globErrStats.setNumErrorLandObjects(getNumberOfErrorFeatures(report.getValidationResults().getLandReports()));
globErrStats.setNumErrorTransportation(
getNumberOfErrorFeatures(report.getValidationResults().getTransportationReports()));
globErrStats
.setNumErrorVegetation(getNumberOfErrorFeatures(report.getValidationResults().getVegetationReports()));
globErrStats.setNumErrorWaterObjects(getNumberOfErrorFeatures(report.getValidationResults().getWaterReports()));
return globErrStats;
}
private void createStatistics(ErrorStatisticsCollector globalErrorCount, List<FeatureReport> reports) {
for (FeatureReport fReport : reports) {
if (fReport.getErrors().isEmpty()) {
......
......@@ -31,8 +31,8 @@ public class CodeBlock {
private static final String BLOCK = "block";
private Element codeBlockContainer;
private Element codeBlockElement;
private final Element codeBlockContainer;
private final Element codeBlockElement;
private Element currentLine;
......
......@@ -48,8 +48,8 @@ public class PdfErrorHandler implements ErrorReport {
private static final String ATTRIBUTE_KEY_COLOR = "#7F007F";
private static final String ATTRIBUTE_VALUE_COLOR = "#2A00FF";
private Section section;
private ParserConfiguration config;
private final Section section;
private final ParserConfiguration config;
public PdfErrorHandler(Section section, ParserConfiguration config) {
this.config = config;
......
......@@ -72,14 +72,14 @@ public class PdfStreamReporter implements StreamReporter {
private static final String WARNING_COLOR = "yellow";
private static final String OK_COLOR = "green";
private PdfReport report;
private OutputStream outFile;
private final PdfReport report;
private final OutputStream outFile;
private Map<ErrorId, AtomicInteger> errorStatistics;
private ValidationConfiguration config;
private final Map<ErrorId, AtomicInteger> errorStatistics;
private final ValidationConfiguration config;
private Section statistics;
private Section vr;
private final Section statistics;
private final Section vr;
private Section buildings;
private int numErrorBuildings;
......@@ -107,7 +107,7 @@ public class PdfStreamReporter implements StreamReporter {
private Section globalErrors;
private Map<String, Section> sectionMap = new HashMap<>();
private final Map<String, Section> sectionMap = new HashMap<>();
public PdfStreamReporter(OutputStream pdfOutputFile, String fileName, ValidationConfiguration config) {
this.config = config;
......@@ -393,21 +393,7 @@ public class PdfStreamReporter implements StreamReporter {
@Override
public void finishReport() throws CheckReportWriteException {
if (buildings != null) {
for (Section s : buildings.getSubSections()) {
if (!s.hasErrors()) {
numOkBuildings++;
// building has no errors, no table
continue;
}
numErrorBuildings++;
Table t = new Table(2);
t.setTableColumnWidth(75, 25);
t.setTitle("Error", "Count");
for (Entry<String, AtomicInteger> e : s.getStats().getErrorCounts().entrySet()) {
t.addRow(e.getKey(), e.getValue().toString());
}
s.addTable(1, t);
}
countFinishedReportBuildings();
}
int numBuildings = numErrorBuildings + numOkBuildings;
if (numBuildings > 0) {
......@@ -446,6 +432,24 @@ public class PdfStreamReporter implements StreamReporter {
report.save(outFile);
}
private void countFinishedReportBuildings() {
for (Section s : buildings.getSubSections()) {
if (!s.hasErrors()) {
numOkBuildings++;
// building has no errors, no table
continue;
}
numErrorBuildings++;
Table t = new Table(2);
t.setTableColumnWidth(75, 25);
t.setTitle("Error", "Count");
for (Entry<String, AtomicInteger> e : s.getStats().getErrorCounts().entrySet()) {
t.addRow(e.getKey(), e.getValue().toString());
}
s.addTable(1, t);
}
}
@Override
public void reportGlobalError(CheckError err) {
AtomicInteger errorCount = errorStatistics.computeIfAbsent(err.getErrorId(), k -> new AtomicInteger(0));
......
......@@ -50,15 +50,15 @@ public class Section {
private static final AtomicInteger S_COUNTER = new AtomicInteger(0);
private Element tocBlock;
private Element contentBlock;
private final Element tocBlock;
private final Element contentBlock;
private Element headlineBlock;
private final Element headlineBlock;
private String linkId;
private List<Section> subSections;
private int depth;
private final int depth;
// attributes for error reporting
private ErrorStatisticsCollector stats;
......
......@@ -30,13 +30,13 @@ public class Table {
private static final String TABLE_HEADER_COLOR = "#58ACFA";
private Element tableBlock;
private final Element tableBlock;
private Element tableHeader;
private Element tableBody;
private Element tableElement;
private final Element tableHeader;
private final Element tableBody;
private final Element tableElement;
private int columns;
private final int columns;
public Table(int columns) {
this.columns = columns;
......@@ -101,13 +101,13 @@ public class Table {
private Element createTableRow(String... content) {
Element tableRow = new Element("table-row", PdfReport.FO_NS);
for (int i = 0; i < content.length; i++) {
Element tableCell = new Element("table-cell", PdfReport.FO_NS);
tableRow.addContent(tableCell);
tableCell.addContent(PdfReport.createTextElement(content[i]));
tableCell.setAttribute("padding", "3pt 3pt 3pt 3pt");
PdfReport.applySolidBorder(tableCell);
}
for (String s : content) {
Element tableCell = new Element("table-cell", PdfReport.FO_NS);
tableRow.addContent(tableCell);
tableCell.addContent(PdfReport.createTextElement(s));
tableCell.setAttribute("padding", "3pt 3pt 3pt 3pt");
PdfReport.applySolidBorder(tableCell);
}
return tableRow;
}
......
......@@ -18,12 +18,6 @@
*/
package de.hft.stuttgart.citydoctor2.check;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.FileNotFoundException;
import org.junit.Test;
......@@ -31,6 +25,13 @@ import org.junit.Test;
import de.hft.stuttgart.citydoctor2.datastructure.FeatureType;
import de.hft.stuttgart.quality.model.enums.RequirementId;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
public class ValidationConfigurationTest {
@Test
......@@ -70,4 +71,21 @@ public class ValidationConfigurationTest {
assertTrue(includeFilter.getTypes().contains(FeatureType.VEGETATION));
}
@Test
public void testVulnerableConfig() throws FileNotFoundException{
String file = "src/test/resources/testConfigVulnerability.yml";
ValidationConfiguration config = null;
try {
config = ValidationConfiguration.loadValidationConfig(file);
assertNotNull(config);
fail("Config with Vulnerability should not be successfully loaded");
} catch (FileNotFoundException e){
// Rethrow FNFE
throw e;
} catch (Exception e) {
// Bad config was not loaded
assertNull(config);
}
}
}
set CLASSPATH=.\target\classes;..\CityDoctorModel\target\classes;..\CityDoctorHealer\target\classes
set PATH="c:\Program Files (x86)\Java\jdk1.8.0_25\bin"
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoPro
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoProSettingsExport
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoProSettingsGeneral
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoProSettingsBool
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoProSettingsMerge
javah -jni de.hft.stuttgart.citydoctor2.connect.edge.AutoProSettingsAdvancedSweep
pause
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorParent</artifactId>
<version>3.14.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>CityDoctorAutoPro</artifactId>
<name>CityDoctorAutoPro</name>
<description>Automated Simplification Algorithms</description>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorModel</artifactId>
</dependency>
<dependency>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorValidation</artifactId>
</dependency>
<dependency>
<groupId>de.hft.stuttgart</groupId>
<artifactId>CityDoctorHealer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package de.hft.stuttgart.citydoctor2.connect.edge;
import de.hft.stuttgart.citydoctor2.connect.edge.CppFeature;
import de.hft.stuttgart.citydoctor2.connect.edge.CppReferenceHandlingBase;
import de.hft.stuttgart.citydoctor2.connect.edge.NativeException;
import de.hft.stuttgart.citydoctor2.connect.edge.NativePointerCastException;
/**
*
* @author PiR
* @version 1.0
*
*/
public class AutoPro extends CppReferenceHandlingBase
{
// ----- native methods
// create and release stored C++ polygon check object
private native long createCppAutoPro()
throws OutOfMemoryError;
private native void disposeCppAutoPro(long ptrToCppAutoPro)
throws NativePointerCastException;
// native methods
private native boolean addFeature(long ptrToCppAutoPro, long ptrToCppFeature)
throws NativeException, IllegalArgumentException;
private native boolean setSettingsExport(long ptrToCppAutoPro, long ptrToCppSettings)
throws NativeException, IllegalArgumentException;
private native boolean setSettingsGeneral(long ptrToCppAutoPro, long ptrToCppSettings)
throws NativeException, IllegalArgumentException;
private native boolean setSettingsBool(long ptrToCppAutoPro, long ptrToCppSettings)
throws NativeException, IllegalArgumentException;
private native boolean setSettingsMerge(long ptrToCppAutoPro, long ptrToCppSettings)
throws NativeException, IllegalArgumentException;
private native boolean setSettingsAdvancedSweep(long ptrToCppAutoPro, long ptrToCppSettings)
throws NativeException, IllegalArgumentException;
private native boolean applyAutoProMethods(long ptrToCppAutoPro)
throws NativeException, IllegalArgumentException;
public native long getHealResult(long ptrToCppAutoPro, long ptrToCppFeature)
throws NativeException, IllegalArgumentException;
/**
* Constructor that gets a VPDFeature. All check method will be invoked on this feature.
* Remember to use the createCppObject method
* @param feature All check methods will use the data of this feature
*
* @see {@link createCppObject} {@link disposeCppObject}
*/
public AutoPro()
{
}
/**
* Creates an C++ object to use the native methods.
*
* @throws IllegalStateException
* Thrown if the encapsulated "long-Pointer" isn't 0
* @throws NativeOutOfMemoryException
* If there is no more memory on the native side
*
* @see {@link disposeCppObject}
* @see de.hft.stuttgart.citydoctor.connect.edGe.CppReferenceHandlingBase#createCppObject()
*/
public void createCppObject()
throws OutOfMemoryError, IllegalStateException
{
if ( 0L != ptrToCppObject)
{
throw new IllegalStateException("Can't create new C++ object, there is allready one!");
}
// Maybe an exception is thrown and there should be no crap in ptrToCppObject
long tmpPointer = createCppAutoPro();
ptrToCppObject = tmpPointer;
}
@Override
public void disposeCppObject()
throws NativePointerCastException
{
if ( 0L != ptrToCppObject)
{
disposeCppAutoPro(this.ptrToCppObject);
ptrToCppObject = 0x0;
}
}
public void ap_addFeature(CppFeature feature)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
addFeature(ptrToCppObject, feature.ptrToCppObject);
}
public void ap_setSettingsExport(AutoProSettingsExport settings)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
setSettingsExport(ptrToCppObject, settings.ptrToCppObject);
}
public void ap_setSettingsGeneral(AutoProSettingsGeneral settings)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
setSettingsGeneral(ptrToCppObject, settings.ptrToCppObject);
}
public void ap_setSettingsBool(AutoProSettingsBool settings)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
setSettingsBool(ptrToCppObject, settings.ptrToCppObject);
}
public void ap_setSettingsMerge(AutoProSettingsMerge settings)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
setSettingsMerge(ptrToCppObject, settings.ptrToCppObject);
}
public void ap_setSettingsAdvancedSweep(AutoProSettingsAdvancedSweep settings)
throws NativeException, IllegalArgumentException
{
checkNullPointer();
setSettingsAdvancedSweep(ptrToCppObject, settings.ptrToCppObject);
}
public void ap_applyAutoProMethods()
throws NativeException, IllegalArgumentException
{
checkNullPointer();
applyAutoProMethods(ptrToCppObject);
}
public long ap_getHealResult(CppFeature feature) {
checkNullPointer();
return getHealResult(ptrToCppObject, feature.ptrToCppObject);
}
}
package de.hft.stuttgart.citydoctor2.connect.edge;
import de.hft.stuttgart.citydoctor2.connect.edge.CppReferenceHandlingBase;
import de.hft.stuttgart.citydoctor2.connect.edge.NativePointerCastException;
public class AutoProSettingsAdvancedSweep extends CppReferenceHandlingBase {
private native long createCppClass(
boolean advancedSweep_General_printInfo,
boolean advancedSweep_General_printFilterReasonInfo,
boolean advancedSweep_General_exportIntermediateStages,
double advancedSweep_General_minEdgeLength,
double advancedSweep_General_maxEdgeLength,
double advancedSweep_General_minDistToSweep,
boolean advancedSweep_Planarity_Use,
boolean advancedSweep_Planarity_IgnoreMultiplePoints,
double advancedSweep_Planarity_PlanarityTolerance,
boolean advancedSweep_SweepPlane_Use,
boolean advancedSweep_SweepPlane_PushOnly,
boolean advancedSweep_SweepPlane_PullOnly,
boolean advancedSweep_SweepPlane_ShortestEdgeFirst,
boolean advancedSweep_SweepPlane_SmallestFaceFirst,
boolean advancedSweep_SweepPlane_SmallestDistFirst,
boolean advancedSweep_SweepRotate_Use,
double advancedSweep_SweepRotate_maxAngle,
boolean advancedSweep_SweepRotate_SmallestDistFirst,
boolean advancedSweep_SweepRotate_SmallestAngleFirst,
boolean advancedSweep_SweepRotate_SmallestFaceFirst
)
throws OutOfMemoryError;
private native void disposeCppClass(long ptrToCppAutoPro)
throws NativePointerCastException;
private boolean advancedSweep_General_printInfo;
private boolean advancedSweep_General_printFilterReasonInfo;
private boolean advancedSweep_General_exportIntermediateStages;
private double advancedSweep_General_minEdgeLength;
private double advancedSweep_General_maxEdgeLength;
private double advancedSweep_General_minDistToSweep;
private boolean advancedSweep_Planarity_Use;
private boolean advancedSweep_Planarity_IgnoreMultiplePoints;
private double advancedSweep_Planarity_PlanarityTolerance;
private boolean advancedSweep_SweepPlane_Use;
private boolean advancedSweep_SweepPlane_PushOnly;
private boolean advancedSweep_SweepPlane_PullOnly;
private boolean advancedSweep_SweepPlane_ShortestEdgeFirst;
private boolean advancedSweep_SweepPlane_SmallestFaceFirst;
private boolean advancedSweep_SweepPlane_SmallestDistFirst;
private boolean advancedSweep_SweepRotate_Use;
private double advancedSweep_SweepRotate_maxAngle;
private boolean advancedSweep_SweepRotate_SmallestDistFirst;
private boolean advancedSweep_SweepRotate_SmallestAngleFirst;
private boolean advancedSweep_SweepRotate_SmallestFaceFirst;
public AutoProSettingsAdvancedSweep() {
set_advancedSweep_General_printInfo(false);
set_advancedSweep_General_printFilterReasonInfo(false);
set_advancedSweep_General_exportIntermediateStages(false);
set_advancedSweep_General_minEdgeLength(2.0);
set_advancedSweep_General_maxEdgeLength(5.0);
set_advancedSweep_General_minDistToSweep(0);
set_advancedSweep_Planarity_Use(false);
set_advancedSweep_Planarity_IgnoreMultiplePoints(false);
set_advancedSweep_Planarity_PlanarityTolerance(0.001);
set_advancedSweep_SweepPlane_Use(false);
set_advancedSweep_SweepPlane_PushOnly(false);
set_advancedSweep_SweepPlane_PullOnly(false);
set_advancedSweep_SweepPlane_ShortestEdgeFirst(false);
set_advancedSweep_SweepPlane_SmallestFaceFirst(false);
set_advancedSweep_SweepPlane_SmallestDistFirst(false);
set_advancedSweep_SweepRotate_Use(false);
set_advancedSweep_SweepRotate_maxAngle(10);
set_advancedSweep_SweepRotate_SmallestDistFirst(false);
set_advancedSweep_SweepRotate_SmallestAngleFirst(false);
set_advancedSweep_SweepRotate_SmallestFaceFirst(false);
}
/**
* Creates an C++ feature object
*
* @throws IllegalStateException
* Thrown if the encapsulated "long-Pointer" isn't 0
* @throws NativeOutOfMemoryException
* If there is no more memory on the native side
*
* @see {@link disposeCppObject}
* @see de.hft.stuttgart.citydoctor.connect.edGe.CppReferenceHandlingBase#createCppObject()
*/
public void createCppObject() throws IllegalStateException,
OutOfMemoryError {
if (0L != ptrToCppObject) {
throw new IllegalStateException(
"Can't create new C++ object, there is allready one!");
}
// Maybe an exception is thrown
long tmpPointer = createCppClass(
is_advancedSweep_General_printInfo(),
is_advancedSweep_General_printFilterReasonInfo(),
is_advancedSweep_General_exportIntermediateStages(),
get_advancedSweep_General_minEdgeLength(),
get_advancedSweep_General_maxEdgeLength(),
get_advancedSweep_General_minDistToSweep(),
is_advancedSweep_Planarity_Use(),
is_advancedSweep_Planarity_IgnoreMultiplePoints(),
get_advancedSweep_Planarity_PlanarityTolerance(),
is_advancedSweep_SweepPlane_Use(),
is_advancedSweep_SweepPlane_PushOnly(),
is_advancedSweep_SweepPlane_PullOnly(),
is_advancedSweep_SweepPlane_ShortestEdgeFirst(),
is_advancedSweep_SweepPlane_SmallestFaceFirst(),
is_advancedSweep_SweepPlane_SmallestDistFirst(),
is_advancedSweep_SweepRotate_Use(),
get_advancedSweep_SweepRotate_maxAngle(),
is_advancedSweep_SweepRotate_SmallestDistFirst(),
is_advancedSweep_SweepRotate_SmallestAngleFirst(),
is_advancedSweep_SweepRotate_SmallestFaceFirst()
);
ptrToCppObject = tmpPointer;
}
@Override
public void disposeCppObject() throws NativePointerCastException {
if (0L != ptrToCppObject) {
disposeCppClass(ptrToCppObject);
ptrToCppObject = 0L;
}
}
public void set_advancedSweep_General_printInfo(boolean advancedSweep_General_printInfo)
{
this.advancedSweep_General_printInfo = advancedSweep_General_printInfo;
}
public void set_advancedSweep_General_printFilterReasonInfo(boolean advancedSweep_General_printFilterReasonInfo)
{
this.advancedSweep_General_printFilterReasonInfo = advancedSweep_General_printFilterReasonInfo;
}
public void set_advancedSweep_General_exportIntermediateStages(boolean advancedSweep_General_exportIntermediateStages)
{
this.advancedSweep_General_exportIntermediateStages = advancedSweep_General_exportIntermediateStages;
}
public void set_advancedSweep_General_minEdgeLength(double advancedSweep_General_minEdgeLength)
{
this.advancedSweep_General_minEdgeLength = advancedSweep_General_minEdgeLength;
}
public void set_advancedSweep_General_maxEdgeLength(double advancedSweep_General_maxEdgeLength)
{
this.advancedSweep_General_maxEdgeLength = advancedSweep_General_maxEdgeLength;
}
public void set_advancedSweep_General_minDistToSweep(double advancedSweep_General_minDistToSweep)
{
this.advancedSweep_General_minDistToSweep = advancedSweep_General_minDistToSweep;
}
public void set_advancedSweep_Planarity_Use(boolean advancedSweep_Planarity_Use)
{
this.advancedSweep_Planarity_Use = advancedSweep_Planarity_Use;
}
public void set_advancedSweep_Planarity_IgnoreMultiplePoints(boolean advancedSweep_Planarity_IgnoreMultiplePoints)
{
this.advancedSweep_Planarity_IgnoreMultiplePoints = advancedSweep_Planarity_IgnoreMultiplePoints;
}
public void set_advancedSweep_Planarity_PlanarityTolerance(double advancedSweep_Planarity_PlanarityTolerance)
{
this.advancedSweep_Planarity_PlanarityTolerance = advancedSweep_Planarity_PlanarityTolerance;
}
public void set_advancedSweep_SweepPlane_Use(boolean advancedSweep_SweepPlane_Use)
{
this.advancedSweep_SweepPlane_Use = advancedSweep_SweepPlane_Use;
}
public void set_advancedSweep_SweepPlane_PushOnly(boolean advancedSweep_SweepPlane_PushOnly)
{
this.advancedSweep_SweepPlane_PushOnly = advancedSweep_SweepPlane_PushOnly;
}
public void set_advancedSweep_SweepPlane_PullOnly(boolean advancedSweep_SweepPlane_PullOnly)
{
this.advancedSweep_SweepPlane_PullOnly = advancedSweep_SweepPlane_PullOnly;
}
public void set_advancedSweep_SweepPlane_ShortestEdgeFirst(boolean advancedSweep_SweepPlane_ShortestEdgeFirst)
{
this.advancedSweep_SweepPlane_ShortestEdgeFirst = advancedSweep_SweepPlane_ShortestEdgeFirst;
}
public void set_advancedSweep_SweepPlane_SmallestFaceFirst(boolean advancedSweep_SweepPlane_SmallestFaceFirst)
{
this.advancedSweep_SweepPlane_SmallestFaceFirst = advancedSweep_SweepPlane_SmallestFaceFirst;
}
public void set_advancedSweep_SweepPlane_SmallestDistFirst(boolean advancedSweep_SweepPlane_SmallestDistFirst)
{
this.advancedSweep_SweepPlane_SmallestDistFirst = advancedSweep_SweepPlane_SmallestDistFirst;
}
public void set_advancedSweep_SweepRotate_Use(boolean advancedSweep_SweepRotate_Use)
{
this.advancedSweep_SweepRotate_Use = advancedSweep_SweepRotate_Use;
}
public void set_advancedSweep_SweepRotate_maxAngle(double advancedSweep_SweepRotate_maxAngle)
{
this.advancedSweep_SweepRotate_maxAngle = advancedSweep_SweepRotate_maxAngle;
}
public void set_advancedSweep_SweepRotate_SmallestDistFirst(boolean advancedSweep_SweepRotate_SmallestDistFirst)
{
this.advancedSweep_SweepRotate_SmallestDistFirst = advancedSweep_SweepRotate_SmallestDistFirst;
}
public void set_advancedSweep_SweepRotate_SmallestAngleFirst(boolean advancedSweep_SweepRotate_SmallestAngleFirst)
{
this.advancedSweep_SweepRotate_SmallestAngleFirst = advancedSweep_SweepRotate_SmallestAngleFirst;
}
public void set_advancedSweep_SweepRotate_SmallestFaceFirst(boolean advancedSweep_SweepRotate_SmallestFaceFirst)
{
this.advancedSweep_SweepRotate_SmallestFaceFirst = advancedSweep_SweepRotate_SmallestFaceFirst;
}
public boolean is_advancedSweep_General_printInfo()
{
return this.advancedSweep_General_printInfo;
}
public boolean is_advancedSweep_General_printFilterReasonInfo()
{
return this.advancedSweep_General_printFilterReasonInfo;
}
public boolean is_advancedSweep_General_exportIntermediateStages()
{
return this.advancedSweep_General_exportIntermediateStages;
}
public double get_advancedSweep_General_minEdgeLength()
{
return this.advancedSweep_General_minEdgeLength;
}
public double get_advancedSweep_General_maxEdgeLength()
{
return this.advancedSweep_General_maxEdgeLength;
}
public double get_advancedSweep_General_minDistToSweep()
{
return this.advancedSweep_General_minDistToSweep;
}
public boolean is_advancedSweep_Planarity_Use()
{
return this.advancedSweep_Planarity_Use;
}
public boolean is_advancedSweep_Planarity_IgnoreMultiplePoints()
{
return this.advancedSweep_Planarity_IgnoreMultiplePoints;
}
public double get_advancedSweep_Planarity_PlanarityTolerance()
{
return this.advancedSweep_Planarity_PlanarityTolerance;
}
public boolean is_advancedSweep_SweepPlane_Use()
{
return this.advancedSweep_SweepPlane_Use;
}
public boolean is_advancedSweep_SweepPlane_PushOnly()
{
return this.advancedSweep_SweepPlane_PushOnly;
}
public boolean is_advancedSweep_SweepPlane_PullOnly()
{
return this.advancedSweep_SweepPlane_PullOnly;
}
public boolean is_advancedSweep_SweepPlane_ShortestEdgeFirst()
{
return this.advancedSweep_SweepPlane_ShortestEdgeFirst;
}
public boolean is_advancedSweep_SweepPlane_SmallestFaceFirst()
{
return this.advancedSweep_SweepPlane_SmallestFaceFirst;
}
public boolean is_advancedSweep_SweepPlane_SmallestDistFirst()
{
return this.advancedSweep_SweepPlane_SmallestDistFirst;
}
public boolean is_advancedSweep_SweepRotate_Use()
{
return this.advancedSweep_SweepRotate_Use;
}
public double get_advancedSweep_SweepRotate_maxAngle()
{
return this.advancedSweep_SweepRotate_maxAngle;
}
public boolean is_advancedSweep_SweepRotate_SmallestDistFirst()
{
return this.advancedSweep_SweepRotate_SmallestDistFirst;
}
public boolean is_advancedSweep_SweepRotate_SmallestAngleFirst()
{
return this.advancedSweep_SweepRotate_SmallestAngleFirst;
}
public boolean is_advancedSweep_SweepRotate_SmallestFaceFirst()
{
return this.advancedSweep_SweepRotate_SmallestFaceFirst;
}
}
package de.hft.stuttgart.citydoctor2.connect.edge;
import de.hft.stuttgart.citydoctor2.connect.edge.CppReferenceHandlingBase;
import de.hft.stuttgart.citydoctor2.connect.edge.NativePointerCastException;
public class AutoProSettingsBool extends CppReferenceHandlingBase {
private native long createCppClass(
boolean useBool,
boolean printBoolInfo,
boolean exportIntermediateStages,
boolean useMinkowski,
boolean printMinkowskiInfo,
double minkowksiCubeSize,
boolean rotateMinkowskiCube
)
throws OutOfMemoryError;
private native void disposeCppClass(long ptrToCppAutoPro)
throws NativePointerCastException;
private boolean useBool;
private boolean printBoolInfo;
private boolean exportIntermediateStages;
private boolean useMinkowski;
private boolean printMinkowskiInfo;
private double minkowskiCubeSize;
private boolean rotateMinkowskiCube;
public AutoProSettingsBool() {
setUseBool(false);
setPrintBoolInfo(false);
setExportIntermediateStages(false);
setUseMinkowski(false);
setPrintMinkowskiInfo(false);
setMinkowskiCubeSize(2.2);
setRotateMinkowskiCube(false);
}
/**
* Creates an C++ feature object
*
* @throws IllegalStateException
* Thrown if the encapsulated "long-Pointer" isn't 0
* @throws NativeOutOfMemoryException
* If there is no more memory on the native side
*
* @see {@link disposeCppObject}
* @see de.hft.stuttgart.citydoctor.connect.edGe.CppReferenceHandlingBase#createCppObject()
*/
public void createCppObject() throws IllegalStateException,
OutOfMemoryError {
if (0L != ptrToCppObject) {
throw new IllegalStateException(
"Can't create new C++ object, there is allready one!");
}
// Maybe an exception is thrown
long tmpPointer = createCppClass(
isUseBool(),
isPrintBoolInfo(),
isExportIntermediateStages(),
isUseMinkowski(),
isPrintMinkowskiInfo(),
getMinkowskiCubeSize(),
isRotateMinkowskiCube()
);
ptrToCppObject = tmpPointer;
}
@Override
public void disposeCppObject() throws NativePointerCastException {
if (0L != ptrToCppObject) {
disposeCppClass(ptrToCppObject);
ptrToCppObject = 0L;
}
}
public void setUseBool(boolean useBool) {
this.useBool = useBool;
}
public void setPrintBoolInfo(boolean printBoolInfo) {
this.printBoolInfo = printBoolInfo;
}
public void setExportIntermediateStages(boolean exportIntermediateStages) {
this.exportIntermediateStages = exportIntermediateStages;
}
public void setUseMinkowski(boolean useMinkowski) {
this.useMinkowski = useMinkowski;
}
public void setPrintMinkowskiInfo(boolean printMinkowskiInfo) {
this.printMinkowskiInfo = printMinkowskiInfo;
}
public void setMinkowskiCubeSize(double minkowskiCubeSize) {
this.minkowskiCubeSize = minkowskiCubeSize;
}
public void setRotateMinkowskiCube(boolean rotateMinkowskiCube) {
this.rotateMinkowskiCube = rotateMinkowskiCube;
}
public boolean isUseBool() {
return useBool;
}
public boolean isPrintBoolInfo() {
return printBoolInfo;
}
public boolean isExportIntermediateStages() {
return exportIntermediateStages;
}
public boolean isUseMinkowski() {
return useMinkowski;
}
public boolean isPrintMinkowskiInfo() {
return printMinkowskiInfo;
}
public double getMinkowskiCubeSize() {
return minkowskiCubeSize;
}
public boolean isRotateMinkowskiCube() {
return rotateMinkowskiCube;
}
}
package de.hft.stuttgart.citydoctor2.connect.edge;
import de.hft.stuttgart.citydoctor2.connect.edge.CppReferenceHandlingBase;
import de.hft.stuttgart.citydoctor2.connect.edge.NativePointerCastException;
public class AutoProSettingsExport extends CppReferenceHandlingBase {
private native long createCppClass(
boolean exportMesh,
String meshFileName,
String meshFilePath,
boolean exportIV,
String ivFileName,
String ivFilePath,
boolean exportSTEP,
String stepFileName,
String stepFilePath,
boolean exportCityGML,
String cityGMLFileName,
String cityGMLFilePath,
boolean exportValidBuildingsOnly,
boolean moveBuildingsToOrigin,
boolean exportIntermediateStagesComplete,
boolean oneSolidPerBuilding,
double minDistToOrigin_X,
double minDistToOrigin_Y,
double minDistToOrigin_Z
)
throws OutOfMemoryError;
private native void disposeCppClass(long ptrToCppAutoPro)
throws NativePointerCastException;
private boolean exportMesh;
private String meshFileName;
private String meshFilePath;
private boolean exportIV;
private String ivFileName;
private String ivFilePath;
private boolean exportSTEP;
private String stepFileName;
private String stepFilePath;
private boolean exportCityGML;
private String cityGMLFileName;
private String cityGMLFilePath;
private boolean exportValidBuildingsOnly;
private boolean moveBuildingsToOrigin;
private boolean exportIntermediateStagesComplete;
private boolean oneSolidPerBuilding;
double minDistToOrigin_X;
double minDistToOrigin_Y;
double minDistToOrigin_Z;
public AutoProSettingsExport() {
setExportMesh(false);
setMeshFileName("");
setMeshFilePath("");
setExportIV(false);
setIVFileName("");
setIVFilePath("");
setExportSTEP(false);
setSTEPFileName("");
setSTEPFilePath("");
setExportCityGML(false);
setCityGMLFileName("");
setCityGMLFilePath("");
setExportValidBuildingsOnly(false);
setMoveBuildingsToOrigin(false);
setExportIntermediateStagesComplete(false);
setExportStepWithOneSolidPerBuilding(false);
setMinDistToOrigin_X(0);
setMinDistToOrigin_Y(0);
setMinDistToOrigin_Z(0);
}
/**
* Creates an C++ feature object
*
* @throws IllegalStateException
* Thrown if the encapsulated "long-Pointer" isn't 0
* @throws NativeOutOfMemoryException
* If there is no more memory on the native side
*
* @see {@link disposeCppObject}
* @see de.hft.stuttgart.citydoctor.connect.edGe.CppReferenceHandlingBase#createCppObject()
*/
public void createCppObject() throws IllegalStateException,
OutOfMemoryError {
if (0L != ptrToCppObject) {
throw new IllegalStateException(
"Can't create new C++ object, there is allready one!");
}
// Maybe an exception is thrown
long tmpPointer = createCppClass(
isExportMesh(),
getMeshFileName(),
getMeshFilePath(),
isExportIV(),
getIVFileName(),
getIVFilePath(),
isExportSTEP(),
getSTEPFileName(),
getSTEPFilePath(),
isExportCityGML(),
getCityGMLFileName(),
getCityGMLFilePath(),
getExportValidBuildingsOnly(),
getMoveBuildingsToOrigin(),
getExportIntermediateStagesComplete(),
getExportStepWithOneSolidPerBuilding(),
getMinDistToOrigin_X(),
getMinDistToOrigin_Y(),
getMinDistToOrigin_Z()
);
ptrToCppObject = tmpPointer;
}
@Override
public void disposeCppObject() throws NativePointerCastException {
if (0L != ptrToCppObject) {
disposeCppClass(ptrToCppObject);
ptrToCppObject = 0L;
}
}
public void setExportMesh(boolean exportMesh) {
this.exportMesh = exportMesh;
}
public void setMeshFileName(String meshFileName) {
this.meshFileName = meshFileName;
}
public void setMeshFilePath (String meshFilePath) {
this.meshFilePath = meshFilePath;
}
public void setExportIV(boolean exportIV) {
this.exportIV = exportIV;
}
public void setIVFileName(String ivFileName) {
this.ivFileName = ivFileName;
}
public void setIVFilePath (String ivFilePath) {
this.ivFilePath = ivFilePath;
}
public void setExportSTEP(boolean exportSTEP) {
this.exportSTEP = exportSTEP;
}
public void setSTEPFileName(String stepFileName) {
this.stepFileName = stepFileName;
}
public void setSTEPFilePath (String stepFilePath) {
this.stepFilePath = stepFilePath;
}
public void setExportCityGML(boolean exportCityGML) {
this.exportCityGML = exportCityGML;
}
public void setCityGMLFileName(String cityGMLFileName) {
this.cityGMLFileName = cityGMLFileName;
}
public void setCityGMLFilePath(String cityGMLFilePath) {
this.cityGMLFilePath = cityGMLFilePath;
}
public void setExportValidBuildingsOnly(boolean exportValidBuildingsOnly) {
this.exportValidBuildingsOnly = exportValidBuildingsOnly;
}
public void setMoveBuildingsToOrigin(boolean moveBuildingsToOrigin) {
this.moveBuildingsToOrigin = moveBuildingsToOrigin;
}
public void setExportIntermediateStagesComplete(boolean exportIntermediateStagesComplete) {
this.exportIntermediateStagesComplete = exportIntermediateStagesComplete;
}
public void setExportStepWithOneSolidPerBuilding(boolean oneSolidPerBuilding) {
this.oneSolidPerBuilding = oneSolidPerBuilding;
}
public void setMinDistToOrigin_X(double minDistToOrigin_X) {
this.minDistToOrigin_X = minDistToOrigin_X;
}
public void setMinDistToOrigin_Y(double minDistToOrigin_Y) {
this.minDistToOrigin_Y = minDistToOrigin_Y;
}
public void setMinDistToOrigin_Z(double minDistToOrigin_Z) {
this.minDistToOrigin_Z = minDistToOrigin_Z;
}
public boolean isExportMesh() {
return exportMesh;
}
public String getMeshFileName() {
return meshFileName;
}
public String getMeshFilePath () {
return meshFilePath;
}
public boolean isExportIV() {
return exportIV;
}
public String getIVFileName() {
return ivFileName;
}
public String getIVFilePath () {
return ivFilePath;
}
public boolean isExportSTEP() {
return exportSTEP;
}
public String getSTEPFileName() {
return stepFileName;
}
public String getSTEPFilePath () {
return stepFilePath;
}
public boolean isExportCityGML() {
return exportCityGML;
}
public String getCityGMLFileName() {
return cityGMLFileName;
}
public String getCityGMLFilePath() {
return cityGMLFilePath;
}
public boolean getExportValidBuildingsOnly() {
return exportValidBuildingsOnly;
}
public boolean getMoveBuildingsToOrigin() {
return moveBuildingsToOrigin;
}
public boolean getExportIntermediateStagesComplete() {
return exportIntermediateStagesComplete;
}
public boolean getExportStepWithOneSolidPerBuilding() {
return oneSolidPerBuilding;
}
public double getMinDistToOrigin_X() {
return minDistToOrigin_X;
}
public double getMinDistToOrigin_Y() {
return minDistToOrigin_Y;
}
public double getMinDistToOrigin_Z() {
return minDistToOrigin_Z;
}
}
package de.hft.stuttgart.citydoctor2.connect.edge;
import de.hft.stuttgart.citydoctor2.connect.edge.CppReferenceHandlingBase;
import de.hft.stuttgart.citydoctor2.connect.edge.NativePointerCastException;
public class AutoProSettingsGeneral extends CppReferenceHandlingBase {
private native long createCppClass(
boolean printBuildingInfo,
boolean printStatus,
boolean printSmallestAngle,
boolean printNumberOFSmallAngles,
double smallAngleTolerance,
boolean printShortestEdge,
boolean printNumberOfShortEdges,
double shortEdgesTolerance,
boolean printVolume,
boolean printNumberOfFacesAndVertices
)
throws OutOfMemoryError;
private native void disposeCppClass(long ptrToCppAutoPro)
throws NativePointerCastException;
private boolean printBuildingInfo;
private boolean printStatus;
private boolean printSmallestAngle;
private boolean printNumberOfSmallAngles;
private double smallAngleTolerance;
private boolean printShortestEdge;
private boolean printNumberOfShortEdges;
private double shortEdgesTolerance;
private boolean printVolume;
private boolean printNumberOfFacesAndVertices;
public AutoProSettingsGeneral() {
setPrintBuildingInfo(false);
setPrintStatus(false);
setPrintSmallestAngle(false);
setPrintNumberOfSmallAngles(false);
setSmallAngleTolerance(0.1);
setPrintShortestEdge(false);
setPrintNumberOfShortEdges(false);
setShortEdgesTolerance(0.1);
setPrintVolume(false);
setPrintNumberOfFacesAndVertices(false);
}
/**
* Creates an C++ feature object
*
* @throws IllegalStateException
* Thrown if the encapsulated "long-Pointer" isn't 0
* @throws NativeOutOfMemoryException
* If there is no more memory on the native side
*
* @see {@link disposeCppObject}
* @see de.hft.stuttgart.citydoctor.connect.edGe.CppReferenceHandlingBase#createCppObject()
*/
public void createCppObject() throws IllegalStateException,
OutOfMemoryError {
if (0L != ptrToCppObject) {
throw new IllegalStateException(
"Can't create new C++ object, there is allready one!");
}
// Maybe an exception is thrown
long tmpPointer = createCppClass(
isPrintBuildingInfo(),
isPrintStatus(),
isPrintSmallestAngle(),
isPrintNumberOfSmallAngles(),
getSmallAngleTolerance(),
isPrintShortestEdge(),
isPrintNumberOfShortEdges(),
getShortEdgesTolerance(),
isPrintVolume(),
isPrintNumberOfFacesAndVertices()
);
ptrToCppObject = tmpPointer;
}
@Override
public void disposeCppObject() throws NativePointerCastException {
if (0L != ptrToCppObject) {
disposeCppClass(ptrToCppObject);
ptrToCppObject = 0L;
}
}
public void setPrintBuildingInfo(boolean printBuildingInfo) {
this.printBuildingInfo = printBuildingInfo;
}
public void setPrintStatus(boolean printStatus) {
this.printStatus = printStatus;
}
public void setPrintSmallestAngle(boolean printSmallestAngle) {
this.printSmallestAngle = printSmallestAngle;
}
public void setPrintNumberOfSmallAngles(boolean printNumberOfSmallAngles) {
this.printNumberOfSmallAngles = printNumberOfSmallAngles;
}
public void setSmallAngleTolerance(double smallAngleTolerance) {
this.smallAngleTolerance = smallAngleTolerance;
}
public void setPrintShortestEdge(boolean printShortestEdge) {
this.printShortestEdge = printShortestEdge;
}
public void setPrintNumberOfShortEdges(boolean printNumberOfShortEdges) {
this.printNumberOfShortEdges = printNumberOfShortEdges;
}
public void setShortEdgesTolerance(double shortEdgesTolerance) {
this.shortEdgesTolerance = shortEdgesTolerance;
}
public void setPrintVolume(boolean printVolume) {
this.printVolume = printVolume;
}
public void setPrintNumberOfFacesAndVertices(boolean printNumberOfFacesAndVertices) {
this.printNumberOfFacesAndVertices = printNumberOfFacesAndVertices;
}
public boolean isPrintBuildingInfo() {
return printBuildingInfo;
}
public boolean isPrintStatus() {
return printStatus;
}
public boolean isPrintSmallestAngle() {
return printSmallestAngle;
}
public boolean isPrintNumberOfSmallAngles() {
return printNumberOfSmallAngles;
}
public double getSmallAngleTolerance() {
return smallAngleTolerance;
}
public boolean isPrintShortestEdge() {
return printShortestEdge;
}
public boolean isPrintNumberOfShortEdges() {
return printNumberOfShortEdges;
}
public double getShortEdgesTolerance() {
return shortEdgesTolerance;
}
public boolean isPrintVolume() {
return printVolume;
}
public boolean isPrintNumberOfFacesAndVertices() {
return printNumberOfFacesAndVertices;
}
}
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