|
Action:
|
Builds a curve set to act as a seam.
|
|
|
Prototype:
|
void DM_build_ellipse_seam (
|
|
|
int& rtn_err,
|
// out: 0=success or neg
|
|
|
|
|
// err code
|
|
|
DS_dmod* dmod,
|
// in: dmod for new seam
|
|
|
|
|
// (the parent)
|
|
|
int domain_flag,
|
// in: 0=domain_pts in
|
|
|
|
|
// orig_dmod_space,
|
|
|
|
|
// 1=domain_pts in
|
|
|
|
|
// unit_space,
|
|
|
|
|
// 2=domain_pts in
|
|
|
|
|
// internal_pfunc_space.
|
|
|
double cpt[2],
|
// in: center point for
|
|
|
|
|
// patch
|
|
|
double axis1[2],
|
// in: vector from cpt
|
|
|
|
|
// to 1st axis end point
|
|
|
double axis2[2],
|
// in: vector from cpt
|
|
|
|
|
// to 2nd axis end point
|
|
|
double min[2],
|
// out: lower domain
|
|
|
|
|
// ellipse bound, output
|
|
|
|
|
// in orig_dmod_space
|
|
|
double max[2],
|
// out: upper domain
|
|
|
|
|
// ellipse bound, output
|
|
|
|
|
// in orig_dmod_space
|
|
|
int& pfunc_count,
|
// out: always set to 1
|
|
|
DS_pfunc**& pfunc,
|
// out: newly created
|
|
|
|
|
// pfunc array (NULL on
|
|
|
|
|
// input), output in
|
|
|
|
|
// orig_dmod_space,
|
|
|
|
|
// mallocs: pfunc array
|
|
|
|
|
// and each pfunc entry
|
|
|
SDM_options* sdmo
|
// in:SDM_options pointer
|
|
|
|
= NULL
|
//
|
|
|
);
|
|
|
Includes:
|
#include "kernel/acis.hxx"
|
|
#include "dshusk/dskernel/dmapi.hxx"
|
|
#include "dshusk/dskernel/dsdmod.hxx"
|
|
#include "dshusk/dskernel/dspfunc.hxx"
|
|
#include "dshusk/dskernel/sdm_options.hxx"
|
|
|
Description:
|
Builds and returns an elliptical curve suitable for use as a patch seam boundary in the target deformable model. Checks that pfunc is NULL on entry to the subroutine. Builds a
DS_circ object using the
cpt,
axis1, and
axis2 positions scaled to the target deformable model's domain space and then computes and stores the minimum sized bounding box for the ellipse in 0 to 1 space. This function checks that the minimum and maximum points lie within the target deformable model's object's domain space. When the check fails,
pfunc_count is set to 0 and
pfunc is left unaltered. When the check passes, this function stores in
pfunc the
DS_circular curve that forms the ellipse and sets the
pfunc_count value to 1.
|
|
|
The newly constructed seams are built in an image-space that is equal to the
orig_dmod_space of the input
dmod. The min and max domain point locations are scaled into this
orig_dmod_space. These seams and min and max domain point values can be used directly as input to the function
DM_add_surface_patch as long as the
domain_flag value for the
DM_add_surface_patch() call is set to 0.
|
|
|
Verifies that minimum and maximum represent legitimate points contained within the domain space of the this object.
|
|
|
When
domain_flag is set to 1,
cpt,
axis1, and
axis2
are given in the unit range and mapped to the dmod's
orig_dmod_space domain range by this function. When
domain_flag is set to 0, these inputs are given in
orig_dmod_space. When
domain_flag is set to 2, these inputs are given in
internal_pfunc_space.
|
|
|
mallocs the
pfunc
array and the memory for
DS_circ member of the array. The calling program is responsible for freeing this memory.
|
|
|
Errors:
|
DM_parse_tag_flag() errors
|
|
|
|
DM_BAD_DOMAIN_PT_RANGE
|
|
The minimum and maximum must be within the range of 0 to 1.
|
|
|
|
DM_NON_NULL_OUTPUT_PTR
|
|
pfunc must be NULL on entry.
|
|
|
|
DM_ZERO_AREA_PATCH
|
|
The requested child patch must not have a zero area.
|
|
|
Library:
|
dshusk
|
|
|
Filename:
|
ds/dshusk/dskernel/dmapi.hxx
|
|
|
Effect:
|
Changes model
|