HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_GuideCapture.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU Library (C++)
7  *
8  * COMMENTS: Guide Shape Interpolation capture — assigns guide curve
9  * influences to each groom curve based on spatial proximity
10  * and arc-length shape similarity.
11  */
12 
13 #ifndef __GU_GuideCapture_h__
14 #define __GU_GuideCapture_h__
15 
16 #include "GU_API.h"
17 #include <UT/UT_Array.h>
18 #include <UT/UT_VectorTypes.h>
19 
20 class GU_Detail;
21 
22 /// Parameters for guide shape interpolation capture.
24 {
25  int max_candidates = 32;
26  float search_radius = 0.2f;
27  int nsamples = 20;
28  int min_guides = 1;
29  int max_guides = 8;
30  float sigma_scale = 0.1f;
31  float weight_threshold = 0.1f;
32  float length_penalty_scale = 0.0f;
33 };
34 
35 /// Capture groom curves against guide curves using arc-length shape similarity.
36 ///
37 /// Outputs are in CSR (Compressed Sparse Row) format:
38 /// guidestarts — nprims+1 entries; guidestarts[i]..guidestarts[i+1] is curve i's range
39 /// guideindices — flat guide prim indices
40 /// guideweights — flat normalised weights (sum to 1 per curve)
41 ///
42 /// Returns false if groom or guides have no primitives.
44  UT_IntArray &guidestarts,
45  UT_IntArray &guideindices,
46  UT_FloatArray &guideweights,
47  const GU_Detail &groom,
48  const GU_Detail &guides,
50 
51 #endif // __GU_GuideCapture_h__
Parameters for guide shape interpolation capture.
GU_API bool GU_GuideCaptureShape(UT_IntArray &guidestarts, UT_IntArray &guideindices, UT_FloatArray &guideweights, const GU_Detail &groom, const GU_Detail &guides, const GU_GuideCaptureParms &parms)
#define GU_API
Definition: GU_API.h:14
GA_API const UT_StringHolder parms