![]()
|
volume.h00001 //
00002 // volume.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB. If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027
00028 #ifndef _math_isosurf_volume_h
00029 #define _math_isosurf_volume_h
00030
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034
00035 #include <math/optimize/function.h>
00036 #include <math/scmat/matrix.h>
00037 #include <math/scmat/vector3.h>
00038
00039 namespace sc {
00040
00042 class Volume: public Function {
00043 private:
00044 double _interp_acc;
00045 protected:
00046 double& interpolation_accuracy();
00047
00048 virtual void compute() = 0;
00049
00050 virtual void failure(const char*);
00051 public:
00052 Volume();
00053 Volume(const Ref<KeyVal>&);
00054 ~Volume();
00055
00056 void set_gradient(const SCVector3& g);
00057 void set_gradient(RefSCVector& g);
00058 void get_gradient(SCVector3& g);
00059 void set_x(const SCVector3& x);
00060 void set_x(const RefSCVector& x);
00061 void get_x(SCVector3& x);
00062
00063 // find the corners of a bounding box which approximately
00064 // contains all points with a value between valuemin and valuemax
00065 // the result must satisfy p1[i] < p2[i]
00066 virtual void boundingbox(double valuemin,
00067 double valuemax,
00068 SCVector3& p1, SCVector3& p2) = 0;
00069
00070 virtual void interpolate(const SCVector3& p1,
00071 const SCVector3& p2,
00072 double value,
00073 SCVector3& result);
00074 virtual void solve(const SCVector3& p,
00075 const SCVector3& grad,
00076 double value,
00077 SCVector3& result);
00078 };
00079
00080 }
00081
00082 #ifdef INLINE_FUNCTIONS
00083 #include <math/isosurf/volume_i.h>
00084 #endif
00085
00086 #endif
00087
00088 // Local Variables:
00089 // mode: c++
00090 // c-file-style: "CLJ"
00091 // End:
Generated at Fri Jan 10 08:14:10 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14. |