https://gitlab.opengeosys.org/ogs/ogs.git
Revision 37d27f636a4c7772e95b9339c86c20a6df16c95c authored by Wenqing Wang on 18 May 2021, 15:10:16 UTC, committed by Dmitry Yu. Naumov on 07 October 2021, 21:11:23 UTC
1 parent 013d8bd
Raw File
Tip revision: 37d27f636a4c7772e95b9339c86c20a6df16c95c authored by Wenqing Wang on 18 May 2021, 15:10:16 UTC
[UnitTest] Added a test for getElementRotationMatrices with 3D mesh
Tip revision: 37d27f6
TemplateWeightedPoint.h
/**
 * \file
 * \date Sep 3, 2013
 * \brief Weighted point class.
 *
 * \copyright
 * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 */

#pragma once

#include "TemplatePoint.h"

namespace MathLib
{

template <typename FP_T, typename W_T, std::size_t DIM>
class TemplateWeightedPoint : public TemplatePoint<FP_T, DIM>
{
public:
    TemplateWeightedPoint(std::array<FP_T, DIM> const& x, W_T weight)
        : TemplatePoint<FP_T, DIM>(x), weight_(weight)
    {}

    W_T getWeight() const { return weight_; }

private:
    W_T const weight_;
};

using WeightedPoint1D = TemplateWeightedPoint<double, double, 1>;
using WeightedPoint2D = TemplateWeightedPoint<double, double, 2>;
using WeightedPoint3D = TemplateWeightedPoint<double, double, 3>;

} // end namespace MathLib
back to top