aboutsummaryrefslogtreecommitdiff
path: root/src/Bounds.hh
diff options
context:
space:
mode:
authortradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef>2000-09-13 13:49:13 +0000
committertradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef>2000-09-13 13:49:13 +0000
commit8fe367ecf2cbda79960a68a052fdb84916427c0e (patch)
tree45c017765ab7f0eb6caf97540fc76ffd3bffba59 /src/Bounds.hh
parentc490022d592551af7c29bc960cbbc09daf45972d (diff)
Importing latest stuff from development repository
git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/FlexIO/trunk@2 21a6bef8-4479-4f54-8f8d-0db94a2919ef
Diffstat (limited to 'src/Bounds.hh')
-rw-r--r--src/Bounds.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Bounds.hh b/src/Bounds.hh
new file mode 100644
index 0000000..df7b9f3
--- /dev/null
+++ b/src/Bounds.hh
@@ -0,0 +1,18 @@
+#ifndef __BOUNDS_HH_
+#define __BOUNDS_HH_
+
+struct Bounds {
+ double min[3],max[3];
+ void setFromExtents(double *p1,double *p2);
+ void setFromOriginDx(double *origin,double *dx,int *dims);
+ int contains(double point[3]);
+ // uses restricted assumption that box is entirely inside or
+ // entirely outside its parent
+ inline int contains(Bounds &b){
+ if(contains(b.min) && contains(b.max)) return 1;
+ else return 0;
+ }
+};
+
+#endif
+