libigl v2.5.0
Loading...
Searching...
No Matches
igl::cycodebase Namespace Reference

Functions

template<typename DerivedC, typename DerivedB>
void box_cubic (const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedB > &B1, Eigen::PlainObjectBase< DerivedB > &B2)
 Compute the min/max box corners tightly containing a given cubic bezier curve.
template<typename DerivedP, typename DerivedC, typename DerivedB>
void box_cubic (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedB > &B1, Eigen::PlainObjectBase< DerivedB > &B2)
 overload
template<typename DerivedQ, typename DerivedC, typename DerivedsqrD, typename DerivedS, typename DerivedK>
void point_cubic_squared_distance (const Eigen::MatrixBase< DerivedQ > &Q, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedK > &K)
 Compute the squared distance from a set of points to a cubic Bezier curve.
template<typename DerivedQ, typename DerivedC, typename DerivedD, typename DerivedB, typename DerivedsqrD, typename DerivedS, typename DerivedK>
void point_cubic_squared_distance (const Eigen::MatrixBase< DerivedQ > &Q, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedD > &D, const Eigen::MatrixBase< DerivedB > &B, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedK > &K)
 overload
template<typename Derivedq, typename DerivedC, typename DerivedD, typename DerivedB, typename Derivedk>
void point_cubic_squared_distance (const Eigen::MatrixBase< Derivedq > &q, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedD > &D, const Eigen::MatrixBase< DerivedB > &B, typename Derivedq::Scalar &sqrD, typename Derivedq::Scalar &s, Eigen::PlainObjectBase< Derivedk > &k)
 single point overload
template<typename Derivedq, typename DerivedC, typename Derivedk>
void point_cubic_squared_distance (const Eigen::MatrixBase< Derivedq > &q, const Eigen::MatrixBase< DerivedC > &C, typename Derivedq::Scalar &sqrD, typename Derivedq::Scalar &s, Eigen::PlainObjectBase< Derivedk > &k)
 single point overload
template<typename DerivedQ, typename DerivedP, typename DerivedC, typename DerivedsqrD, typename DerivedI, typename DerivedS, typename DerivedK>
void point_spline_squared_distance (const Eigen::MatrixBase< DerivedQ > &Q, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedK > &K)
 Compute the squared distance from a set of points to a spline defined by cubic Bezier curves.
template<typename DerivedQ, typename DerivedP, typename DerivedC, typename DerivedB, typename Derivedleaf, typename DerivedsqrD, typename DerivedI, typename DerivedS, typename DerivedK>
void point_spline_squared_distance (const Eigen::MatrixBase< DerivedQ > &Q, const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedC > &C, const Eigen::MatrixBase< DerivedB > &B1, const Eigen::MatrixBase< DerivedB > &B2, const Eigen::MatrixBase< Derivedleaf > &leaf, Eigen::PlainObjectBase< DerivedsqrD > &sqrD, Eigen::PlainObjectBase< DerivedI > &I, Eigen::PlainObjectBase< DerivedS > &S, Eigen::PlainObjectBase< DerivedK > &K)
 overload with AABB acceleration structure
template<typename Derivedcoef, typename DerivedR>
int roots (const Eigen::MatrixBase< Derivedcoef > &coef, const typename Derivedcoef::Scalar xmin, const typename Derivedcoef::Scalar xmax, Eigen::PlainObjectBase< DerivedR > &R)
 Compute the real roots of a polynomial with given coefficients within a given interval [xmin, xmax].
template<typename DerivedP, typename DerivedC, typename DerivedB, typename Derivedleaf>
void spline_eytzinger_aabb (const Eigen::MatrixBase< DerivedP > &P, const Eigen::MatrixBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedB > &B1, Eigen::PlainObjectBase< DerivedB > &B2, Eigen::PlainObjectBase< Derivedleaf > &leaf)
 Compute an AABB acceleration structure for a spline of cubic Bezier curves in Eytzinger layout.

Function Documentation

◆ box_cubic() [1/2]

template<typename DerivedC, typename DerivedB>
void igl::cycodebase::box_cubic ( const Eigen::MatrixBase< DerivedC > & C,
Eigen::PlainObjectBase< DerivedB > & B1,
Eigen::PlainObjectBase< DerivedB > & B2 )

