-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
* Added folder structure and script to request CityJSON from a BAG ID * Added events as described in the package guidelines, still kept option for direct interaction. Added sample scene * Started adding CityJSON parser * Finished basic parser and exporter. still need to add semantics in geometry * Added Parsing semantics and exporting them again * Added semantic null propagation * Removed comments, checked if custom types are processed correctly * Added comments for null propagation of Semantics Values * Started adding CityJSON visualizer * Added default material, fixed mesh direction, removed vertexOffset * added serialized option to use json center as relative RD center * removed prints * Added vertex transform processing * Removed Write Text File script * cleanup * Removed duplicate vertices from the export * Fixed vertex indexing, added geographical extents to metadata node * Started adding annotation functionality * Annotations can be typed and are added to the CityJSON Export * added option for local/global id * Added annotation markers and tooltips * Added upload scripts and assets * Cleanup * Fixed hierarchy to allow for uploading exports. Authentication token not included * Started adding comments * Added missing comments, minor fixes * Fixed sample scenes * Separated Poly2Mesh into a separate dependency in ThirdPartyTools. T3DPipeline and SelectionTools now depend on this. Used version from SelectionTools because this version had some additions. * - A CityJSON with an empty vertex list will now no longer throw an error. it will give a warning that any visualisation will create empty meshes. - Removed deleted script from Scene - added todo for MultiPoint and MultiLineString mesh creation * moved T3D samples into samples~ * added samples path to package.json * Fixed missing reference Co-authored-by: Sam Baas <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Netherlands3D.Events; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.Events; | ||
|
||
namespace Netherlands3D.Core | ||
{ | ||
public class Vector3EventListener : MonoBehaviour | ||
{ | ||
[SerializeField] | ||
private Vector3Event onEvent; | ||
|
||
[SerializeField] | ||
private Vector3ValueUnityEvent trigger; | ||
|
||
void Awake() | ||
{ | ||
if (onEvent) | ||
{ | ||
onEvent.started.AddListener(Invoke); | ||
} | ||
} | ||
|
||
public void Invoke(Vector3 value) | ||
{ | ||
trigger.Invoke(value); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 82f328a3b0832b641bb6be0a57ec68a9, type: 3} | ||
m_Name: CityJSONParsed | ||
m_EditorClassIdentifier: | ||
eventName: | ||
description: | ||
started: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
received: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
cancelled: | ||
m_PersistentCalls: | ||
m_Calls: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 82f328a3b0832b641bb6be0a57ec68a9, type: 3} | ||
m_Name: CityJSONVisualized | ||
m_EditorClassIdentifier: | ||
eventName: | ||
description: | ||
started: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
received: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
cancelled: | ||
m_PersistentCalls: | ||
m_Calls: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: a6319a1c876ebd247a42bdca122ae5c3, type: 3} | ||
m_Name: JSONBagReceived | ||
m_EditorClassIdentifier: | ||
eventName: | ||
description: | ||
started: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
received: | ||
m_PersistentCalls: | ||
m_Calls: [] | ||
cancelled: | ||
m_PersistentCalls: | ||
m_Calls: [] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using SimpleJSON; | ||
|
||
namespace Netherlands3D.T3DPipeline | ||
{ | ||
/// <summary> | ||
/// Class to hold an annotation that can be added to a building. | ||
/// </summary> | ||
public class Annotation | ||
{ | ||
public int Id; // An annotation has to have an id that is unique per CityObject. It may be unique globally for all CityObjects but this is not required. | ||
public string Text { get; set; } // The text of the annotation | ||
public Vector3Double Position { get; private set; } //the position of the Annotation on the building | ||
|
||
public Annotation(int id, string text, Vector3Double position) | ||
{ | ||
Id = id; | ||
Text = text; | ||
Position = position; | ||
} | ||
|
||
public JSONNode GetJSONNode() | ||
{ | ||
var annotation = new JSONObject(); | ||
var point = new JSONArray(); | ||
point.Add("x", Position.x); | ||
point.Add("y", Position.y); | ||
point.Add("z", Position.z); | ||
annotation.Add("position", point); | ||
annotation.Add("text", Text); | ||
return annotation; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.