From d0dc7ff35d71919d503ae35592478b173cf3cfd3 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 10 Jun 2019 23:45:04 -0400
Subject: [PATCH] Extract big data.

---
 Object3D.java |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 2c2cf4d..af581bd 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -163,6 +163,59 @@
     }
 }
 
+void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
+{
+    if (hashtable.containsKey(GetUUID()))
+        return;
+    
+    Object3D o = new Object3D();
+    o.bRep = this.bRep;
+    if (this.bRep != null)
+    {
+        o.transientrep = this.bRep.support;
+        o.bRep.support = null;
+    }
+    
+//    o.support = this.support;
+//    o.fileparent = this.fileparent;
+//    if (this.bRep != null)
+//        o.bRep = this.bRep.support;
+    
+    hashtable.put(GetUUID(), o);
+    
+    this.bRep = null;
+//    if (this.bRep != null)
+//        this.bRep.support = null;
+//    this.support = null;
+//    this.fileparent = null;
+    
+    for (int i=0; i<Size(); i++)
+    {
+        get(i).ExtractBigData(hashtable);
+    }
+}
+
+void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
+{
+    if (!hashtable.containsKey(GetUUID()))
+        return;
+    
+    Object3D o = hashtable.get(GetUUID());
+    
+    this.bRep = o.bRep;
+    if (this.bRep != null)
+        this.bRep.support = o.transientrep;
+//    this.support = o.support;
+//    this.fileparent = o.fileparent;
+    
+    hashtable.remove(GetUUID());
+    
+    for (int i=0; i<Size(); i++)
+    {
+        get(i).RestoreBigData(hashtable);
+    }
+}
+
 // MOCAP SUPPORT
     double tx,ty,tz,rx,ry,rz;
     
@@ -7567,7 +7620,7 @@
 	/*transient*/ cVector2[] projectedVertices = new cVector2[0];
         
     Object3D /*Composite*/ parent;
-    Object3D /*Composite*/ fileparent;
+    Object3D /*Composite*/ fileparent; // In the case of FileObject
     
     double[][] toParent; // dynamic matrix
     double[][] fromParent;

--
Gitblit v1.6.2