Skip to content
Snippets Groups Projects
Commit c309a911 authored by terry-norbraten's avatar terry-norbraten
Browse files

align closing lineset tag

parent e3f14948
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ public class X3dCreateLineSet { ...@@ -29,7 +29,7 @@ public class X3dCreateLineSet {
private double firstLocalY = 0; private double firstLocalY = 0;
private double firstLocalZ = 0; private double firstLocalZ = 0;
private LinkedHashMap<Double, X3dCoordinates> testMap = new LinkedHashMap<>(); private Map<Double, X3dCoordinates> testMap = new LinkedHashMap<>();
//Setting up a NumberFormatter for limitting the decimal count to 3 //Setting up a NumberFormatter for limitting the decimal count to 3
private NumberFormat coordinateNumberFormat = NumberFormat.getInstance(new Locale("en", "US")); private NumberFormat coordinateNumberFormat = NumberFormat.getInstance(new Locale("en", "US"));
...@@ -74,7 +74,6 @@ public class X3dCreateLineSet { ...@@ -74,7 +74,6 @@ public class X3dCreateLineSet {
if (firstTimeStamp) { if (firstTimeStamp) {
firstLocalTimeStamp = localPdu.getTimestamp(); firstLocalTimeStamp = localPdu.getTimestamp();
// localTimeStamp = localPdu.getTimestamp();
firstLocalX = localEspdu.getEntityLocation().getX(); firstLocalX = localEspdu.getEntityLocation().getX();
firstLocalY = localEspdu.getEntityLocation().getZ(); firstLocalY = localEspdu.getEntityLocation().getZ();
firstLocalZ = -1 * localEspdu.getEntityLocation().getY(); firstLocalZ = -1 * localEspdu.getEntityLocation().getY();
...@@ -102,11 +101,8 @@ public class X3dCreateLineSet { ...@@ -102,11 +101,8 @@ public class X3dCreateLineSet {
//Only add to stream if it is an ESPDU //Only add to stream if it is an ESPDU
//ToDo: Add support for multiple Entities //ToDo: Add support for multiple Entities
if ((localPdu.getPduType() != null) && (localPdu.getPduType() == DISPDUType.ENTITY_STATE)) { if ((localPdu.getPduType() != null) && (localPdu.getPduType() == DISPDUType.ENTITY_STATE))
testMap.put(localTimeStamp, new X3dCoordinates(localX, localY, localZ, 0.0, 0.0, 0.0)); testMap.put(localTimeStamp, new X3dCoordinates(localX, localY, localZ, 0.0, 0.0, 0.0));
}
} }
} }
...@@ -131,11 +127,8 @@ public class X3dCreateLineSet { ...@@ -131,11 +127,8 @@ public class X3dCreateLineSet {
for (Double k : keys) { for (Double k : keys) {
if (k > lastTimeStamp) { if (k > lastTimeStamp)
lastTimeStamp = k; lastTimeStamp = k;
}
} }
//Normalize all times in the set //Normalize all times in the set
...@@ -160,23 +153,18 @@ public class X3dCreateLineSet { ...@@ -160,23 +153,18 @@ public class X3dCreateLineSet {
//Setting up PositionInterpolator and OrientationInterpolator //Setting up PositionInterpolator and OrientationInterpolator
for (Double k : keys) { for (Double k : keys)
lineSetPoints += keyKeyValueSetPositionInterpolator.get(k) + " "; lineSetPoints += keyKeyValueSetPositionInterpolator.get(k) + " ";
}
lineSetPoints += "' "; lineSetPoints += "' ";
//PositionInterpolator //PositionInterpolator
lineSet += lineSetPoints; lineSet += lineSetPoints;
lineSet += "/> \n </LineSet> \n"; lineSet += "/>\n</LineSet> \n";
//Printing PositionInterpolator to the console //Printing PositionInterpolator to the console
System.out.println(lineSet); System.out.println(lineSet);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment