Skip to content

Commit cde3413

Browse files
authored
Merge pull request #41 from victorhu3/custom-area4
added boundingObjects to custom room4
2 parents ab6667c + a27fa6e commit cde3413

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

public/javascripts/sim_editor/sim_editor.2023.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,7 @@ app.controller('SimEditorController', ['$scope', '$uibModal', '$log', '$http','$
22802280
fullContPoints = [];
22812281
for (let i = 0; i < contours.size(); i++) {
22822282
outputStr +=
2283-
"DEF CURVED Shape { \nappearance Appearance { \nmaterial Material { \ndiffuseColor 0.2 0.47 0.52 \n} \n}\ngeometry IndexedFaceSet { \ncoord Coordinate { \npoint [\n";
2283+
"Solid {\n children [\n DEF CURVED" + String(i) + " Shape { \nappearance Appearance { \nmaterial Material { \ndiffuseColor 0.2 0.47 0.52 \n} \n}\ngeometry IndexedFaceSet { \ncoord Coordinate { \npoint [\n";
22842284

22852285
let contour = contours.get(i);
22862286
let points = contour.data32S;
@@ -2320,7 +2320,9 @@ app.controller('SimEditorController', ['$scope', '$uibModal', '$log', '$http','$
23202320
"-1,";
23212321
for (let j = 0; j < contPoints.length; j++)
23222322
outputStr += (j * 2 + 1).toString() + ",";
2323-
outputStr += "-1,\n]\n}\n}";
2323+
outputStr += "-1,\n]\n}\n}\n]\n" +
2324+
"boundingObject USE CURVED" + String(i) +
2325+
"\nname \"curved" + String(i) + "\"\n}";
23242326
}
23252327
outputStr += '\n]\n}\n';
23262328

0 commit comments

Comments
 (0)