Index: branches/nanovis2/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h
===================================================================
--- branches/nanovis2/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h	(revision 3001)
+++ branches/nanovis2/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h	(revision 3175)
@@ -60,4 +60,6 @@
         if (gobj->getProp())
             _renderer->RemoveViewProp(gobj->getProp());
+        if (gobj->getOverlayProp())
+            _renderer->RemoveViewProp(gobj->getOverlayProp());
         delete gobj;
 
@@ -67,4 +69,23 @@
     initCamera();
     _needsRedraw = true;
+}
+
+template<class GraphicsObject>
+void Renderer::deleteAllGraphicsObjects()
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap =
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    itr = hashmap.begin();
+    if (itr == hashmap.end())
+        return;
+
+    TRACE("Deleting all %s objects", itr->second->getClassName());
+
+    for (; itr != hashmap.end(); ++itr) {
+        delete itr->second;
+    }
+    hashmap.clear();
 }
 
@@ -100,9 +121,13 @@
         gobj->setDataSet(ds, this);
 
-        if (gobj->getProp() == NULL) {
+        if (gobj->getProp() == NULL &&
+            gobj->getOverlayProp() == NULL) {
             delete gobj;
             return false;
         } else {
-            _renderer->AddViewProp(gobj->getProp());
+            if (gobj->getProp())
+                _renderer->AddViewProp(gobj->getProp());
+            if (gobj->getOverlayProp())
+                _renderer->AddViewProp(gobj->getOverlayProp());
         }
 
@@ -233,4 +258,35 @@
     do {
         itr->second->setPosition(pos);
+    } while (doAll && ++itr != hashmap.end());
+
+    resetAxes();
+    _needsRedraw = true;
+}
+
+/**
+ * \brief Set the prop scaling by 2D aspect ratio
+ */
+template<class GraphicsObject>
+void Renderer::setGraphicsObjectAspect(const DataSetId& id, double aspect)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    bool doAll = false;
+
+    if (id.compare("all") == 0) {
+        itr = hashmap.begin();
+        doAll = true;
+    } else {
+        itr = hashmap.find(id);
+    }
+    if (itr == hashmap.end()) {
+        ERROR("%s not found: %s", typeid(GraphicsObject).name(), id.c_str());
+        return;
+    }
+
+    do {
+        itr->second->setAspect(aspect);
     } while (doAll && ++itr != hashmap.end());
 
@@ -709,4 +765,97 @@
 }
 
+template<class GraphicsObject>
+void Renderer::updateGraphicsObjectColorMap(ColorMap *cmap)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        if (itr->second->getColorMap() == cmap) {
+            itr->second->updateColorMap();
+            _needsRedraw = true;
+        }
+    }
+}
+
+template<class GraphicsObject>
+bool Renderer::graphicsObjectColorMapUsed(ColorMap *cmap)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        if (itr->second->getColorMap() == cmap)
+            return true;
+    }
+    return false;
+}
+
+template<class GraphicsObject>
+void Renderer::mergeGraphicsObjectBounds(double *bounds, bool onlyVisible)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        if ((!onlyVisible || itr->second->getVisibility()) &&
+            itr->second->getProp() != NULL)
+            mergeBounds(bounds, bounds, itr->second->getBounds());
+    }
+}
+
+template<class GraphicsObject>
+void Renderer::mergeGraphicsObjectUnscaledBounds(double *bounds, bool onlyVisible)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        if ((!onlyVisible || itr->second->getVisibility()) &&
+            itr->second->getProp() != NULL)
+            mergeBounds(bounds, bounds, itr->second->getUnscaledBounds());
+    }
+}
+
+template<class GraphicsObject>
+void Renderer::updateGraphicsObjectFieldRanges()
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        itr->second->updateRanges(this);
+    }
+}
+
+template<class GraphicsObject>
+void Renderer::setGraphicsObjectClippingPlanes(vtkPlaneCollection *planes)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        itr->second->setClippingPlanes(planes);
+    }
+}
+
+template<class GraphicsObject>
+void Renderer::setGraphicsObjectAspect(double aspectRatio)
+{
+    std::tr1::unordered_map<DataSetId, GraphicsObject *>& hashmap = 
+        getGraphicsObjectHashmap<GraphicsObject>();
+    typename std::tr1::unordered_map<DataSetId, GraphicsObject *>::iterator itr;
+
+    for (itr = hashmap.begin(); itr != hashmap.end(); ++itr) {
+        itr->second->setAspect(aspectRatio);
+    }
+}
+
 }
 }
