HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
houdiniHairDeformAPI.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef USDHOUDINI_GENERATED_HOUDINIHAIRDEFORMAPI_H
8 #define USDHOUDINI_GENERATED_HOUDINIHAIRDEFORMAPI_H
9 
10 /// \file usdHoudini/houdiniHairDeformAPI.h
11 
12 #include "pxr/pxr.h"
13 #include "./api.h"
15 #include "pxr/usd/usd/prim.h"
16 #include "pxr/usd/usd/stage.h"
17 #include "./tokens.h"
18 
19 #include "pxr/base/vt/value.h"
20 
21 #include "pxr/base/gf/vec3d.h"
22 #include "pxr/base/gf/vec3f.h"
23 #include "pxr/base/gf/matrix4d.h"
24 
25 #include "pxr/base/tf/token.h"
26 #include "pxr/base/tf/type.h"
27 
29 
30 class SdfAssetPath;
31 
32 // -------------------------------------------------------------------------- //
33 // HOUDINIHAIRDEFORMAPI //
34 // -------------------------------------------------------------------------- //
35 
36 /// \class UsdHoudiniHoudiniHairDeformAPI
37 ///
38 /// API for deforming hair curves.
39 ///
40 class
43 {
44 public:
45  /// Compile time constant representing what kind of schema this class is.
46  ///
47  /// \sa UsdSchemaKind
48  static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
49 
50  /// Construct a UsdHoudiniHoudiniHairDeformAPI on UsdPrim \p prim .
51  /// Equivalent to UsdHoudiniHoudiniHairDeformAPI::Get(prim.GetStage(), prim.GetPath())
52  /// for a \em valid \p prim, but will not immediately throw an error for
53  /// an invalid \p prim
55  : UsdAPISchemaBase(prim)
56  {
57  }
58 
59  /// Construct a UsdHoudiniHoudiniHairDeformAPI on the prim held by \p schemaObj .
60  /// Should be preferred over UsdHoudiniHoudiniHairDeformAPI(schemaObj.GetPrim()),
61  /// as it preserves SchemaBase state.
62  explicit UsdHoudiniHoudiniHairDeformAPI(const UsdSchemaBase& schemaObj)
63  : UsdAPISchemaBase(schemaObj)
64  {
65  }
66 
67  /// Destructor.
68  virtual ~UsdHoudiniHoudiniHairDeformAPI() override;
69 
70  /// Return a vector of names of all pre-declared attributes for this schema
71  /// class and all its ancestor classes. Does not include attributes that
72  /// may be authored by custom/extended methods of the schemas involved.
73  static const TfTokenVector &
74  GetSchemaAttributeNames(bool includeInherited=true);
75 
76  /// Return a UsdHoudiniHoudiniHairDeformAPI holding the prim adhering to this
77  /// schema at \p path on \p stage. If no prim exists at \p path on
78  /// \p stage, or if the prim at that path does not adhere to this schema,
79  /// return an invalid schema object. This is shorthand for the following:
80  ///
81  /// \code
82  /// UsdHoudiniHoudiniHairDeformAPI(stage->GetPrimAtPath(path));
83  /// \endcode
84  ///
86  Get(const UsdStagePtr &stage, const SdfPath &path);
87 
88 
89  /// Returns true if this <b>single-apply</b> API schema can be applied to
90  /// the given \p prim. If this schema can not be a applied to the prim,
91  /// this returns false and, if provided, populates \p whyNot with the
92  /// reason it can not be applied.
93  ///
94  /// Note that if CanApply returns false, that does not necessarily imply
95  /// that calling Apply will fail. Callers are expected to call CanApply
96  /// before calling Apply if they want to ensure that it is valid to
97  /// apply a schema.
98  ///
99  /// \sa UsdPrim::GetAppliedSchemas()
100  /// \sa UsdPrim::HasAPI()
101  /// \sa UsdPrim::CanApplyAPI()
102  /// \sa UsdPrim::ApplyAPI()
103  /// \sa UsdPrim::RemoveAPI()
104  ///
105  static bool
106  CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
107 
108  /// Applies this <b>single-apply</b> API schema to the given \p prim.
109  /// This information is stored by adding "HoudiniHairDeformAPI" to the
110  /// token-valued, listOp metadata \em apiSchemas on the prim.
111  ///
112  /// \return A valid UsdHoudiniHoudiniHairDeformAPI object is returned upon success.
113  /// An invalid (or empty) UsdHoudiniHoudiniHairDeformAPI object is returned upon
114  /// failure. See \ref UsdPrim::ApplyAPI() for conditions
115  /// resulting in failure.
116  ///
117  /// \sa UsdPrim::GetAppliedSchemas()
118  /// \sa UsdPrim::HasAPI()
119  /// \sa UsdPrim::CanApplyAPI()
120  /// \sa UsdPrim::ApplyAPI()
121  /// \sa UsdPrim::RemoveAPI()
122  ///
124  Apply(const UsdPrim &prim);
125 
126 protected:
127  /// Returns the kind of schema this class belongs to.
128  ///
129  /// \sa UsdSchemaKind
130  UsdSchemaKind _GetSchemaKind() const override;
131 
132 private:
133  // needs to invoke _GetStaticTfType.
134  friend class UsdSchemaRegistry;
135  static const TfType &_GetStaticTfType();
136 
137  static bool _IsTypedSchema();
138 
139  // override SchemaBase virtuals.
140  const TfType &_GetTfType() const override;
141 
142 public:
143  // --------------------------------------------------------------------- //
144  // PRESERVESHAPEENABLE
145  // --------------------------------------------------------------------- //
146  /// Enable preserve shape physics solve which targets the hair's original shape, while keeping deformation.
147  ///
148  /// | ||
149  /// | -- | -- |
150  /// | Declaration | `uniform bool houdini:hairdeform:preserveshapeenable = 0` |
151  /// | C++ Type | bool |
152  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
153  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
154  UsdAttribute GetPreserveShapeEnableAttr() const;
155 
156  /// See GetPreserveShapeEnableAttr(), and also
157  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
158  /// If specified, author \p defaultValue as the attribute's default,
159  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
160  /// the default for \p writeSparsely is \c false.
161  UsdAttribute CreatePreserveShapeEnableAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
162 
163 public:
164  // --------------------------------------------------------------------- //
165  // PRESERVESHAPEITERATIONS
166  // --------------------------------------------------------------------- //
167  /// Number of preserve shape physics solve iterations.
168  ///
169  /// | ||
170  /// | -- | -- |
171  /// | Declaration | `uniform int houdini:hairdeform:preserveshapeiterations = 10` |
172  /// | C++ Type | int |
173  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
174  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
175  UsdAttribute GetPreserveShapeIterationsAttr() const;
176 
177  /// See GetPreserveShapeIterationsAttr(), and also
178  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
179  /// If specified, author \p defaultValue as the attribute's default,
180  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
181  /// the default for \p writeSparsely is \c false.
182  UsdAttribute CreatePreserveShapeIterationsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
183 
184 public:
185  // --------------------------------------------------------------------- //
186  // PRESERVESHAPELOCKROOTS
187  // --------------------------------------------------------------------- //
188  /// Keep curve root points fixed during preserve shape solve.
189  ///
190  /// | ||
191  /// | -- | -- |
192  /// | Declaration | `uniform bool houdini:hairdeform:preserveshapelockroots = 1` |
193  /// | C++ Type | bool |
194  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
195  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
196  UsdAttribute GetPreserveShapeLockRootsAttr() const;
197 
198  /// See GetPreserveShapeLockRootsAttr(), and also
199  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
200  /// If specified, author \p defaultValue as the attribute's default,
201  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
202  /// the default for \p writeSparsely is \c false.
203  UsdAttribute CreatePreserveShapeLockRootsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
204 
205 public:
206  // --------------------------------------------------------------------- //
207  // PRESERVESHAPEKSTRETCH
208  // --------------------------------------------------------------------- //
209  /// Stretch stiffness for preserve shape solve (Cosserat model).
210  ///
211  /// | ||
212  /// | -- | -- |
213  /// | Declaration | `uniform float houdini:hairdeform:preserveshapekstretch = 0.01` |
214  /// | C++ Type | float |
215  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
216  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
217  UsdAttribute GetPreserveShapeKStretchAttr() const;
218 
219  /// See GetPreserveShapeKStretchAttr(), and also
220  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
221  /// If specified, author \p defaultValue as the attribute's default,
222  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
223  /// the default for \p writeSparsely is \c false.
224  UsdAttribute CreatePreserveShapeKStretchAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
225 
226 public:
227  // --------------------------------------------------------------------- //
228  // PRESERVESHAPEKBEND
229  // --------------------------------------------------------------------- //
230  /// Bend stiffness for preserve shape solve (Cosserat model).
231  ///
232  /// | ||
233  /// | -- | -- |
234  /// | Declaration | `uniform float houdini:hairdeform:preserveshapekbend = 0.001` |
235  /// | C++ Type | float |
236  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
237  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
238  UsdAttribute GetPreserveShapeKBendAttr() const;
239 
240  /// See GetPreserveShapeKBendAttr(), and also
241  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
242  /// If specified, author \p defaultValue as the attribute's default,
243  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
244  /// the default for \p writeSparsely is \c false.
245  UsdAttribute CreatePreserveShapeKBendAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
246 
247 public:
248  // --------------------------------------------------------------------- //
249  // PRESERVESHAPEREFPOSSTRENGTH
250  // --------------------------------------------------------------------- //
251  /// Strength of reference position constraint in preserve shape solve.
252  ///
253  /// | ||
254  /// | -- | -- |
255  /// | Declaration | `uniform float houdini:hairdeform:preserveshaperefposstrength = 0` |
256  /// | C++ Type | float |
257  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
258  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
259  UsdAttribute GetPreserveShapeRefPosStrengthAttr() const;
260 
261  /// See GetPreserveShapeRefPosStrengthAttr(), and also
262  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
263  /// If specified, author \p defaultValue as the attribute's default,
264  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
265  /// the default for \p writeSparsely is \c false.
266  UsdAttribute CreatePreserveShapeRefPosStrengthAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
267 
268 public:
269  // --------------------------------------------------------------------- //
270  // PRESERVECLUMPSSTIFFNESS
271  // --------------------------------------------------------------------- //
272  /// Clump stiffness for volume preservation in preserve shape solve.
273  ///
274  /// | ||
275  /// | -- | -- |
276  /// | Declaration | `uniform float houdini:hairdeform:preserveclumpsstiffness = 0` |
277  /// | C++ Type | float |
278  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
279  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
280  UsdAttribute GetPreserveClumpsStiffnessAttr() const;
281 
282  /// See GetPreserveClumpsStiffnessAttr(), and also
283  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
284  /// If specified, author \p defaultValue as the attribute's default,
285  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
286  /// the default for \p writeSparsely is \c false.
287  UsdAttribute CreatePreserveClumpsStiffnessAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
288 
289 public:
290  // --------------------------------------------------------------------- //
291  // PRESERVECLUMPSDAMPING
292  // --------------------------------------------------------------------- //
293  /// Damping for clump forces in preserve shape solve.
294  ///
295  /// | ||
296  /// | -- | -- |
297  /// | Declaration | `uniform float houdini:hairdeform:preserveclumpsdamping = 1` |
298  /// | C++ Type | float |
299  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
300  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
301  UsdAttribute GetPreserveClumpsDampingAttr() const;
302 
303  /// See GetPreserveClumpsDampingAttr(), and also
304  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
305  /// If specified, author \p defaultValue as the attribute's default,
306  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
307  /// the default for \p writeSparsely is \c false.
308  UsdAttribute CreatePreserveClumpsDampingAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
309 
310 public:
311  // --------------------------------------------------------------------- //
312  // PRESERVECLUMPSENABLE
313  // --------------------------------------------------------------------- //
314  /// Enable clump constraints during the solve.
315  ///
316  /// | ||
317  /// | -- | -- |
318  /// | Declaration | `uniform bool houdini:hairdeform:preserveclumpsenable = 0` |
319  /// | C++ Type | bool |
320  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
321  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
322  UsdAttribute GetPreserveClumpsEnableAttr() const;
323 
324  /// See GetPreserveClumpsEnableAttr(), and also
325  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
326  /// If specified, author \p defaultValue as the attribute's default,
327  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
328  /// the default for \p writeSparsely is \c false.
329  UsdAttribute CreatePreserveClumpsEnableAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
330 
331 public:
332  // --------------------------------------------------------------------- //
333  // PRESERVECLUMPSMAXNEIGHBORS
334  // --------------------------------------------------------------------- //
335  /// Maximum number of candidate neighbors to search per point for clumping.
336  ///
337  /// | ||
338  /// | -- | -- |
339  /// | Declaration | `uniform int houdini:hairdeform:preserveclumpsmaxneighbors = 50` |
340  /// | C++ Type | int |
341  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
342  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
343  UsdAttribute GetPreserveClumpsMaxNeighborsAttr() const;
344 
345  /// See GetPreserveClumpsMaxNeighborsAttr(), and also
346  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
347  /// If specified, author \p defaultValue as the attribute's default,
348  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
349  /// the default for \p writeSparsely is \c false.
350  UsdAttribute CreatePreserveClumpsMaxNeighborsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
351 
352 public:
353  // --------------------------------------------------------------------- //
354  // PRESERVECLUMPSMAXCONSTRAINTS
355  // --------------------------------------------------------------------- //
356  /// Maximum number of cross-curve clump constraints to keep per point.
357  ///
358  /// | ||
359  /// | -- | -- |
360  /// | Declaration | `uniform int houdini:hairdeform:preserveclumpsmaxconstraints = 3` |
361  /// | C++ Type | int |
362  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
363  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
364  UsdAttribute GetPreserveClumpsMaxConstraintsAttr() const;
365 
366  /// See GetPreserveClumpsMaxConstraintsAttr(), and also
367  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
368  /// If specified, author \p defaultValue as the attribute's default,
369  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
370  /// the default for \p writeSparsely is \c false.
371  UsdAttribute CreatePreserveClumpsMaxConstraintsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
372 
373 public:
374  // --------------------------------------------------------------------- //
375  // CAPTURERADIUS
376  // --------------------------------------------------------------------- //
377  /// Search radius for point capture when capture attributes are not present.
378  ///
379  /// | ||
380  /// | -- | -- |
381  /// | Declaration | `uniform float houdini:hairdeform:captureradius = 1` |
382  /// | C++ Type | float |
383  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
384  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
385  UsdAttribute GetCaptureRadiusAttr() const;
386 
387  /// See GetCaptureRadiusAttr(), and also
388  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
389  /// If specified, author \p defaultValue as the attribute's default,
390  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
391  /// the default for \p writeSparsely is \c false.
392  UsdAttribute CreateCaptureRadiusAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
393 
394 public:
395  // --------------------------------------------------------------------- //
396  // CAPTUREMAXPOINTS
397  // --------------------------------------------------------------------- //
398  /// Maximum number of deformer points to capture per groom point.
399  ///
400  /// | ||
401  /// | -- | -- |
402  /// | Declaration | `uniform int houdini:hairdeform:capturemaxpoints = 10` |
403  /// | C++ Type | int |
404  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
405  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
406  UsdAttribute GetCaptureMaxPointsAttr() const;
407 
408  /// See GetCaptureMaxPointsAttr(), and also
409  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
410  /// If specified, author \p defaultValue as the attribute's default,
411  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
412  /// the default for \p writeSparsely is \c false.
413  UsdAttribute CreateCaptureMaxPointsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
414 
415 public:
416  // --------------------------------------------------------------------- //
417  // CAPTUREMINPOINTS
418  // --------------------------------------------------------------------- //
419  /// Minimum number of deformer points to capture per groom point (radius will expand if needed).
420  ///
421  /// | ||
422  /// | -- | -- |
423  /// | Declaration | `uniform int houdini:hairdeform:captureminpoints = 1` |
424  /// | C++ Type | int |
425  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
426  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
427  UsdAttribute GetCaptureMinPointsAttr() const;
428 
429  /// See GetCaptureMinPointsAttr(), and also
430  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
431  /// If specified, author \p defaultValue as the attribute's default,
432  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
433  /// the default for \p writeSparsely is \c false.
434  UsdAttribute CreateCaptureMinPointsAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
435 
436 public:
437  // --------------------------------------------------------------------- //
438  // DEFORMMETHOD
439  // --------------------------------------------------------------------- //
440  /// Method to use for the basic deformation. Currently either 'pointdeform' or 'surfacedeform'.
441  ///
442  /// | ||
443  /// | -- | -- |
444  /// | Declaration | `uniform string houdini:hairdeform:deformmethod = ""` |
445  /// | C++ Type | std::string |
446  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
447  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
448  UsdAttribute GetDeformMethodAttr() const;
449 
450  /// See GetDeformMethodAttr(), and also
451  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
452  /// If specified, author \p defaultValue as the attribute's default,
453  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
454  /// the default for \p writeSparsely is \c false.
455  UsdAttribute CreateDeformMethodAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
456 
457 public:
458  // --------------------------------------------------------------------- //
459  // SMOOTHCAPTURE
460  // --------------------------------------------------------------------- //
461  /// Enable smooth RBF-based capture instead of BVH point capture.
462  ///
463  /// | ||
464  /// | -- | -- |
465  /// | Declaration | `uniform bool houdini:hairdeform:smoothcapture = 0` |
466  /// | C++ Type | bool |
467  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
468  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
469  UsdAttribute GetSmoothCaptureAttr() const;
470 
471  /// See GetSmoothCaptureAttr(), and also
472  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
473  /// If specified, author \p defaultValue as the attribute's default,
474  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
475  /// the default for \p writeSparsely is \c false.
476  UsdAttribute CreateSmoothCaptureAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
477 
478 public:
479  // --------------------------------------------------------------------- //
480  // SMOOTHCAPTURERADIUS
481  // --------------------------------------------------------------------- //
482  /// Capture radius for smooth RBF capture method.
483  ///
484  /// | ||
485  /// | -- | -- |
486  /// | Declaration | `uniform float houdini:hairdeform:smoothcaptureradius = 0` |
487  /// | C++ Type | float |
488  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
489  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
490  UsdAttribute GetSmoothCaptureRadiusAttr() const;
491 
492  /// See GetSmoothCaptureRadiusAttr(), and also
493  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
494  /// If specified, author \p defaultValue as the attribute's default,
495  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
496  /// the default for \p writeSparsely is \c false.
497  UsdAttribute CreateSmoothCaptureRadiusAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
498 
499 public:
500  // --------------------------------------------------------------------- //
501  // KERNELTYPE
502  // --------------------------------------------------------------------- //
503  /// Kernel type for smooth capture weight falloff.
504  ///
505  /// | ||
506  /// | -- | -- |
507  /// | Declaration | `uniform string houdini:hairdeform:kerneltype = "exponentialbump"` |
508  /// | C++ Type | std::string |
509  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
510  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
511  /// | \ref UsdHoudiniTokens "Allowed Values" | exponentialbump, truncatedgaussian, quadratic, linear |
512  UsdAttribute GetKernelTypeAttr() const;
513 
514  /// See GetKernelTypeAttr(), and also
515  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
516  /// If specified, author \p defaultValue as the attribute's default,
517  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
518  /// the default for \p writeSparsely is \c false.
519  UsdAttribute CreateKernelTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
520 
521 public:
522  // --------------------------------------------------------------------- //
523  // SMOOTHINGMETHOD
524  // --------------------------------------------------------------------- //
525  /// Smoothing method for smooth capture subdivision.
526  ///
527  /// | ||
528  /// | -- | -- |
529  /// | Declaration | `uniform string houdini:hairdeform:smoothingmethod = "approximating"` |
530  /// | C++ Type | std::string |
531  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
532  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
533  /// | \ref UsdHoudiniTokens "Allowed Values" | approximating, interpolating, none |
534  UsdAttribute GetSmoothingMethodAttr() const;
535 
536  /// See GetSmoothingMethodAttr(), and also
537  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
538  /// If specified, author \p defaultValue as the attribute's default,
539  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
540  /// the default for \p writeSparsely is \c false.
541  UsdAttribute CreateSmoothingMethodAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
542 
543 public:
544  // --------------------------------------------------------------------- //
545  // SMOOTHINGLEVEL
546  // --------------------------------------------------------------------- //
547  /// Number of smoothing subdivisions for smooth capture.
548  ///
549  /// | ||
550  /// | -- | -- |
551  /// | Declaration | `uniform int houdini:hairdeform:smoothinglevel = 1` |
552  /// | C++ Type | int |
553  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
554  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
555  UsdAttribute GetSmoothingLevelAttr() const;
556 
557  /// See GetSmoothingLevelAttr(), and also
558  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
559  /// If specified, author \p defaultValue as the attribute's default,
560  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
561  /// the default for \p writeSparsely is \c false.
562  UsdAttribute CreateSmoothingLevelAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
563 
564 public:
565  // --------------------------------------------------------------------- //
566  // TETMESHTREATMENT
567  // --------------------------------------------------------------------- //
568  /// How to treat tet meshes in smooth capture geometry.
569  ///
570  /// | ||
571  /// | -- | -- |
572  /// | Declaration | `uniform string houdini:hairdeform:tetmeshtreatment = "as_surface"` |
573  /// | C++ Type | std::string |
574  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
575  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
576  /// | \ref UsdHoudiniTokens "Allowed Values" | as_surface, as_solid, none |
577  UsdAttribute GetTetMeshTreatmentAttr() const;
578 
579  /// See GetTetMeshTreatmentAttr(), and also
580  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
581  /// If specified, author \p defaultValue as the attribute's default,
582  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
583  /// the default for \p writeSparsely is \c false.
584  UsdAttribute CreateTetMeshTreatmentAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
585 
586 public:
587  // --------------------------------------------------------------------- //
588  // USEORIENTATTRIB
589  // --------------------------------------------------------------------- //
590  /// Use orient/restorient quaternion attributes on the deformer
591  /// instead of computing transforms from neighbour topology.
592  ///
593  /// | ||
594  /// | -- | -- |
595  /// | Declaration | `uniform bool houdini:hairdeform:useorientattrib = 0` |
596  /// | C++ Type | bool |
597  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
598  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
599  UsdAttribute GetUseOrientAttribAttr() const;
600 
601  /// See GetUseOrientAttribAttr(), and also
602  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
603  /// If specified, author \p defaultValue as the attribute's default,
604  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
605  /// the default for \p writeSparsely is \c false.
606  UsdAttribute CreateUseOrientAttribAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
607 
608 public:
609  // --------------------------------------------------------------------- //
610  // ORIENTBLEND
611  // --------------------------------------------------------------------- //
612  /// Blend between position-only guide deformation and
613  /// orient-augmented guide deformation for BasisCurves point deform.
614  ///
615  /// | ||
616  /// | -- | -- |
617  /// | Declaration | `uniform float houdini:hairdeform:orientblend = 1` |
618  /// | C++ Type | float |
619  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
620  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
621  UsdAttribute GetOrientBlendAttr() const;
622 
623  /// See GetOrientBlendAttr(), and also
624  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
625  /// If specified, author \p defaultValue as the attribute's default,
626  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
627  /// the default for \p writeSparsely is \c false.
628  UsdAttribute CreateOrientBlendAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
629 
630 public:
631  // --------------------------------------------------------------------- //
632  // GSIMAXCANDIDATES
633  // --------------------------------------------------------------------- //
634  /// Guide Shape Interpolation: maximum number of candidate guide
635  /// roots to consider in the spatial search.
636  ///
637  /// | ||
638  /// | -- | -- |
639  /// | Declaration | `uniform int houdini:hairdeform:gsimaxcandidates = 32` |
640  /// | C++ Type | int |
641  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
642  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
643  UsdAttribute GetGsiMaxCandidatesAttr() const;
644 
645  /// See GetGsiMaxCandidatesAttr(), and also
646  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
647  /// If specified, author \p defaultValue as the attribute's default,
648  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
649  /// the default for \p writeSparsely is \c false.
650  UsdAttribute CreateGsiMaxCandidatesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
651 
652 public:
653  // --------------------------------------------------------------------- //
654  // GSISEARCHRADIUS
655  // --------------------------------------------------------------------- //
656  /// Guide Shape Interpolation: spatial search radius around each
657  /// groom curve root.
658  ///
659  /// | ||
660  /// | -- | -- |
661  /// | Declaration | `uniform float houdini:hairdeform:gsisearchradius = 0.2` |
662  /// | C++ Type | float |
663  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
664  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
665  UsdAttribute GetGsiSearchRadiusAttr() const;
666 
667  /// See GetGsiSearchRadiusAttr(), and also
668  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
669  /// If specified, author \p defaultValue as the attribute's default,
670  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
671  /// the default for \p writeSparsely is \c false.
672  UsdAttribute CreateGsiSearchRadiusAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
673 
674 public:
675  // --------------------------------------------------------------------- //
676  // GSINSAMPLES
677  // --------------------------------------------------------------------- //
678  /// Guide Shape Interpolation: number of arc-length samples used
679  /// to compute shape distance between curves.
680  ///
681  /// | ||
682  /// | -- | -- |
683  /// | Declaration | `uniform int houdini:hairdeform:gsinsamples = 20` |
684  /// | C++ Type | int |
685  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
686  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
687  UsdAttribute GetGsiNSamplesAttr() const;
688 
689  /// See GetGsiNSamplesAttr(), and also
690  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
691  /// If specified, author \p defaultValue as the attribute's default,
692  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
693  /// the default for \p writeSparsely is \c false.
694  UsdAttribute CreateGsiNSamplesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
695 
696 public:
697  // --------------------------------------------------------------------- //
698  // GSIMINGUIDES
699  // --------------------------------------------------------------------- //
700  /// Guide Shape Interpolation: minimum number of guide influences
701  /// kept per groom curve regardless of weight threshold.
702  ///
703  /// | ||
704  /// | -- | -- |
705  /// | Declaration | `uniform int houdini:hairdeform:gsiminguides = 1` |
706  /// | C++ Type | int |
707  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
708  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
709  UsdAttribute GetGsiMinGuidesAttr() const;
710 
711  /// See GetGsiMinGuidesAttr(), and also
712  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
713  /// If specified, author \p defaultValue as the attribute's default,
714  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
715  /// the default for \p writeSparsely is \c false.
716  UsdAttribute CreateGsiMinGuidesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
717 
718 public:
719  // --------------------------------------------------------------------- //
720  // GSIMAXGUIDES
721  // --------------------------------------------------------------------- //
722  /// Guide Shape Interpolation: maximum number of guide influences
723  /// per groom curve.
724  ///
725  /// | ||
726  /// | -- | -- |
727  /// | Declaration | `uniform int houdini:hairdeform:gsimaxguides = 8` |
728  /// | C++ Type | int |
729  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Int |
730  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
731  UsdAttribute GetGsiMaxGuidesAttr() const;
732 
733  /// See GetGsiMaxGuidesAttr(), and also
734  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
735  /// If specified, author \p defaultValue as the attribute's default,
736  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
737  /// the default for \p writeSparsely is \c false.
738  UsdAttribute CreateGsiMaxGuidesAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
739 
740 public:
741  // --------------------------------------------------------------------- //
742  // GSISIGMASCALE
743  // --------------------------------------------------------------------- //
744  /// Guide Shape Interpolation: Gaussian sigma scale factor applied
745  /// to the median shape distance.
746  ///
747  /// | ||
748  /// | -- | -- |
749  /// | Declaration | `uniform float houdini:hairdeform:gsisigmascale = 0.1` |
750  /// | C++ Type | float |
751  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
752  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
753  UsdAttribute GetGsiSigmaScaleAttr() const;
754 
755  /// See GetGsiSigmaScaleAttr(), and also
756  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
757  /// If specified, author \p defaultValue as the attribute's default,
758  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
759  /// the default for \p writeSparsely is \c false.
760  UsdAttribute CreateGsiSigmaScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
761 
762 public:
763  // --------------------------------------------------------------------- //
764  // GSIWEIGHTTHRESHOLD
765  // --------------------------------------------------------------------- //
766  /// Guide Shape Interpolation: minimum normalised weight below
767  /// which a guide influence is discarded.
768  ///
769  /// | ||
770  /// | -- | -- |
771  /// | Declaration | `uniform float houdini:hairdeform:gsiweightthreshold = 0.1` |
772  /// | C++ Type | float |
773  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
774  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
775  UsdAttribute GetGsiWeightThresholdAttr() const;
776 
777  /// See GetGsiWeightThresholdAttr(), and also
778  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
779  /// If specified, author \p defaultValue as the attribute's default,
780  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
781  /// the default for \p writeSparsely is \c false.
782  UsdAttribute CreateGsiWeightThresholdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
783 
784 public:
785  // --------------------------------------------------------------------- //
786  // GSILENGTHPENALTYSCALE
787  // --------------------------------------------------------------------- //
788  /// Guide Shape Interpolation: scale applied to the squared
789  /// relative length difference between groom and guide curves.
790  ///
791  /// | ||
792  /// | -- | -- |
793  /// | Declaration | `uniform float houdini:hairdeform:gsilengthpenaltyscale = 0` |
794  /// | C++ Type | float |
795  /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Float |
796  /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
797  UsdAttribute GetGsiLengthPenaltyScaleAttr() const;
798 
799  /// See GetGsiLengthPenaltyScaleAttr(), and also
800  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
801  /// If specified, author \p defaultValue as the attribute's default,
802  /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
803  /// the default for \p writeSparsely is \c false.
804  UsdAttribute CreateGsiLengthPenaltyScaleAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
805 
806 public:
807  // --------------------------------------------------------------------- //
808  // SKINPRIM
809  // --------------------------------------------------------------------- //
810  /// Hair roots will stick to this mesh.
811  ///
812  UsdRelationship GetSkinPrimRel() const;
813 
814  /// See GetSkinPrimRel(), and also
815  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
816  UsdRelationship CreateSkinPrimRel() const;
817 
818 public:
819  // --------------------------------------------------------------------- //
820  // DEFORMERPRIM
821  // --------------------------------------------------------------------- //
822  /// Deformer curves or guides used for point deform and guide interpolation mesh methods.
823  ///
824  UsdRelationship GetDeformerPrimRel() const;
825 
826  /// See GetDeformerPrimRel(), and also
827  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
828  UsdRelationship CreateDeformerPrimRel() const;
829 
830 public:
831  // --------------------------------------------------------------------- //
832  // GUIDEINTERPMESHPRIM
833  // --------------------------------------------------------------------- //
834  /// Guide interpolation mesh with 'guides' and 'weights' array attributes for guide interpolation mesh deformation method.
835  ///
836  UsdRelationship GetGuideInterpMeshPrimRel() const;
837 
838  /// See GetGuideInterpMeshPrimRel(), and also
839  /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create
840  UsdRelationship CreateGuideInterpMeshPrimRel() const;
841 
842 public:
843  // ===================================================================== //
844  // Feel free to add custom code below this line, it will be preserved by
845  // the code generator.
846  //
847  // Just remember to:
848  // - Close the class declaration with };
849  // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
850  // - Close the include guard with #endif
851  // ===================================================================== //
852  // --(BEGIN CUSTOM CODE)--
853 };
854 
856 
857 #endif
#define USDHOUDINI_API
Definition: api.h:23
Single Apply API schema.
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
UsdHoudiniHoudiniHairDeformAPI(const UsdSchemaBase &schemaObj)
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
Definition: path.h:280
UsdSchemaKind
Definition: common.h:112
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
Definition: type.h:47
UsdHoudiniHoudiniHairDeformAPI(const UsdPrim &prim=UsdPrim())
Definition: value.h:89