Verified Commit 93bccd16 authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Moving context writing to the individual semantic behaviours, adding extents.

parent 0dc3687b
......@@ -314,6 +314,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Lamp
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &72409654
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -610,6 +612,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &206085100
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -655,6 +659,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Floor
showExtents: 0
showOccupancyGrid: 0
--- !u!54 &233609477
Rigidbody:
m_ObjectHideFlags: 0
......@@ -876,6 +882,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#PhysicalPlace
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &266244856
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -1166,6 +1174,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Ceiling
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &354212942
BoxCollider:
m_ObjectHideFlags: 0
......@@ -1420,6 +1430,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &385145546
BoxCollider:
m_ObjectHideFlags: 0
......@@ -1818,6 +1830,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Window
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &403154017
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2229,6 +2243,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Window
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &486434705
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2336,6 +2352,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &491616700
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2528,6 +2546,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Drawer
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &562335847
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2554,6 +2574,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &562335849
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -2741,6 +2763,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &591176981
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3030,6 +3054,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Drawer
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &673992306
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3056,6 +3082,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &673992308
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3088,6 +3116,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &679120271
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3190,6 +3220,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &689074822
BoxCollider:
m_ObjectHideFlags: 0
......@@ -3367,6 +3399,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Entity
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &705507998
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3399,6 +3433,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Sink
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &727899288
BoxCollider:
m_ObjectHideFlags: 0
......@@ -3452,6 +3488,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &727899292
BoxCollider:
m_ObjectHideFlags: 0
......@@ -3664,6 +3702,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &747210192
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -3870,6 +3910,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &795689514
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4126,6 +4168,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Apple
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &851663885
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4243,6 +4287,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Window
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &853770465
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4275,6 +4321,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &868937601
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4509,6 +4557,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &881902529
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4794,6 +4844,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Rack
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &956961678
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -4921,6 +4973,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Lamp
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &964251525
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -5103,6 +5157,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Stove
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &1008622061
BoxCollider:
m_ObjectHideFlags: 0
......@@ -5288,6 +5344,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Shelf
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1024849837
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -5320,6 +5378,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1026241614
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -5365,6 +5425,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1052582939
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -5832,6 +5894,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Shelf
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1137338310
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -5990,6 +6054,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Refrigerator
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1139129199
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6016,6 +6082,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1139129201
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6042,6 +6110,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1139129203
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6160,6 +6230,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1140816811
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6186,6 +6258,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1140816813
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6338,6 +6412,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1166413354
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -6603,6 +6679,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1217411875
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -7010,6 +7088,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Steam
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1232511663
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -7077,6 +7157,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1238782162
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -7447,6 +7529,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Rack
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1307777421
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -7479,6 +7563,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Cup
showExtents: 0
showOccupancyGrid: 0
--- !u!54 &1331286836
Rigidbody:
m_ObjectHideFlags: 0
......@@ -7961,6 +8047,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Shelf
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1403195201
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -8211,6 +8299,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Room
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1425282732
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -8353,6 +8443,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Lamp
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1444289941
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -8465,6 +8557,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1456574797
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -8819,6 +8913,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Window
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1581413264
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -8890,6 +8986,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Countertop
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1656686362
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -9074,6 +9172,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1724232371
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -9335,6 +9435,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Window
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1767828231
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -9532,6 +9634,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1808417846
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -9696,6 +9800,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1845090568
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -10069,6 +10175,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1887977819
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -10217,6 +10325,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE-OBJ.owl#Lid
showExtents: 0
showOccupancyGrid: 0
--- !u!4 &1903869703 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 777930a286a884240885b925f58479dc,
......@@ -10409,6 +10519,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Table
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1918559640
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -10516,6 +10628,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Chair
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1928384765
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -10650,6 +10764,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &1963336215
BoxCollider:
m_ObjectHideFlags: 0
......@@ -10695,6 +10811,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &1977428287
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -10916,6 +11034,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Shelf
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2002183463
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11028,6 +11148,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Door
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2012739342
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11204,6 +11326,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2072907048
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11249,6 +11373,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Countertop
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2072914416
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11666,6 +11792,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Lamp
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2109312689
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11698,6 +11826,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2125088165
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -11756,6 +11886,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Cupboard
showExtents: 0
showOccupancyGrid: 0
--- !u!65 &2138028497
BoxCollider:
m_ObjectHideFlags: 0
......@@ -11801,6 +11933,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://www.ease-crc.org/ont/EASE.owl#Wall
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &2138746745
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -12090,6 +12224,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
is_a: http://ease-ph.glpages.informatik.uni-bremen.de/dlu/dlu/EASE-DLUext.owl#Lamp
showExtents: 0
showOccupancyGrid: 0
--- !u!114 &8529134863782672058
MonoBehaviour:
m_ObjectHideFlags: 0
......
......@@ -102,14 +102,7 @@ public class JSONHandler
jsonObject = sceneDict[name];
jsonObject["is_a"].Add(sb.is_a);
switch (sb)
{
case Entity entity: Write(jsonObject, entity); break;
case DesignedContainer designedContainer: Write(jsonObject, designedContainer); break;
default:
Debug.LogWarning($"No Write handler for SemanticBehaviour \"{sb.GetType().Name}\"");
break;
}
sb.WriteTo(jsonObject);
}
JSONObject metaObject = new JSONObject();
......@@ -119,47 +112,6 @@ public class JSONHandler
contextObject.Add("context", sceneArray);
return contextObject;
}
private static void Write(JSONObject jsonObject, Entity entity)
{
JSONObject transform = new JSONObject();
transform["position"] = entity.transform.position;
transform["orientation"] = entity.transform.rotation;
jsonObject["components"]["transform"] = transform;
Vector3 scale = entity.transform.lossyScale;
MeshFilter meshFilter = entity.GetComponent<MeshFilter>();
if (meshFilter != null)
{
Mesh mesh = meshFilter.sharedMesh;
Vector3 boundsCenterWorld = mesh.bounds.center;
boundsCenterWorld.Scale(scale);
Vector3 boundsExtentsWorld = mesh.bounds.center;
boundsExtentsWorld.Scale(scale);
Vector3 boundsSizeWorld = mesh.bounds.center;
boundsSizeWorld.Scale(scale);
JSONObject bounds = new JSONObject();
bounds["center"] = boundsCenterWorld;
bounds["extents"] = boundsExtentsWorld;
bounds["size"] = boundsSizeWorld;
jsonObject["components"]["bounds"] = bounds;
}
}
private static void Write(JSONObject jsonObject, DesignedContainer designedContainer)
{
JSONArray containment = new JSONArray();
foreach (Collider collider in designedContainer.containmentParts)
{
JSONObject part = new JSONObject();
part.Add("type", collider.GetType().Name);
part.Add("center", collider.bounds.center);
part.Add("size", collider.bounds.size);
part.Add("extents", collider.bounds.extents);
containment.Add(part);
}
jsonObject["components"]["containerVolume"] = containment;
}
}