Sets the deformable model's comb_graphics and returns 0 for success or an error.
Role: Sets the parameters that control the rendering of curvature
combs, and curvature values for curvature point constraints. Curvature values
are plotted for points on curves as a vector. The plotted vector is attached to
the curve at the point being measured and points in the direction of the normal
to the curve at that point. The curvature vector's magnitude is equal to the
curvature * the input comb_gain value. So, for a given curve W=W(u)=[x(u0,y(u0,
z(u)]t, the curvature vector plotted for some point, u0, on that curve is:
plotted curvature base_pt = W(u0)
plotted curvature vector = comb_gain * k * m
where
- k = curvature = size(cross_product(Wu,Wuu)) / size(Wu)**3
- m = normal direction = cross_product(t,b)
- Wu = dW(u0)/du = 1st parametric derivative taken at location u0.
- Wuu = d2W(u0)/du2 = 2nd parametric derivative taken at location u0.
- t = tangent = normalized(Wu)
- b = bi-normal = normalized(cross_product(Wu,Wuu))
A curvature comb report is generated by plotting several curvature vectors along
the length of the curve. The input value comb_pt_count specifies how many evenly
spaced curvature vectors to plot within each element of the target curve. The
comb_pt_count value does not affect the rendering of curvature values for point
constraints.
A unique set of curvature plotting parameters are stored for each deformable
model within a deformable modeling hierarchy. For convenience, this command can
apply the input curvature comb parameters to a set of deformable models with one
call as determined by the value of walk_flag. When walk_flag is 0, the
parameters are applied only to the target input dmod. When walk_flag is 1, the
parameters are applied to the target dmod and all of its offspring, and a
walk_flag value of 2 applies the parameters to the target dmod, its younger
siblings, and all their offspring.
The comb_gain value is used when using the DM_set_pt_xyz() function to place the
curvature vector end-point to determine the new target value for the curvature
at that point.
Errors:
- DM_BAD_WALK_FLAG_VALUE
- The walk_flag must be 0, 1 or 2.
- DM_NULL_INPUT_PTR
- The deformable model cannot be NULL on entry.
Effect: Changes model
- Parameters:
-
- rtn_err
- out: 0=success or negative err code.
- dmod
- in: dmod to modify.
- comb_pt_count
- in: desired number of tines-per-elem.
- comb_gain
- in: desired gain on comb vector magnitudes.
- walk_flag
- in: specify how deep to go 0=dmod only, 1=dmod and offspring 2=dmod, siblings, and offspring.
- sdmo
- in:SDM_options pointer.