mirror of https://github.com/CGAL/cgal
Remove pointless template from Zero_gradient
This commit is contained in:
parent
d7bc1ecc21
commit
88c79dc237
|
|
@ -74,7 +74,7 @@ using Implicit_cartesian_grid_domain =
|
|||
*/
|
||||
template <typename GeomTraits,
|
||||
typename PointFunction,
|
||||
typename Gradient_ = Zero_gradient<GeomTraits> >
|
||||
typename Gradient_ = Zero_gradient>
|
||||
Implicit_cartesian_grid_domain<GeomTraits, PointFunction, Gradient_>
|
||||
create_implicit_cartesian_grid_domain(const Bbox_3& bbox,
|
||||
const typename GeomTraits::Vector_3& spacing,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ using Implicit_octree_domain =
|
|||
*/
|
||||
template <typename GeomTraits,
|
||||
typename PointFunction,
|
||||
typename Gradient_ = Zero_gradient<GeomTraits> >
|
||||
typename Gradient_ = Zero_gradient>
|
||||
Implicit_octree_domain<GeomTraits, PointFunction, Gradient_>
|
||||
create_implicit_octree_domain(const std::shared_ptr<internal::Octree_wrapper<GeomTraits> > octree,
|
||||
const PointFunction& point_function,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
#include <CGAL/license/Isosurfacing_3.h>
|
||||
|
||||
#include <CGAL/Origin.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Isosurfacing {
|
||||
|
||||
|
|
@ -23,32 +25,19 @@ namespace Isosurfacing {
|
|||
* \brief Class template for a gradient that is always zero.
|
||||
*
|
||||
* \details This gradient function can be used for Marching Cubes, which does not require a gradient.
|
||||
*
|
||||
* \tparam GeomTraits the traits for this gradient.
|
||||
*/
|
||||
template <typename GeomTraits>
|
||||
class Zero_gradient
|
||||
struct Zero_gradient
|
||||
{
|
||||
public:
|
||||
using Geom_traits = GeomTraits;
|
||||
using Point = typename Geom_traits::Point_3;
|
||||
using Vector = typename Geom_traits::Vector_3;
|
||||
|
||||
public:
|
||||
/**
|
||||
* \ingroup PkgIsosurfacing3Ref
|
||||
*
|
||||
* \brief Evaluate the gradient at a point in space.
|
||||
*
|
||||
* \param point the point at which the gradient is computed
|
||||
* \return the null vector
|
||||
*/
|
||||
Vector operator()(const Point& point) const
|
||||
template <typename P>
|
||||
Null_vector operator()(const P&) const
|
||||
{
|
||||
return zero;
|
||||
return NULL_VECTOR;
|
||||
}
|
||||
|
||||
private:
|
||||
const Vector zero = Vector(0, 0, 0);
|
||||
};
|
||||
|
||||
} // namespace Isosurfacing
|
||||
|
|
|
|||
Loading…
Reference in New Issue