00001 #ifndef OPENTISSUE_CORE_FUNCTION_IMPLICIT_FUNCTION_H 00002 #define OPENTISSUE_CORE_FUNCTION_IMPLICIT_FUNCTION_H 00003 // 00004 // OpenTissue Template Library 00005 // - A generic toolbox for physics-based modeling and simulation. 00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. 00007 // 00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php 00009 // 00010 #include <OpenTissue/configuration.h> 00011 00012 00013 namespace OpenTissue 00014 { 00015 00016 namespace function 00017 { 00028 template<typename math_types > 00029 class ImplicitFunction 00030 { 00031 public: 00032 00033 virtual ~ImplicitFunction() {} 00034 00035 public: 00036 00037 typedef typename math_types::real_type real_type; 00038 typedef typename math_types::vector3_type vector3_type; 00039 00040 public: 00041 00049 virtual real_type evaluate(vector3_type const & x) const = 0; 00050 00055 virtual vector3_type gradient(vector3_type const & x) const = 0; 00056 00057 }; 00058 00059 } // namespace function 00060 00061 } // namespace OpenTissue 00062 00063 //OPENTISSUE_CORE_FUNCTION_IMPLICIT_FUNCTION_H 00064 #endif