#include <NURBSPatch_fwd.hpp>
Class representing a single NURBS patch in an arbitrary dimensional space, defined on an arbitrary dimensional domain and generated by a tensor product of NURBS curves.
Usage example:
param_vec_t | Vector type of the parametric space. |
vec_t | Vector type of ambient space. |
Definition at line 72 of file NURBSPatch_fwd.hpp.
Public Member Functions | |
NURBSPatch (const NdRange< proj_vec_t > &wcp, const std::array< Range< scalar_t >, param_dim > &ks, const std::array< int, param_dim > &in_p) | |
Construct NURBS patch with weighted control points. More... | |
NURBSPatch (const NdRange< vec_t > &cp, const NdRange< double > &w, const std::array< Range< scalar_t >, param_dim > &ks, const std::array< int, param_dim > &in_p) | |
Construct NURBS patch with control points and weights. More... | |
NURBSPatch (const NURBSPatch< vec_t, param_vec_t > &patch) noexcept | |
Copy constructor. More... | |
NURBSPatch< vec_t, param_vec_t > & | operator= (const NURBSPatch< vec_t, param_vec_t > &) noexcept |
Copy assignment. More... | |
NURBSPatch (NURBSPatch< vec_t, param_vec_t > &&) noexcept=default | |
Move constructor. More... | |
NURBSPatch< vec_t, param_vec_t > & | operator= (NURBSPatch< vec_t, param_vec_t > &&) noexcept=default |
Move assignment. More... | |
void | computeDerivativeStructure () |
Calculate data needed for derivative evaluation. More... | |
vec_t | evaluate (const param_vec_t &t, scalar_t *w) const |
Evaluate NURBS patch in one point along the second dimension. More... | |
vec_t | evaluate (const param_vec_t &t) const |
Overload if weight is not required. More... | |
proj_vec_t | evaluateWeighted (const param_vec_t &t) const |
Evaluate NURBS patch in one point. More... | |
Eigen::Matrix< scalar_t, dim, param_dim > | jacobian (const param_vec_t &t, const vec_t &pt, const scalar_t &w) const |
Evaluate NURBS jacobian matrix in one point. More... | |
Eigen::Matrix< scalar_t, dim, param_dim > | jacobian (const param_vec_t &t) const |
Overload that calculates the point automatically. More... | |
std::pair< vec_t, Eigen::Matrix< scalar_t, dim, param_dim > > | evaluatePointAndJacobian (const param_vec_t &t) const |
Evaluate NURBS and its jacobian matrix in one parameter. More... | |
BoxShape< param_vec_t > | getDomain () const |
Get domain of the NURBS patch. More... | |
Range< NURBSPatch< vec_t, Vec< scalar_t, param_dim - 1 > > > | getBoundaries () const |
Get all boundaries of the NURBS patch as a Range of NURBS patches. More... | |
param_vec_t | getPatchParameterFromBoundaryParameter (const Vec< scalar_t, param_dim - 1 > &t, int i, scalar_t epsilon=0) const |
Get vector from the parametric domain of the NURBS patch from the parameter of the NURBS patch representing one of the boundaries of the NURBS. More... | |
Vec< scalar_t, param_dim - 1 > | getBoundaryParameterFromPatchParameter (const param_vec_t &t, int i) const |
Get parameter from the parametric domain of the NURBS patch representing the boundary of the NURBS patch corresponding to a parameter from the parametric domain of the NURBS surface. More... | |
Public Types | |
enum | { dim = vec_t::dim, proj_dim = dim + 1, param_dim = param_vec_t::dim } |
Store dimensionality. More... | |
typedef vec_t::scalar_t | scalar_t |
Scalar type. More... | |
typedef Vec< scalar_t, proj_dim > | proj_vec_t |
Vector type before projection. More... | |
template<typename T > | |
using | NdRange = typename nurbs_patch_internal::NestedRange< param_dim, T >::type |
Range of param_dim dimensions. More... | |
Friends | |
struct | nurbs_patch_internal::NURBSPatchHelper< vec_t, param_vec_t > |
Private Attributes | |
std::array< int, param_dim > | p |
Underlying B-spline orders. More... | |
NdRange< proj_vec_t > | weighted_control_points |
Multidimensional Range of control points. More... | |
std::array< Range< scalar_t >, param_dim > | knots |
Array of Ranges of knots (knot vector). More... | |
std::unique_ptr< std::array< NURBSPatch< vec_t, param_vec_t >, param_dim > > | der_structure |
NURBS surfaces needed for derivative calculation. More... | |
anonymous enum |
Store dimensionality.
Enumerator | |
---|---|
dim | Dimensionality of space after projection. |
proj_dim | Dimensionality of space before projection. |
param_dim | Dimensionality of parametric space. |
Definition at line 78 of file NURBSPatch_fwd.hpp.
mm::NURBSPatch< vec_t, param_vec_t >::NURBSPatch | ( | const NdRange< proj_vec_t > & | wcp, |
const std::array< Range< scalar_t >, param_dim > & | ks, | ||
const std::array< int, param_dim > & | in_p | ||
) |
Construct NURBS patch with weighted control points.
wcp | Multidimensional Range of weighted control points, e. g. Vec<double, 4>(w * x, w * y, w * z, w) . |
ks | Array of Ranges of knots (pair of knot vectors). |
in_p | Array of underlying B-spline orders (starting from order 0). |
Definition at line 17 of file NURBSPatch.hpp.
mm::NURBSPatch< vec_t, param_vec_t >::NURBSPatch | ( | const NdRange< vec_t > & | cp, |
const NdRange< double > & | w, | ||
const std::array< Range< scalar_t >, param_dim > & | ks, | ||
const std::array< int, param_dim > & | in_p | ||
) |
Construct NURBS patch with control points and weights.
cp | Multidimensional Range of control points. |
w | Multidimensional Range of weights. |
ks | Array of Ranges of knots (pair of knot vectors). |
in_p | Array of underlying B-spline orders (starting from order 0). |
Definition at line 26 of file NURBSPatch.hpp.
|
noexcept |
Copy constructor.
Definition at line 37 of file NURBSPatch.hpp.
|
defaultnoexcept |
Move constructor.
void mm::NURBSPatch< vec_t, param_vec_t >::computeDerivativeStructure |
Calculate data needed for derivative evaluation.
Definition at line 64 of file NURBSPatch.hpp.
vec_t mm::NURBSPatch< vec_t, param_vec_t >::evaluate | ( | const param_vec_t & | t | ) | const |
Overload if weight is not required.
t | Point of evaluation. |
t
. Definition at line 81 of file NURBSPatch.hpp.
vec_t mm::NURBSPatch< vec_t, param_vec_t >::evaluate | ( | const param_vec_t & | t, |
scalar_t * | w | ||
) | const |
Evaluate NURBS patch in one point along the second dimension.
t | Point of evaluation. |
w | Variable in which the weight is stored. |
t
. Definition at line 69 of file NURBSPatch.hpp.
std::pair< vec_t, Eigen::Matrix< typename NURBSPatch< vec_t, param_vec_t >::scalar_t, NURBSPatch< vec_t, param_vec_t >::dim, NURBSPatch< vec_t, param_vec_t >::param_dim > > mm::NURBSPatch< vec_t, param_vec_t >::evaluatePointAndJacobian | ( | const param_vec_t & | t | ) | const |
Evaluate NURBS and its jacobian matrix in one parameter.
t | Parameter of evaluation. |
t
. Definition at line 114 of file NURBSPatch.hpp.
NURBSPatch< vec_t, param_vec_t >::proj_vec_t mm::NURBSPatch< vec_t, param_vec_t >::evaluateWeighted | ( | const param_vec_t & | t | ) | const |
Evaluate NURBS patch in one point.
t | Point of evaluation. |
t
. Definition at line 88 of file NURBSPatch.hpp.
Range< NURBSPatch< vec_t, Vec< typename NURBSPatch< vec_t, param_vec_t >::scalar_t, NURBSPatch< vec_t, param_vec_t >::param_dim - 1 > > > mm::NURBSPatch< vec_t, param_vec_t >::getBoundaries |
Get all boundaries of the NURBS patch as a Range of NURBS patches.
Definition at line 135 of file NURBSPatch.hpp.
Vec< typename NURBSPatch< vec_t, param_vec_t >::scalar_t, NURBSPatch< vec_t, param_vec_t >::param_dim - 1 > mm::NURBSPatch< vec_t, param_vec_t >::getBoundaryParameterFromPatchParameter | ( | const param_vec_t & | t, |
int | i | ||
) | const |
Get parameter from the parametric domain of the NURBS patch representing the boundary of the NURBS patch corresponding to a parameter from the parametric domain of the NURBS surface.
t | Parameter of the NURBS patch. |
i | Index of the boundary. |
Definition at line 149 of file NURBSPatch.hpp.
BoxShape< param_vec_t > mm::NURBSPatch< vec_t, param_vec_t >::getDomain |
Get domain of the NURBS patch.
Definition at line 122 of file NURBSPatch.hpp.
param_vec_t mm::NURBSPatch< vec_t, param_vec_t >::getPatchParameterFromBoundaryParameter | ( | const Vec< scalar_t, param_dim - 1 > & | t, |
int | i, | ||
scalar_t | epsilon = 0 |
||
) | const |
Get vector from the parametric domain of the NURBS patch from the parameter of the NURBS patch representing one of the boundaries of the NURBS.
Patch parameter can be generated epsilon
times the length of the domain away from the boundary. This is useful when normals are not defined at the boundary of the patch.
t | Parameter of the NURBS patch representing the boundary. |
i | Index of the boundary. |
epsilon | Epsilon. |
Definition at line 140 of file NURBSPatch.hpp.
Eigen::Matrix< typename NURBSPatch< vec_t, param_vec_t >::scalar_t, NURBSPatch< vec_t, param_vec_t >::dim, NURBSPatch< vec_t, param_vec_t >::param_dim > mm::NURBSPatch< vec_t, param_vec_t >::jacobian | ( | const param_vec_t & | t | ) | const |
Overload that calculates the point automatically.
t | Point of evaluation. |
t
. computeDerivativeStructure()
must be called on the object before calling this function. Definition at line 103 of file NURBSPatch.hpp.
Eigen::Matrix< typename NURBSPatch< vec_t, param_vec_t >::scalar_t, NURBSPatch< vec_t, param_vec_t >::dim, NURBSPatch< vec_t, param_vec_t >::param_dim > mm::NURBSPatch< vec_t, param_vec_t >::jacobian | ( | const param_vec_t & | t, |
const vec_t & | pt, | ||
const scalar_t & | w | ||
) | const |
Evaluate NURBS jacobian matrix in one point.
t | Point of evaluation. |
pt | Point on the NURBS patch corresponding to t . |
w | Weight of pt . |
t
. computeDerivativeStructure()
must be called on the object before calling this function. Definition at line 95 of file NURBSPatch.hpp.
|
noexcept |
Copy assignment.
Definition at line 47 of file NURBSPatch.hpp.
|
defaultnoexcept |
Move assignment.
|
private |
NURBS surfaces needed for derivative calculation.
Definition at line 93 of file NURBSPatch_fwd.hpp.
|
private |
Array of Ranges of knots (knot vector).
Definition at line 90 of file NURBSPatch_fwd.hpp.
|
private |
Underlying B-spline orders.
Definition at line 88 of file NURBSPatch_fwd.hpp.
|
private |
Multidimensional Range of control points.
Definition at line 89 of file NURBSPatch_fwd.hpp.