|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a 3D Bezier patch defined by a 2D array of control points. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/primal/geometry/BezierPatch.hpp>
Public Types | |
| using | PointType = Point< T, NDIMS > |
| using | VectorType = Vector< T, NDIMS > |
| using | PlaneType = Plane< T, NDIMS > |
| using | CoordsVec = axom::Array< PointType, 1 > |
| using | CoordsMat = axom::Array< PointType, 2 > |
| using | WeightsVec = axom::Array< T, 1 > |
| using | WeightsMat = axom::Array< T, 2 > |
| using | BoundingBoxType = BoundingBox< T, NDIMS > |
| using | OrientedBoundingBoxType = OrientedBoundingBox< T, NDIMS > |
| using | BezierCurveType = primal::BezierCurve< T, NDIMS > |
Public Member Functions | |
| AXOM_STATIC_ASSERT_MSG ((NDIMS==1)||(NDIMS==2)||(NDIMS==3), "A Bezier Patch object may be defined in 1-, 2-, or 3-D") | |
| AXOM_STATIC_ASSERT_MSG (std::is_arithmetic< T >::value, "A Bezier Patch must be defined using an arithmetic type") | |
| std::ostream & | print (std::ostream &os) const |
| Simple formatted print of a Bezier Patch instance. More... | |
Constructors for BezierPatch | |
The constructors allow for flexible initialization of BezierPatch objects from:
For 1D arrays, the mapping of control points and weights to the patch is lexicographical, i.e. pts[0] -> nodes[0, 0], ..., pts[ord_v] -> nodes[0, ord_v]
pts[ord_v+1] -> nodes[1, 0], ..., pts[2*ord_v] -> nodes[1, ord_v]
...
pts[ord_u*(ord_v-1)] -> nodes[ord_u, 0], ..., pts[ord_u*ord_v] -> nodes[ord_u, ord_v]
The patch is parametrized from u=0 to u=1 and v=0 to v=1. Rational patches are identified by a non-empty weights array, and nonrational patches by an empty weights array. All weights must be greater than 0 in a rational patch. | |
| BezierPatch (axom::ArrayView< const PointType, 2 > controlPoints, axom::ArrayView< const T, 2 > weights, int ord_u, int ord_v) | |
| Constructor from an ArrayView over the control points and weights. More... | |
| BezierPatch (axom::ArrayView< PointType, 2 > controlPoints, int ord_u, int ord_v) | |
| Constructor for polynomial BezierPatch from ArrayView of control points. More... | |
| BezierPatch (axom::ArrayView< PointType, 2 > controlPoints, axom::ArrayView< T, 2 > weights, int ord_u, int ord_v) | |
| Constructor for rational BezierPatch from ArrayView of control points. More... | |
| BezierPatch (int ord_u=-1, int ord_v=-1) | |
| Constructor for a polynomial (nonrational) Bezier Patch that reserves space for the given order of the surface. More... | |
| BezierPatch (const PointType *pts, int ord_u, int ord_v) | |
| Constructor for a Bezier Patch from an array of coordinates. More... | |
| BezierPatch (PointType *pts, T *weights, int ord_u, int ord_v) | |
| Constructor for a rational Bezier Patch from arrays of coordinates and weights. More... | |
| BezierPatch (const CoordsVec &pts, int ord_u, int ord_v) | |
| Constructor for a Bezier Patch from a 1D Axom array of coordinates. More... | |
| BezierPatch (const CoordsVec &pts, const WeightsVec &weights, int ord_u, int ord_v) | |
| Constructor for a Rational Bezier Patch from 1D Axom arrays of coordinates and weights. More... | |
| BezierPatch (const CoordsMat &pts, int ord_u, int ord_v) | |
| Constructor for a Bezier Patch from an Axom array of coordinates. More... | |
| BezierPatch (const CoordsMat &pts, const WeightsMat &weights, int ord_u, int ord_v) | |
| Constructor for a rational Bezier Patch from a 2D Axom array of weights and coordinates. More... | |
Query/modify patch properties (order, rationality, ...) | |
| void | setOrder (int ord_u, int ord_v) |
| Sets the order of Bezier patch. More... | |
| int | getOrder_u () const |
| Returns the order of the Bezier Patch on the first axis. More... | |
| int | getOrder_v () const |
| Returns the order of the Bezier Patch on the second axis. More... | |
| void | clear () |
| Clears the list of control points, make nonrational. More... | |
| bool | isRational () const |
| Use array size as flag for rationality. More... | |
| void | makeRational () |
| Make trivially rational. If already rational, do nothing. More... | |
| void | makeNonrational () |
| Make nonrational by shrinking array of weights. More... | |
Query/modify patch's geometry (control points, weights, bounding box, ...) | |
| PointType & | operator() (int ui, int vi) |
| Retrieves the control point at index (idx_p, idx_q) More... | |
| const PointType & | operator() (int ui, int vi) const |
| Retrieves the vector of control points at index idx. More... | |
| CoordsMat & | getControlPoints () |
| Returns a reference to the Bezier patch's control points. More... | |
| const CoordsMat & | getControlPoints () const |
| Returns a const reference to the Bezier patch's control points. More... | |
| const T & | getWeight (int ui, int vi) const |
| Get a specific weight. More... | |
| void | setWeight (int ui, int vi, T weight) |
| Set the weight at a specific index. More... | |
| WeightsMat & | getWeights () |
| Returns a reference to the Bezier patch's weights. More... | |
| const WeightsMat & | getWeights () const |
| Returns a const reference to the Bezier patch's weights. More... | |
| BoundingBoxType | boundingBox () const |
| Returns an axis-aligned bounding box containing the Bezier patch. More... | |
| OrientedBoundingBoxType | orientedBoundingBox () const |
| Returns an oriented bounding box containing the Bezier patch. More... | |
| bool | isPlanar (double sq_tol=1e-8, double EPS=1e-8) const |
| Predicate to check if the Bezier patch is approximately planar (i.e. flat) More... | |
| bool | isPolygonal (double sq_tol=1e-8, double EPS=1e-8) const |
| Predicate to check if the patch can be approximated by a polygon. More... | |
| bool | isBilinear (double sq_tol=1e-8, bool useStrictBilinear=false) const |
| Predicate to check if the Bezier patch is approximately bilinear. More... | |
Query/modify patch parametrization | |
| void | reverseOrientation (int axis) |
| Reverses the order of one direction of the Bezier patch's control points and weights. More... | |
| void | reverseOrientation_u () |
| Reverses the order of the Bezier patch's control points and weights on the first axis. More... | |
| void | reverseOrientation_v () |
| Reverses the order of the Bezier patch's control points and weights on the second axis. More... | |
| void | swapAxes () |
| Swap the axes such that s(u, v) becomes s(v, u) More... | |
Functions to evaluate patch and its derivatives and normals along points or lines | |
| BezierCurveType | isocurve (T uv, int axis) const |
| Evaluates a slice Bezier patch for a fixed parameter value of u or v. More... | |
| BezierCurveType | isocurve_u (T u) const |
| Returns an isocurve with a fixed value of u. More... | |
| BezierCurveType | isocurve_v (T v) const |
| Returns an isocurve with a fixed value of v. More... | |
| PointType | evaluate (T u, T v) const |
| Evaluates a Bezier patch at a particular parameter value (u, v) More... | |
| void | evaluateFirstDerivatives (T u, T v, Point< T, NDIMS > &eval, Vector< T, NDIMS > &Du, Vector< T, NDIMS > &Dv) const |
| Evaluates all first derivatives Bezier patch at (u, v) More... | |
| void | evaluate_linear_derivatives (T u, T v, Point< T, NDIMS > &eval, Vector< T, NDIMS > &Du, Vector< T, NDIMS > &Dv, Vector< T, NDIMS > &DuDv) const |
| Evaluates all linear derivatives Bezier patch at (u, v) More... | |
| void | evaluateSecondDerivatives (T u, T v, Point< T, NDIMS > &eval, Vector< T, NDIMS > &Du, Vector< T, NDIMS > &Dv, Vector< T, NDIMS > &DuDu, Vector< T, NDIMS > &DvDv, Vector< T, NDIMS > &DuDv) const |
| Evaluates all second derivatives Bezier patch at (u, v) More... | |
| VectorType | du (T u, T v) const |
| Computes a tangent of a Bezier patch at a particular parameter value (u, v) along the u axis. More... | |
| VectorType | dudu (T u, T v) const |
| Computes the second derivative of a Bezier patch at (u, v) along the u axis. More... | |
| VectorType | dv (T u, T v) const |
| Computes a tangent of a Bezier patch at a particular parameter value (u, v) along the v axis. More... | |
| VectorType | dvdv (T u, T v) const |
| Computes the second derivative of a Bezier patch at (u, v) along the v axis. More... | |
| VectorType | dudv (T u, T v) const |
| Computes the mixed second derivative of a Bezier patch at (u, v) More... | |
| VectorType | dvdu (T u, T v) const |
| Computes the mixed second derivative of a Bezier patch at (u, v) More... | |
| VectorType | normal (T u, T v) const |
| Computes the normal vector of a Bezier patch at a particular parameter value (u, v) More... | |
Functions dealing with patch subdivision | |
| void | split (T uv, int axis, BezierPatch &p1, BezierPatch &p2) const |
| Splits a Bezier patch into two Bezier patches. More... | |
| void | split_u (T u, BezierPatch &p1, BezierPatch &p2) const |
| Split the patch along a fixed value of u. More... | |
| void | split_v (T v, BezierPatch &p1, BezierPatch &p2) const |
| void | split (T u, T v, BezierPatch &p1, BezierPatch &p2, BezierPatch &p3, BezierPatch &p4) const |
| Splits a Bezier patch into four Bezier patches. More... | |
Friends | |
| bool | operator== (const BezierPatch< T, NDIMS > &lhs, const BezierPatch< T, NDIMS > &rhs) |
| Checks equality of two Bezier Patches. More... | |
| bool | operator!= (const BezierPatch< T, NDIMS > &lhs, const BezierPatch< T, NDIMS > &rhs) |
Represents a 3D Bezier patch defined by a 2D array of control points.
| T | the coordinate type, e.g., double, float, etc. |
The order of a Bezier patch with (N+1)(M+1) control points is (N, M). The patch is approximated by the control points, parametrized from u=0 to u=1 and v=0 to v=1.
Contains a 2D array of positive weights to represent a rational Bezier patch. Polynomial (nonrational) Bezier patches are identified by an empty weights array.
Algorithms for Rational Bezier curves derived from Gerald Farin, "Algorithms for rational Bezier curves" Computer-Aided Design, Volume 15, Number 2, 1983,
| using axom::primal::BezierPatch< T, NDIMS >::PointType = Point<T, NDIMS> |
| using axom::primal::BezierPatch< T, NDIMS >::VectorType = Vector<T, NDIMS> |
| using axom::primal::BezierPatch< T, NDIMS >::PlaneType = Plane<T, NDIMS> |
| using axom::primal::BezierPatch< T, NDIMS >::CoordsVec = axom::Array<PointType, 1> |
| using axom::primal::BezierPatch< T, NDIMS >::CoordsMat = axom::Array<PointType, 2> |
| using axom::primal::BezierPatch< T, NDIMS >::WeightsVec = axom::Array<T, 1> |
| using axom::primal::BezierPatch< T, NDIMS >::WeightsMat = axom::Array<T, 2> |
| using axom::primal::BezierPatch< T, NDIMS >::BoundingBoxType = BoundingBox<T, NDIMS> |
| using axom::primal::BezierPatch< T, NDIMS >::OrientedBoundingBoxType = OrientedBoundingBox<T, NDIMS> |
| using axom::primal::BezierPatch< T, NDIMS >::BezierCurveType = primal::BezierCurve<T, NDIMS> |
|
inline |
Constructor from an ArrayView over the control points and weights.
| [in] | controlPoints | ArrayView of control points (size: (ord_u+1, ord_v+1) or (0,0)) |
| [in] | weights | ArrayView of weights (size: (ord_u+1, ord_v+1) or (0,0)) |
| [in] | ord_u | The patch's polynomial order on the first axis |
| [in] | ord_v | The patch's polynomial order on the second axis |
If controlPoints is empty, we still allocate space for (ord_u+1, ord_v+1) control points
References axom::ArrayView< T, DIM, SPACE >::data(), axom::ArrayView< T, DIM, SPACE >::empty(), axom::utilities::max(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), axom::ArrayBase< T, DIM, ArrayType >::shape(), axom::ArrayView< T, DIM, SPACE >::size(), and SLIC_ASSERT.
|
inline |
Constructor for polynomial BezierPatch from ArrayView of control points.
|
inline |
Constructor for rational BezierPatch from ArrayView of control points.
|
inline |
Constructor for a polynomial (nonrational) Bezier Patch that reserves space for the given order of the surface.
| [in] | ord_u,ord_v | The patch's polynomial orders |
|
inline |
Constructor for a Bezier Patch from an array of coordinates.
| [in] | pts | A 1D C-style array of (ord_u+1)*(ord_v+1) control points |
| [in] | ord_u,ord_v | The patch's polynomial orders |
|
inline |
Constructor for a rational Bezier Patch from arrays of coordinates and weights.
| [in] | pts | A 1D C-style array of (ord_u+1)*(ord_v+1) control points |
| [in] | weights | A 1D C-style array of (ord_u+1)*(ord_v+1) positive weights |
| [in] | ord_u,ord_v | The patch's polynomial orders, both greater than or equal to zero |
If weights is the null pointer, creates a nonrational curve
|
inline |
Constructor for a Bezier Patch from a 1D Axom array of coordinates.
| [in] | pts | A 1D Axom array of (ord_u+1)*(ord_v+1) control points |
| [in] | ord_u,ord_v | The patch's polynomial orders, both greater than or equal to zero |
|
inline |
Constructor for a Rational Bezier Patch from 1D Axom arrays of coordinates and weights.
| [in] | pts | A 1D Axom array of (ord_u+1)*(ord_v+1) control points |
| [in] | weights | A 1D Axom array of (ord_u+1)*(ord_v+1) positive weights |
| [in] | ord_u,ord_v | The patch's polynomial orders, both greater than or equal to zero |
|
inline |
Constructor for a Bezier Patch from an Axom array of coordinates.
| [in] | pts | A 2D Axom array with (ord_u+1, ord_v+1) control points |
| [in] | ord_u,ord_v | The patch's polynomial orders, both greater than or equal to zero |
|
inline |
Constructor for a rational Bezier Patch from a 2D Axom array of weights and coordinates.
| [in] | pts | A 2D Axom array with (ord_u+1, ord_v+1) control points |
| [in] | weights | A 2D Axom array with (ord_u+1, ord_v+1) weights |
| [in] | ord_u,ord_v | The patch's polynomial orders, both greater than or equal to zero |
| axom::primal::BezierPatch< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | (NDIMS==1)||(NDIMS==2)||(NDIMS==3) | , |
| "A Bezier Patch object may be defined in 1- | , | ||
| 2- | , | ||
| or 3-D" | |||
| ) |
| axom::primal::BezierPatch< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | std::is_arithmetic< T >::value | , |
| "A Bezier Patch must be defined using an arithmetic type" | |||
| ) |
|
inline |
Sets the order of Bezier patch.
| [in] | ord_u,ord_v | The patch's polynomial orders, |
References axom::primal::BezierPatch< T, NDIMS >::isRational(), axom::utilities::max(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and SLIC_ASSERT.
|
inline |
Returns the order of the Bezier Patch on the first axis.
References axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Returns the order of the Bezier Patch on the second axis.
References axom::ArrayBase< T, DIM, ArrayType >::shape().
|
inline |
Clears the list of control points, make nonrational.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear(), and axom::primal::BezierPatch< T, NDIMS >::makeNonrational().
|
inline |
Use array size as flag for rationality.
References axom::Array< T, DIM, SPACE, StoragePolicy >::empty().
|
inline |
Make trivially rational. If already rational, do nothing.
References axom::Array< T, DIM, SPACE, StoragePolicy >::fill(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::Array< T, DIM, SPACE, StoragePolicy >::resize().
|
inline |
Make nonrational by shrinking array of weights.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear().
|
inline |
Retrieves the control point at index (idx_p, idx_q)
|
inline |
Retrieves the vector of control points at index idx.
|
inline |
Returns a reference to the Bezier patch's control points.
|
inline |
Returns a const reference to the Bezier patch's control points.
|
inline |
Get a specific weight.
| [in] | ui | The index of the weight on the first axis |
| [in] | vi | The index of the weight on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::isRational(), and SLIC_ASSERT.
|
inline |
Set the weight at a specific index.
| [in] | ui | The index of the weight in on the first axis |
| [in] | vi | The index of the weight in on the second axis |
| [in] | weight | The updated value of the weight |
References axom::primal::BezierPatch< T, NDIMS >::isRational(), and SLIC_ASSERT.
|
inline |
Returns a reference to the Bezier patch's weights.
|
inline |
Returns a const reference to the Bezier patch's weights.
|
inline |
Returns an axis-aligned bounding box containing the Bezier patch.
References axom::Array< T, DIM, SPACE, StoragePolicy >::data(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Returns an oriented bounding box containing the Bezier patch.
References axom::Array< T, DIM, SPACE, StoragePolicy >::data(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Predicate to check if the Bezier patch is approximately planar (i.e. flat)
This function checks if all control points of the BezierPatch are approximately on the plane defined by its four corners
| [in] | sq_tol | Threshold for sum of squared distances |
| [in] | EPS | Threshold for nearness to zero |
References axom::primal::Vector< T, NDIMS >::cross_product(), axom::primal::Vector< T, NDIMS >::dot(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::utilities::isNearlyEqual(), axom::primal::Vector< T, NDIMS >::norm(), axom::primal::Vector< T, NDIMS >::scalar_triple_product(), and axom::primal::Vector< T, NDIMS >::unitVector().
|
inline |
Predicate to check if the patch can be approximated by a polygon.
This function checks if a BezierPatch lies in a plane and that the edges are linear up to tolerance sq_tol
| [in] | tol | Threshold for sum of squared distances |
| [in] | EPS | Threshold for nearness to zero |
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isocurve_u(), axom::primal::BezierPatch< T, NDIMS >::isocurve_v(), and axom::primal::BezierPatch< T, NDIMS >::isPlanar().
|
inline |
Predicate to check if the Bezier patch is approximately bilinear.
This function checks if the patch is (nearly) bilinear. A necessary condition for a geometrically bilinear patch is that each line of control points in the net is approximately linear. A necessary condition for a parametrically bilinear patch is that the control points are coincident with the surface of the bilinear patch defined by its corners evaluated at uniform parameter values, i.e. the control points are also equally spaced on the net.
| [in] | sq_tol | Threshold for absolute squared distances |
| [in] | useStrictBilinear | If true, require the patch be parametrically bilinear |
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::utilities::lerp(), and axom::primal::squared_distance().
|
inline |
Reverses the order of one direction of the Bezier patch's control points and weights.
| [in] | axis | orientation of patch. 0 to reverse in u, 1 for reverse in v |
References axom::primal::BezierPatch< T, NDIMS >::reverseOrientation_u(), and axom::primal::BezierPatch< T, NDIMS >::reverseOrientation_v().
|
inline |
Reverses the order of the Bezier patch's control points and weights on the first axis.
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::swap().
|
inline |
Reverses the order of the Bezier patch's control points and weights on the second axis.
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::swap().
|
inline |
Swap the axes such that s(u, v) becomes s(v, u)
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), and axom::primal::BezierPatch< T, NDIMS >::isRational().
|
inline |
Evaluates a slice Bezier patch for a fixed parameter value of u or v.
| [in] | u | parameter value at which to evaluate the first axis |
| [in] | v | parameter value at which to evaluate the second axis |
| [in] | axis | orientation of curve. 0 for fixed u, 1 for fixed v |
References axom::primal::BezierPatch< T, NDIMS >::isocurve_u(), axom::primal::BezierPatch< T, NDIMS >::isocurve_v(), and SLIC_ASSERT.
|
inline |
Returns an isocurve with a fixed value of u.
| [in] | u | Parameter value fixed in the isocurve |
References axom::utilities::annotations::end(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isocurve_u(), axom::primal::BezierPatch< T, NDIMS >::isRational(), axom::utilities::lerp(), axom::primal::BezierCurve< T, NDIMS >::makeRational(), and axom::primal::BezierCurve< T, NDIMS >::setWeight().
|
inline |
Returns an isocurve with a fixed value of v.
| [in] | v | Parameter value fixed in the isocurve |
References axom::utilities::annotations::end(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isocurve_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), axom::utilities::lerp(), axom::primal::BezierCurve< T, NDIMS >::makeRational(), and axom::primal::BezierCurve< T, NDIMS >::setWeight().
|
inline |
Evaluates a Bezier patch at a particular parameter value (u, v)
| [in] | u | parameter value at which to evaluate on the first axis |
| [in] | v | parameter value at which to evaluate on the second axis |
References axom::primal::BezierCurve< T, NDIMS >::evaluate(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isocurve_u(), and axom::primal::BezierPatch< T, NDIMS >::isocurve_v().
|
inline |
Evaluates all first derivatives Bezier patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the Bezier patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
References axom::primal::BezierPatch< T, NDIMS >::evaluateSecondDerivatives(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::lerp().
|
inline |
Evaluates all linear derivatives Bezier patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the Bezier patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
| [out] | DuDv | The vector value of S_uv(u, v) == S_vu(u, v) |
References axom::primal::BezierPatch< T, NDIMS >::evaluateSecondDerivatives(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::lerp().
|
inline |
Evaluates all second derivatives Bezier patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
| [out] | eval | The point value of the Bezier patch at (u, v) |
| [out] | Du | The vector value of S_u(u, v) |
| [out] | Dv | The vector value of S_v(u, v) |
| [out] | DuDu | The vector value of S_uu(u, v) |
| [out] | DvDv | The vector value of S_vv(u, v) |
| [out] | DuDv | The vector value of S_uv(u, v) == S_vu(u, v) |
References axom::primal::BezierPatch< T, NDIMS >::evaluateSecondDerivatives(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::lerp().
|
inline |
Computes a tangent of a Bezier patch at a particular parameter value (u, v) along the u axis.
| [in] | u | parameter value at which to evaluate on the first axis |
| [in] | v | parameter value at which to evaluate on the second axis |
References axom::primal::BezierCurve< T, NDIMS >::dt(), and axom::primal::BezierPatch< T, NDIMS >::isocurve_v().
|
inline |
Computes the second derivative of a Bezier patch at (u, v) along the u axis.
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::BezierCurve< T, NDIMS >::dtdt(), and axom::primal::BezierPatch< T, NDIMS >::isocurve_v().
|
inline |
Computes a tangent of a Bezier patch at a particular parameter value (u, v) along the v axis.
| [in] | u | parameter value at which to evaluate on the first axis |
| [in] | v | parameter value at which to evaluate on the second axis |
References axom::primal::BezierCurve< T, NDIMS >::dt(), and axom::primal::BezierPatch< T, NDIMS >::isocurve_u().
|
inline |
Computes the second derivative of a Bezier patch at (u, v) along the v axis.
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::BezierCurve< T, NDIMS >::dtdt(), and axom::primal::BezierPatch< T, NDIMS >::isocurve_u().
|
inline |
Computes the mixed second derivative of a Bezier patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::evaluate_linear_derivatives(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::utilities::lerp().
|
inline |
Computes the mixed second derivative of a Bezier patch at (u, v)
| [in] | u | Parameter value at which to evaluate on the first axis |
| [in] | v | Parameter value at which to evaluate on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::dudv().
|
inline |
Computes the normal vector of a Bezier patch at a particular parameter value (u, v)
| [in] | u | parameter value at which to evaluate on the first axis |
| [in] | v | parameter value at which to evaluate on the second axis |
References axom::primal::Vector< T, NDIMS >::cross_product(), and axom::primal::BezierPatch< T, NDIMS >::evaluateFirstDerivatives().
|
inline |
Splits a Bezier patch into two Bezier patches.
| [in] | uv | parameter value between 0 and 1 at which to bisect the patch |
| [in] | axis | orientation of split. 0 for fixed u, 1 for fixed v |
| [out] | p1 | First output Bezier patch |
| [out] | p2 | Second output Bezier patch |
References SLIC_ASSERT, axom::primal::BezierPatch< T, NDIMS >::split_u(), and axom::primal::BezierPatch< T, NDIMS >::split_v().
|
inline |
Split the patch along a fixed value of u.
References axom::utilities::annotations::end(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::getWeight(), axom::primal::BezierPatch< T, NDIMS >::isRational(), axom::utilities::lerp(), axom::primal::BezierPatch< T, NDIMS >::makeRational(), axom::primal::BezierPatch< T, NDIMS >::setOrder(), and axom::primal::BezierPatch< T, NDIMS >::setWeight().
|
inline |
References axom::utilities::annotations::end(), axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), axom::primal::BezierPatch< T, NDIMS >::getWeight(), axom::primal::BezierPatch< T, NDIMS >::isRational(), axom::utilities::lerp(), axom::primal::BezierPatch< T, NDIMS >::makeRational(), axom::primal::BezierPatch< T, NDIMS >::setOrder(), and axom::primal::BezierPatch< T, NDIMS >::setWeight().
|
inline |
Splits a Bezier patch into four Bezier patches.
| [in] | u | parameter value between 0 and 1 at which to bisect on the first axis |
| [in] | v | parameter value between 0 and 1 at which to bisect on the second axis |
| [out] | p1 | First output Bezier patch |
| [out] | p2 | Second output Bezier patch |
| [out] | p3 | Third output Bezier patch |
| [out] | p4 | Fourth output Bezier patch |
| | | | p3 | p4 | | | | -----—(u,v)------— | | | | p1 | p2 | | | | -------------------— u = 1
References axom::primal::BezierPatch< T, NDIMS >::split_u(), and axom::primal::BezierPatch< T, NDIMS >::split_v().
|
inline |
Simple formatted print of a Bezier Patch instance.
| os | The output stream to write to |
References axom::primal::BezierPatch< T, NDIMS >::getOrder_u(), axom::primal::BezierPatch< T, NDIMS >::getOrder_v(), and axom::primal::BezierPatch< T, NDIMS >::isRational().
|
friend |
Checks equality of two Bezier Patches.
|
friend |