HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Promote.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_Promote.h ( GU Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GU_Promote__
12 #define __GU_Promote__
13 
14 #include "GU_API.h"
15 
16 #include <GA/GA_Types.h>
17 #include <GA/GA_Attribute.h>
18 #include <UT/UT_UniquePtr.h>
19 
20 class GU_Detail;
21 class GA_Attribute;
22 
23 /// Promote attributes from one owner to another
25 {
26 public:
28  {
29  GU_PROMOTE_MAX, // Choose maximum value of input
30  GU_PROMOTE_MIN, // Choose minimum value
31  GU_PROMOTE_MEAN, // Average values
32  GU_PROMOTE_MODE, // Mode (most common)
33  GU_PROMOTE_MEDIAN, // Choose median value
34  GU_PROMOTE_SUM, // Sum of values
35  GU_PROMOTE_SUMSQUARE, // Sum of the squares
36  GU_PROMOTE_RMS, // Root Mean Square
37  GU_PROMOTE_FIRST, // First
38  GU_PROMOTE_LAST, // Last
39  };
40 
41  /// Promote the given attribute to the new attribute class. The new
42  /// attribute is returned.
43  static GA_Attribute *promote(GU_Detail &gdp,
44  GA_Attribute *attrib,
45  GA_AttributeOwner new_owner,
46  bool destroy_existing = true,
47  PROMOTE_METHOD method = GU_PROMOTE_MEAN,
48  const char *new_name=NULL,
49  const GA_Attribute *piece_attrib = nullptr);
50 
51  /// Promote the given (tuple) attribute to the new attribute class into a
52  /// newly created detached attribute.
53  static GA_AttributeUPtr
54  create(GA_AttributeOwner dst_owner,
55  const GA_Attribute &src_attrib,
56  PROMOTE_METHOD method = GU_PROMOTE_MEAN);
57 
58 private:
59 };
60 
61 #endif
62 
Definition of a geometry attribute.
Definition: GA_Attribute.h:196
#define GU_API
Definition: GU_API.h:14
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
Definition: GA_Attribute.h:913
GA_AttributeOwner
Definition: GA_Types.h:33
Promote attributes from one owner to another.
Definition: GU_Promote.h:24