コード例 #1
0
Foam::point Foam::CatmullRomSpline::position(const scalar mu) const
{
    // endpoints
    if (mu < SMALL)
    {
        return points()[0];
    }
    else if (mu > 1 - SMALL)
    {
        return points()[points().size()-1];
    }

    scalar lambda = mu;
    label segment = localParameter(lambda);
    return position(segment, lambda);
}
コード例 #2
0
ファイル: BSpline.C プロジェクト: OpenFOAM/OpenFOAM-dev
Foam::point Foam::BSpline::position(const scalar mu) const
{
    // endpoints
    if (mu < small)
    {
        return points().first();
    }
    else if (mu > 1 - small)
    {
        return points().last();
    }

    scalar lambda = mu;
    label segment = localParameter(lambda);
    return position(segment, lambda);
}
コード例 #3
0
ファイル: polyLine.C プロジェクト: BarisCumhur/OpenFOAM-dev
Foam::point Foam::polyLine::position(const scalar mu) const
{
    // Check end-points
    if (mu < SMALL)
    {
        return points_.first();
    }
    else if (mu > 1 - SMALL)
    {
        return points_.last();
    }

    scalar lambda = mu;
    label segment = localParameter(lambda);
    return position(segment, lambda);
}
コード例 #4
0
ファイル: polyLine.C プロジェクト: Haider-BA/foam-extend-3.0
Foam::point Foam::polyLine::position(const scalar mu) const
{
    // check endpoints
    if (mu < SMALL)
    {
        return points_[0];
    }
    else if (mu > 1 - SMALL)
    {
        return points_[points_.size()-1];
    }


    scalar lambda = mu;
    label segment = localParameter(lambda);
    return position(segment, lambda);
}