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