Compute the min/max box corners tightly containing a given cubic bezier curve.

Parameters
[in]C4 by dim matrix of control points defining the cubic bezier curve
[out]B11 by dim min corner of the bounding box
[out]B21 by dim max corner of the bounding box
See also
igl::box_simplices

◆ box_cubic() [2/2]

template<typename DerivedP, typename DerivedC, typename DerivedB>
void igl::cycodebase::box_cubic ( const Eigen::MatrixBase< DerivedP > & P,
const Eigen::MatrixBase< DerivedC > & C,
Eigen::PlainObjectBase< DerivedB > & B1,
Eigen::PlainObjectBase< DerivedB > & B2 )

overload

Parameters
[in]P#P by dim matrix of control point locations
[in]C#C by 4 matrix of indices into P defining the cubics
[out]B1#C by dim matrix of min corners of the bounding boxes
[out]B2#C by dim matrix of max corners of the bounding boxes

◆ point_cubic_squared_distance() [1/4]

template<typename DerivedQ, typename DerivedC, typename DerivedsqrD, typename DerivedS, typename DerivedK>
void igl::cycodebase::point_cubic_squared_distance ( const Eigen::MatrixBase< DerivedQ > & Q,
const Eigen::MatrixBase< DerivedC > & C,
Eigen::PlainObjectBase< DerivedsqrD > & sqrD,
Eigen::PlainObjectBase< DerivedS > & S,
Eigen::PlainObjectBase< DerivedK > & K )

Compute the squared distance from a set of points to a cubic Bezier curve.

Parameters
[in]Q#Q by dim matrix of query points
[in]C4 by dim matrix of control points defining the cubic bezier curve
[out]sqrD#Q vector of squared distances from each query point to the cubic bezier curve
[out]S#Q vector of parametric locations on the cubic bezier curve of the closest point to each query point
[out]K#Q by dim matrix of closest point locations
See also
igl::cubic_monomial_bases, igl::cycodebase::point_spline_squared_distance

◆ point_cubic_squared_distance() [2/4]

template<typename DerivedQ, typename DerivedC, typename DerivedD, typename DerivedB, typename DerivedsqrD, typename DerivedS, typename DerivedK>
void igl::cycodebase::point_cubic_squared_distance ( const Eigen::MatrixBase< DerivedQ > & Q,
const Eigen::MatrixBase< DerivedC > & C,
const Eigen::MatrixBase< DerivedD > & D,
const Eigen::MatrixBase< DerivedB > & B,
Eigen::PlainObjectBase< DerivedsqrD > & sqrD,
Eigen::PlainObjectBase< DerivedS > & S,
Eigen::PlainObjectBase< DerivedK > & K )

overload

Parameters
[in]D3 by dim matrix of monomial coefficients for dC/dt
[in]B6-vector of inner products of monomial coefficients of C and dCdt

◆ point_cubic_squared_distance() [3/4]

template<typename Derivedq, typename DerivedC, typename DerivedD, typename DerivedB, typename Derivedk>
void igl::cycodebase::point_cubic_squared_distance ( const Eigen::MatrixBase< Derivedq > & q,
const Eigen::MatrixBase< DerivedC > & C,
const Eigen::MatrixBase< DerivedD > & D,
const Eigen::MatrixBase< DerivedB > & B,
typename Derivedq::Scalar & sqrD,
typename Derivedq::Scalar & s,
Eigen::PlainObjectBase< Derivedk > & k )

single point overload

Parameters
[in]qdim vector of a query point

◆ point_cubic_squared_distance() [4/4]

template<typename Derivedq, typename DerivedC, typename Derivedk>
void igl::cycodebase::point_cubic_squared_distance ( const Eigen::MatrixBase< Derivedq > & q,
const Eigen::MatrixBase< DerivedC > & C,
typename Derivedq::Scalar & sqrD,
typename Derivedq::Scalar & s,
Eigen::PlainObjectBase< Derivedk > & k )

single point overload

◆ point_spline_squared_distance() [1/2]

