ON_SurfaceValues stores surface evaluation values (point, normal, curvatures, derivatives) in a single class
More...
#include <opennurbs_point.h>
|
| ON_SurfaceValues ()=default |
|
| ON_SurfaceValues (const ON_SurfaceValues &src) |
|
| ~ON_SurfaceValues () |
|
void | Clear () |
| Unsets all surface evaluation values. More...
|
|
void | ClearDerivative (unsigned i, unsigned j) |
|
void | ClearDerivatives () |
|
void | ClearNormal () |
|
void | ClearPoint () |
|
void | ClearPrincipalCurvatures () |
|
const ON_3dVector | Derivative (unsigned i, unsigned j) const |
| If (u,v) are the surface parameters, then Derivative(0,0) = point, Derivative(1,0) = 1st partial with respect to u (D/Du). Derivative(0,1) = 1st partial with respect to v (D/Dv). Derivative(2,0) = 2nd partial with respect to u (D/Du^2). Derivative(1,1) = 2nd mixed partial (D/DuDv). Derivative(0,2) = 2nd partial with respect to v (D/Dv^2). Derivative(i,j) = (i+j)-th order partial D/Du^iDv^j. More...
|
|
bool | DerivativeIsSet (unsigned i, unsigned j) const |
|
unsigned | DerivativeOrderCapacity () const |
| The order of the partial derivative returned by Derivative(i, j) is i + j. The memory to store partial derivatives can be allocated by calling ReserveDerivativeOrderCapacity(max_order). More...
|
|
bool | DerivativesAreSet (unsigned order) const |
|
bool | GetDerivativeArrayForExperts (unsigned &derivative_order_capacity, size_t &stride, double *&derivative_values) |
| Used by experts when calling legacy bispan evaluation code that takes (num_der, stride, ders) parameters. Pretend this does not exist. More...
|
|
const ON_3dVector | Normal () const |
|
bool | NormalIsSet () const |
|
ON_SurfaceValues | operator= (const ON_SurfaceValues &src) |
|
const ON_3dPoint | Point () const |
|
bool | PointIsSet () const |
|
const ON_SurfaceCurvature | PrincipalCurvatures () const |
|
bool | PrincipalCurvaturesSet () const |
|
bool | ReserveDerivativeOrderCapacity (unsigned order_capacity) |
|
void | SetDerivative (unsigned i, unsigned j, ON_3dVector D) |
|
void | SetDerivativeArrayForExperts (unsigned max_derivative_order, size_t stride, const double *derivative_values) |
| Used by experts when calling legacy bispan evaluation code that takes (num_der, stride, ders) parameters. Pretend this does not exist.
More...
|
|
void | SetNormal (ON_3dVector N) |
|
void | SetPoint (ON_3dPoint P) |
|
void | SetPrincipalCurvatures (double kappa1, double kappa2) |
|
void | SetPrincipalCurvatures (ON_SurfaceCurvature kappa) |
|
|
static bool | CreateFromLocalArrayForExperts (unsigned maximum_derivative_order, size_t value_array_stride, double *value_array, ON_SurfaceValues &values) |
| NOTE WELL: CreateFromLocalArray is for experts dealing with unusual situations. Create a ON_SurfaceValues where the storage for derivative values is managed externally. This is typically used by experts to easily get surface evaluation results stored in value_array[] when the evaluation function returns the results in a ON_SurfaceValues class. The caller is responsible for ensuring that the value_array[] memory is not freed or deleted while the returned ON_SurfaceValues class is in scope. Any copy of the returned values will not reference value_array[]. More...
|
|
static bool | CreateFromVectorArrayForExperts (unsigned order_capacity, ON_SimpleArray< ON_3dVector > &value_array, ON_SurfaceValues &values) |
| NOTE WELL: CreateFromVectorArray is for experts dealing with unusual situations. Create a ON_SurfaceValues where the storage for the values is derivative values is managed externally. This is typically used by experts to easily get surface evaluation results stored in value_array[] when the evaluation function returns the results in a ON_SurfaceValues class. The caller is responsible for ensuring that the value_array[] memory is not freed or deleted while the returned ON_SurfaceValues class is in scope. Any copy of the returned values will not reference value_array[]. More...
|
|
ON_SurfaceValues stores surface evaluation values (point, normal, curvatures, derivatives) in a single class
◆ anonymous enum
anonymous enum : unsigned |
Enumerator |
---|
MaximumDerivativeOrder | The maximum order of a partial derivative that an ON_SurfaceValues class can possibly store is 15.
|
◆ ON_SurfaceValues() [1/2]
ON_SurfaceValues::ON_SurfaceValues |
( |
| ) |
|
|
default |
◆ ~ON_SurfaceValues()
ON_SurfaceValues::~ON_SurfaceValues |
( |
| ) |
|
◆ ON_SurfaceValues() [2/2]
◆ Clear()
void ON_SurfaceValues::Clear |
( |
| ) |
|
Unsets all surface evaluation values.
◆ ClearDerivative()
void ON_SurfaceValues::ClearDerivative |
( |
unsigned |
i, |
|
|
unsigned |
j |
|
) |
| |
◆ ClearDerivatives()
void ON_SurfaceValues::ClearDerivatives |
( |
| ) |
|
◆ ClearNormal()
void ON_SurfaceValues::ClearNormal |
( |
| ) |
|
◆ ClearPoint()
void ON_SurfaceValues::ClearPoint |
( |
| ) |
|
◆ ClearPrincipalCurvatures()
void ON_SurfaceValues::ClearPrincipalCurvatures |
( |
| ) |
|
◆ CreateFromLocalArrayForExperts()
static bool ON_SurfaceValues::CreateFromLocalArrayForExperts |
( |
unsigned |
maximum_derivative_order, |
|
|
size_t |
value_array_stride, |
|
|
double * |
value_array, |
|
|
ON_SurfaceValues & |
values |
|
) |
| |
|
static |
NOTE WELL: CreateFromLocalArray is for experts dealing with unusual situations. Create a ON_SurfaceValues where the storage for derivative values is managed externally. This is typically used by experts to easily get surface evaluation results stored in value_array[] when the evaluation function returns the results in a ON_SurfaceValues class. The caller is responsible for ensuring that the value_array[] memory is not freed or deleted while the returned ON_SurfaceValues class is in scope. Any copy of the returned values will not reference value_array[].
- Parameters
-
derivative_order | 0 <= derivative_order <= ON_SurfaceValues::MaximumDerivativeOrder derivative_order = maximum order of a partial derivative that can be stored in value_array[]. 1 for point and 1st partial derivatives (value_array[] has at least 3*value_array_stride doubles). 2 for point, 1st and 2nd partial derivatives (value_array[] has at least 6*value_array_stride doubles). And so on. |
value_array_stride | value_array_stride >= 3. |
value_array | An array with a capacity of at least value_array_stride * ((order_capacity + 1) * (order_capacity + 2) / 2) doubles. |
values | After the call, values will use value_array to store point and derivative evaluations. |
- Returns
- True if successful.
◆ CreateFromVectorArrayForExperts()
NOTE WELL: CreateFromVectorArray is for experts dealing with unusual situations. Create a ON_SurfaceValues where the storage for the values is derivative values is managed externally. This is typically used by experts to easily get surface evaluation results stored in value_array[] when the evaluation function returns the results in a ON_SurfaceValues class. The caller is responsible for ensuring that the value_array[] memory is not freed or deleted while the returned ON_SurfaceValues class is in scope. Any copy of the returned values will not reference value_array[].
- Parameters
-
order_capacity | 0 <= derivative_order <= ON_SurfaceValues::MaximumDerivativeOrder derivative_order = maximum order of a partial derivative that can be stored in value_array[]. 1 for point and 1st partial derivatives (value_array[] has at least 3*value_array_stride doubles). 2 for point, 1st and 2nd partial derivatives (value_array[] has at least 6*value_array_stride doubles). And so on. |
value_array | The capacity and count of value_array[] will be set to ((order_capacity + 1) * (order_capacity + 2) / 2). |
values | After the call, values will use value_array to store point and derivative evaluations. Note that if values is copied, all derivative information will be lost. This class is for experts dealing with unusual situations. |
- Returns
- True if successful.
◆ Derivative()
const ON_3dVector ON_SurfaceValues::Derivative |
( |
unsigned |
i, |
|
|
unsigned |
j |
|
) |
| const |
If (u,v) are the surface parameters, then Derivative(0,0) = point, Derivative(1,0) = 1st partial with respect to u (D/Du). Derivative(0,1) = 1st partial with respect to v (D/Dv). Derivative(2,0) = 2nd partial with respect to u (D/Du^2). Derivative(1,1) = 2nd mixed partial (D/DuDv). Derivative(0,2) = 2nd partial with respect to v (D/Dv^2). Derivative(i,j) = (i+j)-th order partial D/Du^iDv^j.
- Parameters
-
i | Number of partial derivatives in the 1st surface parameter. |
j | Number of partial derivatives in the 2nd surface parameter. |
- Returns
- Specified partial derivative.
◆ DerivativeIsSet()
bool ON_SurfaceValues::DerivativeIsSet |
( |
unsigned |
i, |
|
|
unsigned |
j |
|
) |
| const |
◆ DerivativeOrderCapacity()
unsigned ON_SurfaceValues::DerivativeOrderCapacity |
( |
| ) |
const |
The order of the partial derivative returned by Derivative(i, j) is i + j. The memory to store partial derivatives can be allocated by calling ReserveDerivativeOrderCapacity(max_order).
- Returns
- Returns the maximum order of a partial derivative that can be stored.
◆ DerivativesAreSet()
bool ON_SurfaceValues::DerivativesAreSet |
( |
unsigned |
order | ) |
const |
◆ GetDerivativeArrayForExperts()
bool ON_SurfaceValues::GetDerivativeArrayForExperts |
( |
unsigned & |
derivative_order_capacity, |
|
|
size_t & |
stride, |
|
|
double *& |
derivative_values |
|
) |
| |
Used by experts when calling legacy bispan evaluation code that takes (num_der, stride, ders) parameters. Pretend this does not exist.
- Parameters
-
derivative_order_capacity | The returned value is the maximum order of a partial derivative that can be stored in derivative_values. |
stride | Returns the number of doubles between successive partial derivatives. |
derivative_values | Returns a pointer to an array of stride*(derivative_order_capacity + 1)*(derivative_order_capacity + 2)/2 doubles. |
- Returns
- True if the returned information can be passed to a legacy bispan evaluator.
◆ Normal()
◆ NormalIsSet()
bool ON_SurfaceValues::NormalIsSet |
( |
| ) |
const |
◆ operator=()
◆ Point()
const ON_3dPoint ON_SurfaceValues::Point |
( |
| ) |
const |
◆ PointIsSet()
bool ON_SurfaceValues::PointIsSet |
( |
| ) |
const |
◆ PrincipalCurvatures()
◆ PrincipalCurvaturesSet()
bool ON_SurfaceValues::PrincipalCurvaturesSet |
( |
| ) |
const |
◆ ReserveDerivativeOrderCapacity()
bool ON_SurfaceValues::ReserveDerivativeOrderCapacity |
( |
unsigned |
order_capacity | ) |
|
- Parameters
-
order_capacity | 0 <= derivative_order <= ON_SurfaceValues::MaximumDerivativeOrder derivative_order = maximum order of a partial derivative that can be stored in value_array[]. 1 for point and 1st partial derivatives (value_array[] has at least 3*value_array_stride doubles). 2 for point, 1st and 2nd partial derivatives (value_array[] has at least 6*value_array_stride doubles). And so on. |
- Returns
- True if the capacity to store derivatives was reserved.
◆ SetDerivative()
void ON_SurfaceValues::SetDerivative |
( |
unsigned |
i, |
|
|
unsigned |
j, |
|
|
ON_3dVector |
D |
|
) |
| |
void SetPrincipalVectorCurvatures( ON_3dVector K1, ON_3dVector K2 ); void ClearPrincipalVectorCurvatures(); bool PrincipalVectorCurvaturesAreSet() const; const ON_3dVector PrincipalVectorCurvature(unsigned i) const;
◆ SetDerivativeArrayForExperts()
void ON_SurfaceValues::SetDerivativeArrayForExperts |
( |
unsigned |
max_derivative_order, |
|
|
size_t |
stride, |
|
|
const double * |
derivative_values |
|
) |
| |
Used by experts when calling legacy bispan evaluation code that takes (num_der, stride, ders) parameters. Pretend this does not exist.
- Parameters
-
max_derivative_order | |
stride | |
derivative_values | |
◆ SetNormal()
◆ SetPoint()
◆ SetPrincipalCurvatures() [1/2]
void ON_SurfaceValues::SetPrincipalCurvatures |
( |
double |
kappa1, |
|
|
double |
kappa2 |
|
) |
| |
◆ SetPrincipalCurvatures() [2/2]
◆ Nan