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") | |
BezierPatch (int ord_u=-1, int ord_v=-1) | |
Constructor for a nonrational Bezier Patch that reserves space for the given order of the surface. More... | |
BezierPatch (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... | |
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 | makeRational () |
Make trivially rational. If already rational, do nothing. More... | |
void | makeNonrational () |
Make nonrational by shrinking array of weights. More... | |
bool | isRational () const |
Use array size as flag for rationality. More... | |
void | clear () |
Clears the list of control points, make nonrational. More... | |
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... | |
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... | |
CoordsMat | getControlPoints () const |
Returns a copy of the Bezier patch's control points. More... | |
WeightsMat | getWeights () const |
Returns a copy of the Bezier patch's weights. More... | |
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... | |
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... | |
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 | evaluate_first_derivatives (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 | evaluate_second_derivatives (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... | |
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... | |
bool | isPlanar (double tol=1E-8) const |
Predicate to check if the Bezier patch is approximately planar. More... | |
bool | isPolygonal (double tol=1E-8) const |
Predicate to check if the patch can be approximated by a polygon. More... | |
std::ostream & | print (std::ostream &os) const |
Simple formatted print of a Bezier Patch instance. 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. 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 for a nonrational Bezier Patch that reserves space for the given order of the surface.
Constructs an empty patch by default (no nodes/weights on either axis)
[in] | ord_u | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::makeNonrational(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
Elements of pts[k] are mapped to control nodes (p, q) lexicographically, 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]
References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::primal::BezierPatch< T, NDIMS >::makeNonrational(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
Elements of pts and weights are mapped to control nodes (p, q) lexicographically
If weights
is the null pointer, creates a nonrational curve
References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::primal::BezierPatch< T, NDIMS >::makeNonrational(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
Elements of pts are mapped to control nodes (p, q) lexicographically
References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::primal::BezierPatch< T, NDIMS >::makeNonrational(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
Elements of pts and weights are mapped to control nodes (p, q) lexicographically.
References axom::ArrayBase< T, DIM, ArrayType >::flatIndex(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), axom::Array< T, DIM, SPACE >::size(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::makeNonrational(), axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), and SLIC_ASSERT.
|
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
References axom::utilities::max(), axom::Array< T, DIM, SPACE >::resize(), axom::ArrayBase< T, DIM, ArrayType >::shape(), and SLIC_ASSERT.
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 | The patch's polynomial order on the first axis |
[in] | ord_v | The patch's polynomial order on the second axis |
References axom::primal::BezierPatch< T, NDIMS >::isRational(), and axom::Array< T, DIM, SPACE >::resize().
|
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 |
Make trivially rational. If already rational, do nothing.
References axom::Array< T, DIM, SPACE >::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 >::resize().
|
inline |
Make nonrational by shrinking array of weights.
References axom::Array< T, DIM, SPACE >::clear().
|
inline |
Use array size as flag for rationality.
References axom::Array< T, DIM, SPACE >::empty().
|
inline |
Clears the list of control points, make nonrational.
References axom::Array< T, DIM, SPACE >::clear(), and axom::primal::BezierPatch< T, NDIMS >::makeNonrational().
|
inline |
Retrieves the control point at index (idx_p, idx_q)
|
inline |
Retrieves the vector of control points at index idx.
|
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 copy of the Bezier patch's control points.
|
inline |
Returns a copy of the Bezier patch's weights.
|
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 |
Returns an axis-aligned bounding box containing the Bezier patch.
References axom::Array< T, DIM, SPACE >::data(), and axom::Array< T, DIM, SPACE >::size().
|
inline |
Returns an oriented bounding box containing the Bezier patch.
References axom::Array< T, DIM, SPACE >::data(), and axom::Array< T, DIM, SPACE >::size().
|
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::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::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 >::evaluate_second_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 |
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 >::evaluate_second_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 |
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 >::evaluate_second_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 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 >::evaluate_first_derivatives().
|
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::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::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 |
Predicate to check if the Bezier patch is approximately planar.
This function checks if all control points of the BezierPatch are approximately on the plane defined by its four corners
[in] | tol | Threshold for sum of squared distances |
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 edged are linear up to tolerance tol
[in] | tol | Threshold for sum of squared distances |
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 |
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 |