 |
PK_FACE_change_deform_eval_f_t |
|
typedef PK_ERROR_code_t(*PK_FACE_change_deform_eval_f_t)
(
--- received arguments ---
PK_VECTOR_t position, --- input position
PK_FACE_t face, --- face for this operation
PK_LOGICAL_t have_params, --- whether surface parameters are
--- supplied
PK_UV_t params, --- parameters on the surface of the
--- input position
PK_POINTER_t external_data, --- external application data
--- returned arguments ---
PK_VECTOR_t *const deformed_position --- deformed position
);
This is the type definition for the external evaluator functions expected
by the deform operation in PK_FACE_change. The functions themselves are to be
provided by the application.
Used in:
PK_FACE_change_data_deform_t
A function of type 'PK_FACE_change_deform_eval_f_t' defines how the original
face should be deformed. The function will receive an input position located on
the surface of the original 'face', and should return the corresponding
deformed position.
The corresponding surface parameters of the input position may be supplied to
the function in 'params'. The function should check the flag 'have_params' to
see if the parameters are available.
The function must return the same result for a given input position,
irrespective of the face supplied. The face and surface parameters are supplied
to potentially help performance, rather than to affect the result of the
function.
The 'external_data' should be supplied to Parasolid via the
'PK_FACE_change_data_deform_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.
Deform operators should have at least G1 continuity, and operators that are G1
but non-G2 may result in surfaces of lower quality.
When the option 'deform_uv' is set to PK_deform_uv_all_c, the algorithm will,
where possible, preserve geometry sharing, so that a resultant surface will be
shared between multiple faces. In this case, the evaluator function will
receive only one of the owning faces via 'face'.