Ejemplo n.º 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);
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
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);
}
Ejemplo n.º 4
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);
}