HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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 <
GA/GA_Handle.h
>
19
#include <
UT/UT_UniquePtr.h
>
20
21
class
GU_Detail
;
22
class
GA_Attribute
;
23
24
/// Promote attributes from one owner to another
25
class
GU_API
GU_Promote
26
{
27
public
:
28
enum
PROMOTE_METHOD
29
{
30
GU_PROMOTE_MAX
,
// Choose maximum value of input
31
GU_PROMOTE_MIN
,
// Choose minimum value
32
GU_PROMOTE_MEAN
,
// Average values
33
GU_PROMOTE_MODE
,
// Mode (most common)
34
GU_PROMOTE_MEDIAN
,
// Choose median value
35
GU_PROMOTE_SUM
,
// Sum of values
36
GU_PROMOTE_SUMSQUARE
,
// Sum of the squares
37
GU_PROMOTE_RMS
,
// Root Mean Square
38
GU_PROMOTE_FIRST
,
// First
39
GU_PROMOTE_LAST
,
// Last
40
GU_PROMOTE_ARRAY
,
// All as an array attribute.
41
GU_PROMOTE_UNIQUE
// Array of all unique values (set)
42
};
43
44
/// Promote the given attribute to the new attribute class. The new
45
/// attribute is returned.
46
static
GA_Attribute
*promote(
GU_Detail
&gdp,
47
GA_Attribute
*attrib,
48
GA_AttributeOwner
new_owner,
49
bool
destroy_existing =
true
,
50
PROMOTE_METHOD method = GU_PROMOTE_MEAN,
51
const
char
*new_name=NULL,
52
const
GA_Attribute
*piece_attrib =
nullptr
,
53
GA_Attribute
*index_attrib =
nullptr
);
54
55
/// Promote the given (tuple) attribute to the new attribute class into a
56
/// newly created detached attribute.
57
static
GA_AttributeUPtr
58
create(
GA_AttributeOwner
dst_owner,
59
const
GA_Attribute
&src_attrib,
60
PROMOTE_METHOD method = GU_PROMOTE_MEAN);
61
62
private
:
63
};
64
65
#endif
66
GA_Attribute
Definition of a geometry attribute.
Definition:
GA_Attribute.h:203
GU_Promote::GU_PROMOTE_FIRST
Definition:
GU_Promote.h:38
GU_Promote::GU_PROMOTE_LAST
Definition:
GU_Promote.h:39
GU_Promote::GU_PROMOTE_MEDIAN
Definition:
GU_Promote.h:34
GU_Promote::GU_PROMOTE_ARRAY
Definition:
GU_Promote.h:40
GU_Promote::GU_PROMOTE_SUM
Definition:
GU_Promote.h:35
GU_Promote::PROMOTE_METHOD
PROMOTE_METHOD
Definition:
GU_Promote.h:28
GU_Promote::GU_PROMOTE_MAX
Definition:
GU_Promote.h:30
GU_Promote::GU_PROMOTE_SUMSQUARE
Definition:
GU_Promote.h:36
GA_Attribute.h
GA_Handle.h
GU_Promote::GU_PROMOTE_MEAN
Definition:
GU_Promote.h:32
GU_API
#define GU_API
Definition:
GU_API.h:14
GU_Promote::GU_PROMOTE_MIN
Definition:
GU_Promote.h:31
GA_AttributeUPtr
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
Definition:
GA_Attribute.h:995
GA_AttributeOwner
GA_AttributeOwner
Definition:
GA_Types.h:35
GU_Promote::GU_PROMOTE_MODE
Definition:
GU_Promote.h:33
UT_UniquePtr.h
GU_Promote
Promote attributes from one owner to another.
Definition:
GU_Promote.h:25
GU_Detail
Definition:
GU_Detail.h:159
GA_Types.h
GU_API.h
GU_Promote::GU_PROMOTE_RMS
Definition:
GU_Promote.h:37
GU
GU_Promote.h
Generated on Mon Aug 24 2026 02:26:08 for HDK by
1.8.6