template<typename DerivedQ, typename DerivedP, typename DerivedC, typename DerivedsqrD, typename DerivedI, typename DerivedS, typename DerivedK>
void igl::cycodebase::point_spline_squared_distance ( const Eigen::MatrixBase< DerivedQ > & Q,
const Eigen::MatrixBase< DerivedP > & P,
const Eigen::MatrixBase< DerivedC > & C,
Eigen::PlainObjectBase< DerivedsqrD > & sqrD,
Eigen::PlainObjectBase< DerivedI > & I,
Eigen::PlainObjectBase< DerivedS > & S,
Eigen::PlainObjectBase< DerivedK > & K )

Compute the squared distance from a set of points to a spline defined by cubic Bezier curves.

Parameters
[in]Q#Q by dim matrix of query points
[in]P#P by dim matrix of spline control points
[in]C#C by 4 matrix of indices into P defining the cubic bezier curves making up the spline
[out]sqrD#Q vector of squared distances from each query point to the spline
[out]I#Q vector of indices of the closest cubic bezier curve in the spline to each query point
[out]S#Q vector of parametric locations on the closest cubic bezier curve of the closest point to each query point
[out]K#Q by dim matrix of closest point locations
See also
igl::cycodebase::point_cubic_squared_distance, igl::cycodebase::spline_eytzinger_aabb

◆ point_spline_squared_distance() [2/2]

template<typename DerivedQ, typename DerivedP, typename DerivedC, typename DerivedB, typename Derivedleaf, typename DerivedsqrD, typename DerivedI, typename DerivedS, typename DerivedK>
void igl::cycodebase::point_spline_squared_distance ( const Eigen::MatrixBase< DerivedQ > & Q,
const Eigen::MatrixBase< DerivedP > & P,
const Eigen::MatrixBase< DerivedC > & C,
const Eigen::MatrixBase< DerivedB > & B1,
const Eigen::MatrixBase< DerivedB > & B2,
const Eigen::MatrixBase< Derivedleaf > & leaf,
Eigen::PlainObjectBase< DerivedsqrD > & sqrD,
Eigen::PlainObjectBase< DerivedI > & I,
Eigen::PlainObjectBase< DerivedS > & S,
Eigen::PlainObjectBase< DerivedK > & K )

overload with AABB acceleration structure

Parameters
[in]B1#B by dim matrix of AABB min box corners
[in]B2#B by dim matrix of AABB max box corners
[in]leaf#B by 1 matrix of AABB leaf node indices/flags
See also
igl::eytzinger_aabb

◆ roots()

template<typename Derivedcoef, typename DerivedR>
int igl::cycodebase::roots ( const Eigen::MatrixBase< Derivedcoef > & coef,
const typename Derivedcoef::Scalar xmin,
const typename Derivedcoef::Scalar xmax,
Eigen::PlainObjectBase< DerivedR > & R )

Compute the real roots of a polynomial with given coefficients within a given interval [xmin, xmax].

Parameters
[in]coefVector of polynomial coefficients in increasing order of degree (i.e., coef[0] + coef[1]*x + coef[2]*x^2 + ... )
[in]xminMinimum x value of the interval
[in]xmaxMaximum x value of the interval
[out]RVector of real roots within [xmin, xmax]
Returns
Number of real roots found within [xmin, xmax]

◆ spline_eytzinger_aabb()

template<typename DerivedP, typename DerivedC, typename DerivedB, typename Derivedleaf>
void igl::cycodebase::spline_eytzinger_aabb ( const Eigen::MatrixBase< DerivedP > & P,
const Eigen::MatrixBase< DerivedC > & C,
Eigen::PlainObjectBase< DerivedB > & B1,
Eigen::PlainObjectBase< DerivedB > & B2,
Eigen::PlainObjectBase< Derivedleaf > & leaf )

Compute an AABB acceleration structure for a spline of cubic Bezier curves in Eytzinger layout.

Parameters
[in]P#P by dim matrix of spline control points
[in]C#C by 4 matrix of indices into P defining the cubic Bézier curves making up the spline
[out]B1#B by dim matrix of AABB min box corners
[out]B2#B by dim matrix of AABB max box corners
[out]leaf#B by 1 matrix of AABB leaf node indices/flags
See also
igl::cycodebase::box_cubic, igl::eytzinger_aabb