|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a Bezier triangle defined by a triangular array of control points. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/primal/geometry/BezierTriangle.hpp>
Public Types | |
| using | PointType = Point< T, NDIMS > |
| using | Barycentric = Point< T, 3 > |
| using | VectorType = Vector< T, NDIMS > |
| using | CoordsVec = axom::Array< PointType, 1 > |
| using | WeightsVec = axom::Array< T, 1 > |
| using | BoundingBoxType = BoundingBox< T, NDIMS > |
| using | OrientedBoundingBoxType = OrientedBoundingBox< T, NDIMS > |
| using | BezierCurveType = primal::BezierCurve< T, NDIMS > |
| using | EdgesVec = axom::Array< BezierCurveType > |
Public Member Functions | |
| AXOM_STATIC_ASSERT_MSG ((NDIMS==1)||(NDIMS==2)||(NDIMS==3), "A Bezier Triangle object may be defined in 1-, 2-, or 3-D") | |
| AXOM_STATIC_ASSERT_MSG (std::is_arithmetic< T >::value, "A Bezier Triangle must be defined using an arithmetic type") | |
| bool | isRational () const |
| Returns true when this triangle is rational. More... | |
| void | makeRational () |
| Make trivially rational. If already rational, do nothing. More... | |
| void | makeNonrational () |
| Make nonrational by shrinking array of weights. More... | |
| CoordsVec & | getControlPoints () |
| Returns a reference to the triangle's control points. More... | |
| const CoordsVec & | getControlPoints () const |
| Returns a reference to the triangle's control points. More... | |
| WeightsVec & | getWeights () |
| Returns a reference to the triangle's weights. More... | |
| const WeightsVec & | getWeights () const |
| Returns a reference to the triangle's weights. More... | |
| BoundingBoxType | boundingBox () const |
| Returns an axis-aligned bounding box containing the Bezier triangle. More... | |
| OrientedBoundingBoxType | orientedBoundingBox () const |
| Returns an oriented bounding box containing the Bezier triangle. More... | |
| void | setOrder (int ord) |
| Sets the order of the Bezier triangle and resizes internal storage. More... | |
| int | getOrder () const |
| Returns the polynomial order of the triangle. More... | |
| PointType | getVertex (int vertIdx) const |
| Return one vertex from the Bezier triangle. More... | |
| BezierCurveType | getEdge (int edgeIdx) const |
| Returns a copy of one of the boundary edges of the Bezier triangle. More... | |
| EdgesVec | getEdges () const |
| Returns all three boundary edges of the Bezier triangle. More... | |
| void | restrictToSubtriangle (const Barycentric &Qa, const Barycentric &Qb, const Barycentric &Qc, BezierTriangle &out) const |
| Restricts this Bezier triangle to a subtriangle of the parameter domain. More... | |
| void | split (T u0, T v0, BezierTriangle &t0, BezierTriangle &t1, BezierTriangle &t2) const |
| Splits a Bezier triangle into three subtriangles by connecting an interior parameter point (u0,v0) to the triangle's three vertices. More... | |
| void | split (int edgeIdx, T s, BezierTriangle &t0, BezierTriangle &t1) const |
| Splits a Bezier triangle into two subtriangles by connecting a point on a boundary edge to the opposite vertex. More... | |
| void | uniformSplit (BezierTriangle &t0, BezierTriangle &t1, BezierTriangle &t2, BezierTriangle &t3) const |
| Uniform 4-way split at edge midpoints. More... | |
| void | split (T s1, T s2, T s3, BezierTriangle &t1, BezierTriangle &t2, BezierTriangle &t3, BezierTriangle &t4) const |
| Splits a Bezier triangle into four subtriangles by inserting one split point on each boundary edge and connecting the split points pairwise. More... | |
| PointType & | operator() (int i, int j) |
| Access a control point in the triangular control net. More... | |
| const PointType & | operator() (int i, int j) const |
| Access a control point in the triangular control net. More... | |
| const T & | getWeight (int i, int j) const |
| Get a specific weight from a rational Bezier triangle. More... | |
| void | setWeight (int i, int j, T weight) |
| Set the weight at a specific index for a rational Bezier triangle. More... | |
| PointType | evaluate (T u0, T v0) const |
| Evaluates the Bezier triangle at (u0,v0) More... | |
| void | evaluateFirstDerivatives (T u0, T v0, Point< T, NDIMS > &eval, Vector< T, NDIMS > &Du, Vector< T, NDIMS > &Dv) const |
| Evaluates first derivatives of the Bezier triangle at (u0,v0) More... | |
| void | evaluateLinearDerivatives (T u0, T v0, Point< T, NDIMS > &eval, Vector< T, NDIMS > &Du, Vector< T, NDIMS > &Dv, Vector< T, NDIMS > &DuDv) const |
| Evaluates all linear derivatives of a Bezier triangle at (u, v) More... | |
| void | evaluateSecondDerivatives (T u0, T v0, 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 of a Bezier triangle at (u0, v0) More... | |
| VectorType | du (T u0, T v0) const |
| Computes a tangent of a Bezier triangle at (u0, v0) along the u axis. More... | |
| VectorType | dv (T u0, T v0) const |
| Computes a tangent of a Bezier triangle at (u0, v0) along the v axis. More... | |
| VectorType | dudu (T u0, T v0) const |
| Computes the second derivative of a Bezier triangle at (u0, v0) along the u axis. More... | |
| VectorType | dvdv (T u0, T v0) const |
| Computes the second derivative of a Bezier triangle at (u0, v0) along the v axis. More... | |
| VectorType | dudv (T u0, T v0) const |
| Computes the mixed second derivative of a Bezier triangle at (u0, v0) More... | |
| VectorType | dvdu (T u0, T v0) const |
| Convenience alias for S_vu(u0,v0), which equals S_uv(u0,v0) for polynomial triangles. More... | |
| VectorType | normal (T u0, T v0) const |
| Computes the normal vector of a Bezier triangle at (u0, v0) More... | |
| std::ostream & | print (std::ostream &os) const |
| Simple formatted print of a Bezier Triangle instance. More... | |
Constructors for BezierTriangle | |
The constructors allow for flexible initialization of BezierTriangle objects from:
The triangle is parametrized over the domain \( u \ge 0, v \ge 0, u+v \le 1 \). Rational triangles are identified by a non-empty weights array, and nonrational triangles by an empty weights array. All weights must be greater than 0 in a rational triangle. For 1D control point/weight arrays, the expected layout corresponds to the indexing used by | |
| BezierTriangle (axom::ArrayView< const PointType > controlPoints, axom::ArrayView< const T > weights, int ord) | |
| Constructor from ArrayViews of control points and weights. More... | |
| BezierTriangle (axom::ArrayView< PointType > controlPoints, axom::ArrayView< T > weights, int ord) | |
| Constructor from ArrayViews of (non-const) control points and weights. More... | |
| BezierTriangle (int ord=-1) | |
| Constructor for a polynomial (nonrational) Bezier Triangle that reserves space. More... | |
| BezierTriangle (const PointType *pts, int ord) | |
| Constructor for a polynomial Bezier Triangle from an array of coordinates. More... | |
| BezierTriangle (const PointType *pts, const T *weights, int ord) | |
| Constructor for a rational Bezier Triangle from arrays of coordinates and weights. More... | |
| BezierTriangle (const CoordsVec &pts, int ord) | |
| Constructor from an Axom array of control points. More... | |
| BezierTriangle (const CoordsVec &pts, const WeightsVec &weights, int ord) | |
| Constructor from Axom arrays of control points and weights. More... | |
Static Public Member Functions | |
| static constexpr int | triSize (int ord) |
| Returns the number of control points for a triangle of order ord. More... | |
| static constexpr size_t | triIndex (int ord, int i, int j) |
| Maps triangular indices (i,j) to the linear storage index. More... | |
| static constexpr bool | isValidIndex (int ord, int i, int j) |
| Check if a given index is valid in the triangular array. More... | |
| static constexpr PointType | triInterpolate (const PointType &A, const PointType &B, const PointType &C, const Barycentric &Q) |
| Do a triangular interpolation from three points and a barycentric coordinate. More... | |
| static constexpr T | triInterpolate (const T &A, const T &B, const T &C, const Barycentric &Q) |
| Do a triangular interpolation from three coordinates and a barycentric coordinate. More... | |
Friends | |
| class | BezierTriangle< T, 1 > |
| class | BezierTriangle< T, 2 > |
| class | BezierTriangle< T, 3 > |
Represents a Bezier triangle defined by a triangular array of control points.
| T | the coordinate type, e.g., double, float, etc. |
| NDIMS | The dimension of each control point, e.g. 1 for rational weights |
A Bezier triangle of order N has \( (N+1)(N+2)/2 \) control points. It is parametrized over the domain \( u0 \ge 0, v0 \ge 0, u0+v0 \le 1 \).
Control points are indexed using integer coordinates \( (i,j) \) with \( 0 \le i \le N \) and \( 0 \le j \le N-i \) and accessed via operator()(i,j). Internally, the triangular control net is stored in a 1D array and triIndex(N,i,j) maps \( (i,j) \) to that linear storage index.
Rational triangles are represented by an additional set of positive weights. Polynomial (nonrational) Bezier triangles are identified by an empty weights array.
A default-constructed triangle will have order -1, and is "invalid". Arrays of nodes and weights will be empty, and most methods are invalid
getOrder()==1, the parameter values correspond to the triangle vertices:evaluate(0,0) == (*this)(0,0)evaluate(0,1) == (*this)(0,1)evaluate(1,0) == (*this)(1,0)These are mapped to standard Barycentric coordinates {u,v,w} through (u0, v0) = {1 - u0 - v0, v0, u0}:
Parametric (u0, v0): Barycentric {u,v,w}: (1, 0) {0,0,1} /\ /\ / \ / \ ^ / \ <—> / \ | / \ / \ | / \ / \ v0 /__________\ /__________\ (0, 0) u0 —> (0, 1) {1,0,0} {0,1,0}
| using axom::primal::BezierTriangle< T, NDIMS >::PointType = Point<T, NDIMS> |
| using axom::primal::BezierTriangle< T, NDIMS >::Barycentric = Point<T, 3> |
| using axom::primal::BezierTriangle< T, NDIMS >::VectorType = Vector<T, NDIMS> |
| using axom::primal::BezierTriangle< T, NDIMS >::CoordsVec = axom::Array<PointType, 1> |
| using axom::primal::BezierTriangle< T, NDIMS >::WeightsVec = axom::Array<T, 1> |
| using axom::primal::BezierTriangle< T, NDIMS >::BoundingBoxType = BoundingBox<T, NDIMS> |
| using axom::primal::BezierTriangle< T, NDIMS >::OrientedBoundingBoxType = OrientedBoundingBox<T, NDIMS> |
| using axom::primal::BezierTriangle< T, NDIMS >::BezierCurveType = primal::BezierCurve<T, NDIMS> |
| using axom::primal::BezierTriangle< T, NDIMS >::EdgesVec = axom::Array<BezierCurveType> |
|
inline |
Constructor from ArrayViews of control points and weights.
| [in] | controlPoints | ArrayView of control points (size: (ord+1)(ord+2)/2 or 0) |
| [in] | weights | ArrayView of weights (size: (ord+1)(ord+2)/2 or 0) |
| [in] | ord | The triangle's polynomial order |
If controlPoints is empty, we still allocate space for the control points.
References axom::ArrayView< T, DIM, SPACE >::data(), axom::ArrayView< T, DIM, SPACE >::empty(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), axom::ArrayView< T, DIM, SPACE >::size(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Constructor from ArrayViews of (non-const) control points and weights.
|
inlineexplicit |
Constructor for a polynomial (nonrational) Bezier Triangle that reserves space.
| [in] | ord | The triangle's polynomial order |
|
inline |
Constructor for a polynomial Bezier Triangle from an array of coordinates.
| [in] | pts | A 1D C-style array of (ord+1)(ord+2)/2 control points |
| [in] | ord | The triangle's polynomial order |
|
inline |
Constructor for a rational Bezier Triangle from arrays of coordinates and weights.
| [in] | pts | A 1D C-style array of (ord+1)(ord+2)/2 control points |
| [in] | weights | A 1D C-style array of (ord+1)(ord+2)/2 positive weights |
| [in] | ord | The triangle's polynomial order |
If weights is the null pointer, creates a nonrational triangle.
|
inline |
Constructor from an Axom array of control points.
| [in] | pts | A 1D Axom array of (ord+1)(ord+2)/2 control points |
| [in] | ord | The triangle's polynomial order (>= 0) |
|
inline |
Constructor from Axom arrays of control points and weights.
| [in] | pts | A 1D Axom array of (ord+1)(ord+2)/2 control points |
| [in] | weights | A 1D Axom array of (ord+1)(ord+2)/2 positive weights |
| [in] | ord | The triangle's polynomial order (>= 0) |
| axom::primal::BezierTriangle< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | (NDIMS==1)||(NDIMS==2)||(NDIMS==3) | , |
| "A Bezier Triangle object may be defined in 1- | , | ||
| 2- | , | ||
| or 3-D" | |||
| ) |
| axom::primal::BezierTriangle< T, NDIMS >::AXOM_STATIC_ASSERT_MSG | ( | std::is_arithmetic< T >::value | , |
| "A Bezier Triangle must be defined using an arithmetic type" | |||
| ) |
|
inline |
Returns true when this triangle is rational.
A rational triangle has a weight per control point; polynomial (nonrational) triangles are identified by an empty weight array.
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::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Make nonrational by shrinking array of weights.
References axom::Array< T, DIM, SPACE, StoragePolicy >::clear().
|
inline |
Returns a reference to the triangle's control points.
The control net contains triSize(getOrder()) points (or 0 when getOrder()<0).
|
inline |
Returns a reference to the triangle's control points.
|
inline |
Returns a reference to the triangle's weights.
The weight array is empty for polynomial triangles. For rational triangles it contains triSize(getOrder()) positive weights.
|
inline |
Returns a reference to the triangle's weights.
|
inline |
Returns an axis-aligned bounding box containing the Bezier triangle.
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 triangle.
References axom::Array< T, DIM, SPACE, StoragePolicy >::data(), and axom::Array< T, DIM, SPACE, StoragePolicy >::size().
|
inline |
Sets the order of the Bezier triangle and resizes internal storage.
| [in] | ord | The polynomial order |
isRational()==true), the weight array is also resized to match the number of control points. References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Returns the polynomial order of the triangle.
|
inline |
Return one vertex from the Bezier triangle.
| [in] | vertIdx | Index of the requested vertex |
The vertices are returned in counter-clockwise order with respect to the first control point (*this)(0, 0) == evaluate(0, 0)
References SLIC_ASSERT.
|
inline |
Returns a copy of one of the boundary edges of the Bezier triangle.
| [in] | edgeIdx | Index of the requested edge in [0,2] |
The edges are returned in counter-clockwise order with respect to the parameter domain (u,v), with edge 0 across from corner 0 (i.e. evaluate(0,0)):
evaluate(1,0) to evaluate(0,1)evaluate(0,1) to evaluate(0,0)evaluate(0,0) to evaluate(1,0)References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Returns all three boundary edges of the Bezier triangle.
getEdge(int). References axom::primal::BezierTriangle< T, NDIMS >::getEdge(), axom::Array< T, DIM, SPACE, StoragePolicy >::push_back(), axom::Array< T, DIM, SPACE, StoragePolicy >::reserve(), and SLIC_ASSERT.
|
inline |
Restricts this Bezier triangle to a subtriangle of the parameter domain.
See overload returning a BezierTriangle for the vertex mapping convention.
| [in] | Qa | Barycentric coordinates of the first subtriangle vertex (u,v,w) |
| [in] | Qb | Barycentric coordinates of the second subtriangle vertex (u,v,w) |
| [in] | Qc | Barycentric coordinates of the third subtriangle vertex (u,v,w) |
| [out] | out | Output restricted Bezier triangle |
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::primal::BezierTriangle< T, NDIMS >::makeNonrational(), axom::primal::BezierTriangle< T, NDIMS >::restrictToSubtriangle(), axom::primal::BezierTriangle< T, NDIMS >::setOrder(), SLIC_ASSERT, axom::Array< T, DIM, SPACE, StoragePolicy >::swap(), axom::primal::BezierTriangle< T, NDIMS >::triIndex(), axom::primal::BezierTriangle< T, NDIMS >::triInterpolate(), and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Splits a Bezier triangle into three subtriangles by connecting an interior parameter point (u0,v0) to the triangle's three vertices.
| [in] | u0 | Parameter value along the u axis for the split point |
| [in] | v0 | Parameter value along the v axis for the split point |
| [out] | t0 | Subtriangle over the parameter triangle with vertices (0,1), (1,0), and (u0,v0) (preserves edge 0) |
| [out] | t1 | Subtriangle over the parameter triangle with vertices (1,0), (0,0), and (u0,v0) (preserves edge 1) |
| [out] | t2 | Subtriangle over the parameter triangle with vertices (0,0), (0,1), and (u0,v0) (preserves edge 2) |
A
/|\
/ | \
/t2|t1\
/ /Q\ \
/ / t0 \ \
//_________\\
B C
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::primal::BezierTriangle< T, NDIMS >::makeNonrational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), axom::primal::BezierTriangle< T, NDIMS >::setOrder(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::split(), axom::primal::BezierTriangle< T, NDIMS >::triIndex(), axom::primal::BezierTriangle< T, NDIMS >::triInterpolate(), and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Splits a Bezier triangle into two subtriangles by connecting a point on a boundary edge to the opposite vertex.
| [in] | edgeIdx | Index of the boundary edge to split (same convention as getEdge(int)) |
| [in] | s | Parameter in (0,1) locating the split point along the chosen edge |
| [out] | t0 | First output subtriangle |
| [out] | t1 | Second output subtriangle |
Taking P0 as the vertex opposite edge edgeIdx:
P0
/|\
/ | \
/ | \
/ | \
/ t0 | t1 \
/_____|_____\
P1 Q P2 s=0 s s=1
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::resize(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::split(), axom::primal::BezierTriangle< T, NDIMS >::triIndex(), axom::primal::BezierTriangle< T, NDIMS >::triInterpolate(), and axom::primal::BezierTriangle< T, NDIMS >::triSize().
|
inline |
Uniform 4-way split at edge midpoints.
| [out] | t0 | Subtriangle near vertex (0,0) |
| [out] | t1 | Subtriangle near vertex (0,1) |
| [out] | t2 | Subtriangle near vertex (1,0) |
| [out] | t3 | Central subtriangle |
This is equivalent to split(0.5, 0.5, 0.5, ...), but with optimizations to reduce redundant computations by sharing intermediate control nets. We also separate the implementation based on triangle rationality to improve performance
C
/\
/t2\
P1 /____\ P0
/\ t3 /\
/t0\ /t1\
/____\/____\
A P2 B
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::primal::BezierTriangle< T, NDIMS >::makeNonrational(), axom::primal::BezierTriangle< T, NDIMS >::makeRational(), axom::primal::BezierTriangle< T, NDIMS >::setOrder(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Splits a Bezier triangle into four subtriangles by inserting one split point on each boundary edge and connecting the split points pairwise.
| [in] | s1 | Parameter in (0,1) locating the split point on edge 0 (same convention as getEdge(0)) |
| [in] | s2 | Parameter in (0,1) locating the split point on edge 1 (same convention as getEdge(1)) |
| [in] | s3 | Parameter in (0,1) locating the split point on edge 2 (same convention as getEdge(2)) |
| [out] | t1 | Subtriangle near vertex (0,0) with vertices (0,0), point on edge 2, point on edge 1 |
| [out] | t2 | Subtriangle near vertex (0,1) with vertices (0,1), point on edge 0, point on edge 2 |
| [out] | t3 | Subtriangle near vertex (1,0) with vertices (1,0), point on edge 1, point on edge 0 |
| [out] | t4 | Central subtriangle with vertices point on edge 1, point on edge 0, point on edge 2 |
References axom::primal::BezierTriangle< T, NDIMS >::restrictToSubtriangle(), and SLIC_ASSERT.
|
inline |
Access a control point in the triangular control net.
| [in] | i | The first index (0 <= i <= getOrder()) |
| [in] | j | The second index (0 <= j <= getOrder()-i) |
References axom::primal::BezierTriangle< T, NDIMS >::isValidIndex(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Access a control point in the triangular control net.
References axom::primal::BezierTriangle< T, NDIMS >::isValidIndex(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Get a specific weight from a rational Bezier triangle.
| [in] | i | First control net index |
| [in] | j | Second control net index |
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::primal::BezierTriangle< T, NDIMS >::isValidIndex(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Set the weight at a specific index for a rational Bezier triangle.
| [in] | i | First control net index |
| [in] | j | Second control net index |
| [in] | weight | The updated value of the weight |
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::primal::BezierTriangle< T, NDIMS >::isValidIndex(), SLIC_ASSERT, and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inline |
Evaluates the Bezier triangle at (u0,v0)
| [in] | u0 | Parameter value along the u axis |
| [in] | v0 | Parameter value along the v axis |
evaluate(0,0) == (*this)(0,0)evaluate(0,1) == (*this)(0,order)evaluate(1,0) == (*this)(order,0)References axom::utilities::annotations::end(), axom::primal::BezierTriangle< T, NDIMS >::evaluate(), axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::triIndex(), and axom::primal::BezierTriangle< T, NDIMS >::triInterpolate().
|
inline |
Evaluates first derivatives of the Bezier triangle at (u0,v0)
| [in] | u0 | Parameter value along the u axis |
| [in] | v0 | Parameter value along the v axis |
| [out] | eval | Point value S(u,v) |
| [out] | Du | First derivative S_u(u,v) |
| [out] | Dv | First derivative S_v(u,v) |
References axom::utilities::annotations::end(), axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives(), axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::triIndex(), and axom::primal::BezierTriangle< T, NDIMS >::triInterpolate().
|
inline |
Evaluates all linear derivatives of a Bezier triangle at (u, v)
| [in] | u0 | Parameter value at which to evaluate along the u axis |
| [in] | v0 | Parameter value at which to evaluate along the v axis |
| [out] | eval | The point value of the Bezier triangle 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::utilities::annotations::end(), axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives(), axom::primal::BezierTriangle< T, NDIMS >::evaluateLinearDerivatives(), axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::triIndex(), and axom::primal::BezierTriangle< T, NDIMS >::triInterpolate().
|
inline |
Evaluates all second derivatives of a Bezier triangle at (u0, v0)
| [in] | u0 | Parameter value at which to evaluate along the u axis |
| [in] | v0 | Parameter value at which to evaluate along the v axis |
| [out] | eval | The point value of the Bezier triangle 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::utilities::annotations::end(), axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives(), axom::primal::BezierTriangle< T, NDIMS >::evaluateSecondDerivatives(), axom::primal::BezierTriangle< T, NDIMS >::isRational(), axom::Array< T, DIM, SPACE, StoragePolicy >::size(), SLIC_ASSERT, axom::primal::BezierTriangle< T, NDIMS >::triIndex(), and axom::primal::BezierTriangle< T, NDIMS >::triInterpolate().
|
inline |
Computes a tangent of a Bezier triangle at (u0, v0) along the u axis.
References axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives().
|
inline |
Computes a tangent of a Bezier triangle at (u0, v0) along the v axis.
References axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives().
|
inline |
Computes the second derivative of a Bezier triangle at (u0, v0) along the u axis.
References axom::primal::BezierTriangle< T, NDIMS >::evaluateSecondDerivatives().
|
inline |
Computes the second derivative of a Bezier triangle at (u0, v0) along the v axis.
References axom::primal::BezierTriangle< T, NDIMS >::evaluateSecondDerivatives().
|
inline |
Computes the mixed second derivative of a Bezier triangle at (u0, v0)
References axom::primal::BezierTriangle< T, NDIMS >::evaluateSecondDerivatives().
|
inline |
Convenience alias for S_vu(u0,v0), which equals S_uv(u0,v0) for polynomial triangles.
References axom::primal::BezierTriangle< T, NDIMS >::dudv().
|
inline |
Computes the normal vector of a Bezier triangle at (u0, v0)
References axom::primal::Vector< T, NDIMS >::cross_product(), and axom::primal::BezierTriangle< T, NDIMS >::evaluateFirstDerivatives().
|
inline |
Simple formatted print of a Bezier Triangle instance.
| os | The output stream to write to |
References axom::primal::BezierTriangle< T, NDIMS >::isRational(), and axom::primal::BezierTriangle< T, NDIMS >::triIndex().
|
inlinestaticconstexpr |
Returns the number of control points for a triangle of order ord.
| [in] | ord | Triangle order |
|
inlinestaticconstexpr |
Maps triangular indices (i,j) to the linear storage index.
| [in] | ord | Triangle order |
| [in] | i | First control net index |
| [in] | j | Second control net index |
|
inlinestaticconstexpr |
Check if a given index is valid in the triangular array.
|
inlinestaticconstexpr |
Do a triangular interpolation from three points and a barycentric coordinate.
References axom::primal::Point< T, NDIMS >::array().
|
inlinestaticconstexpr |
Do a triangular interpolation from three coordinates and a barycentric coordinate.
|
friend |
|
friend |
|
friend |