 |
PK_BCURVE_fit_eval_f_t |
|
typedef PK_ERROR_code_t(*PK_BCURVE_fit_eval_f_t)
(
--- received arguments ---
double parameter, --- parameter at which to evaluate
PK_LOGICAL_t calculate_deriv,--- whether the evaluator should
--- return the 1st derivative
PK_POINTER_t external_data, --- external application data
--- returned arguments ---
PK_VECTOR_t *const point, --- sample point at 'parameter'
double *const weight, --- weight of this point
PK_VECTOR_t *const deriv --- 1st derivative at 'parameter'
);
This is the type definition for the external evaluator functions expected
by PK_BCURVE_create_by_fitting. The functions themselves are to be
provided by the application.
Used in:
PK_BCURVE_fit_data_t
Given a 'parameter' a function of type 'PK_BCURVE_fit_eval_f_t' should return
a 3-space vector in 'point'.
If 'calculate_deriv' is 'PK_LOGICAL_true' then 'deriv' should be the 1st
derivative vector at the point.
If the bcurve is to be rational, 'weight' should contain the weight value of
the point. Note that if the bcurve will not be rational the value of the
weight is not examined.
The 'external_data' should be supplied to Parasolid via the
'PK_BCURVE_fit_eval_data_t' structure.
Functions of this type should return 'PK_ERROR_no_errors' on success. Any
other return value will be taken to be an evaluation failure and the return
arguments will not be examined. In these circumstances, a value of
'PK_BCURVE_fit_eval_failure_c' will be returned in the corresponding array
entry of the 'status' field of the 'PK_BCURVE_fit_fault_t' 'fault' structure
returned by PK_BCURVE_create_by_fitting.