From f304380ab6d12ca1c40f4cf379b5ef1ded7a677c Mon Sep 17 00:00:00 2001
From: Richard Marcus <richard.marcus@fau.de>
Date: Fri, 14 Feb 2020 00:40:58 +0100
Subject: [PATCH] new facts, wip

---
 Assets/FactManager.cs            | 6 ++++++
 Assets/InteractionEngine/Fact.cs | 1 +
 2 files changed, 7 insertions(+)

diff --git a/Assets/FactManager.cs b/Assets/FactManager.cs
index ad5ff06c..4f6c0f7d 100644
--- a/Assets/FactManager.cs
+++ b/Assets/FactManager.cs
@@ -39,6 +39,7 @@ void Update()
 
     }
 
+    //TODO: change the return find....
     PointFact AddPointFact(RaycastHit hit, int id)
     {
         Facts.Insert(id, new PointFact(id, hit.point, hit.normal));
@@ -55,6 +56,11 @@ RayFact AddRayFact(int pid1, int pid2, int id)
     {
         Facts.Insert(id, new RayFact(id, pid1, pid2));
 
+        var oPid = GetFirstEmptyID();
+        Facts.Insert(oPid, new RayFact(id, pid1, pid2));
+        oPid = GetFirstEmptyID();
+        Facts.Insert(oPid, new RayFact(id, pid1, pid2));
+
         return Facts.Find(x => x.Id == id) as RayFact;
     }
 
diff --git a/Assets/InteractionEngine/Fact.cs b/Assets/InteractionEngine/Fact.cs
index ebc00223..5c050764 100644
--- a/Assets/InteractionEngine/Fact.cs
+++ b/Assets/InteractionEngine/Fact.cs
@@ -73,6 +73,7 @@ public PointFact(int i, float a, float b, float c, string uri)
 
 public class OpenLineFact : Fact
 {
+    //R: this is called RayFact for now (see below), feel free to change
     //an infinite Line through the Points Pid1 and Pid2
     public int Pid1, Pid2;
 }
-- 
GitLab