DM_update_cstrn_src_pts
List of: Functions
Subjects: DML Constraints, Deformable Modeling
Contents: Standalone Deformable Modeling

Action: Forces a curve or link constraint to update its internally stored data after the constraint's source points have been modified.

Prototype: void DM_update_cstrn_src_pts (


int& rtn_err, // out: 0=success


DS_dmod* dmod, // or negative err code


int tag, // in: member of target


SDM_options* sdmo // in:SDM_options pointer



= NULL // note: sets active dmod


);

Includes: #include "kernel/acis.hxx"

#include "dshusk/dskernel/dmapi.hxx"

#include "dshusk/dskernel/dsdmod.hxx"

#include "dshusk/dskernel/sdm_options.hxx"

Description: This function helps to enable curve tracking. It causes a curve constraint or link constraint to rebuild its constraint equations from the constraint's current source point definitions.


This function must be used for curve tracking. Create a curve or link constraint using a function to describe the target shape. This can be done by either building the constraint with a callback function, src_CW_func(), or with a combination of the DS_pfunc objects, src_W_pfunc, src_Wn_pfunc, and src_Wnn_pfunc. Modify the source shape. For example, the src_pfunc DS_pfunc objects can themselves be shaped as deformable curves. After the source shape is modified call this function to have the constraint update its internal equations so that the next call to DM_solve() will cause the constrained shape to deform to the new source shape.


This routine will set the constraint tight state on.


Refer to DM_add_crv_cstrn() and DM_add_link_cstrn().


The input arguments dmod and tag identify which constraint to update.


The basic flavor for using a constraint is:


- Create and apply the constraint to a deformable model (DM_add_pt_cstrn()), (DM_add_crv_cstrn()), (DM_add_link_cstrn()), (DM_add_area_cstrn()).

- Select which geometry properties are being constrained,(DM_set_cstrn_behavior()).

- For tracking point constraints, modify the geometry property values by moving the point constraint display points as described above,(DM_set_pt_xyz()).

- For tracking curve constraints and link constraints, use the src_W_pts, src_Wn_pts, and/or src_Wnn_pts, update their shapes, and ask this deformable model to track the change with (DM_update_cstrn_src_pts()).

- Call solve to see how the constraint modifications changed the deformable model shape, (DM_solve()).

- Optionally, for point constraints, the point constraint's domain position and domain directions (for surfaces) may be modified with (DM_set_pt_uv()) or (DM_set_cstrn_pttan_uv_dir()).

- Optionally, modify the constraint rendering and image_pt locations to optimize viewing and/or interactions, DM_set_tan_display_gain()DM_set_comb_graphics().

Errors: DM_NO_ROOT_DMOD

The root deformable model cannot be NULL on input.



DM_TAG_OBJECT_NOT_FOUND

The input tag does not identify any object in the model hierarchy.



DM_NOT_A_CRV_LINK_CSTRN

The input tag does not identify a crv_cstrn or link_cstrn constraint in the model hierarchy.

Library: dshusk

Filename: ds/dshusk/dskernel/dmapi.hxx

Effect: System routine
PDF/DS/05FNJ.PDF
HTM/DATA/DS/DS/05FNJ/0071.HTM