[cig-commits] r13818 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Mon Jan 12 14:09:38 PST 2009


Author: luis
Date: 2009-01-12 14:09:38 -0800 (Mon, 12 Jan 2009)
New Revision: 13818

Modified:
   cs/cigma/trunk/src/Cell.cpp
   cs/cigma/trunk/src/Cell.h
Log:
Calculate cell bounds by using existing bbox method

Modified: cs/cigma/trunk/src/Cell.cpp
===================================================================
--- cs/cigma/trunk/src/Cell.cpp	2009-01-12 22:09:36 UTC (rev 13817)
+++ cs/cigma/trunk/src/Cell.cpp	2009-01-12 22:09:38 UTC (rev 13818)
@@ -463,7 +463,22 @@
     minmax(globverts, nno, nsd, min, max);
 }
 
+void Cell::getBounds(double bounds[6])
+{
+    double min[3] = {0,0,0};
+    double max[3] = {0,0,0};
 
+    this->bbox(min, max);
+
+    bounds[0] = min[0];
+    bounds[1] = max[0];
+    bounds[2] = min[1];
+    bounds[3] = max[1];
+    bounds[4] = min[2];
+    bounds[5] = max[2];
+}
+
+
 void Cell::centroid(double c[3])
 {
     const int nno = n_nodes();

Modified: cs/cigma/trunk/src/Cell.h
===================================================================
--- cs/cigma/trunk/src/Cell.h	2009-01-12 22:09:36 UTC (rev 13817)
+++ cs/cigma/trunk/src/Cell.h	2009-01-12 22:09:38 UTC (rev 13818)
@@ -57,6 +57,7 @@
     virtual bool global_interior(double xyz[3]);
 
     void bbox(double *min, double *max);
+    void getBounds(double bounds[6]);
     void centroid(double c[3]);
 
 public:



More information about the CIG-COMMITS mailing list