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 <
UT/UT_UniquePtr.h
>
19
20
class
GU_Detail
;
21
class
GA_Attribute
;
22
23
/// Promote attributes from one owner to another
24
class
GU_API
GU_Promote
25
{
26
public
:
27
enum
PROMOTE_METHOD
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
GU_PROMOTE_ARRAY
,
// All as an array attribute.
40
};
41
42
/// Promote the given attribute to the new attribute class. The new
43
/// attribute is returned.
44
static
GA_Attribute
*promote(
GU_Detail
&gdp,
45
GA_Attribute
*attrib,
46
GA_AttributeOwner
new_owner,
47
bool
destroy_existing =
true
,
48
PROMOTE_METHOD method = GU_PROMOTE_MEAN,
49
const
char
*new_name=NULL,
50
const
GA_Attribute
*piece_attrib =
nullptr
);
51
52
/// Promote the given (tuple) attribute to the new attribute class into a
53
/// newly created detached attribute.
54
static
GA_AttributeUPtr
55
create(
GA_AttributeOwner
dst_owner,
56
const
GA_Attribute
&src_attrib,
57
PROMOTE_METHOD method = GU_PROMOTE_MEAN);
58
59
private
:
60
};
61
62
#endif
63
GA_Attribute
Definition of a geometry attribute.
Definition:
GA_Attribute.h:198
GU_Promote::GU_PROMOTE_FIRST
Definition:
GU_Promote.h:37
GU_Promote::GU_PROMOTE_LAST
Definition:
GU_Promote.h:38
GU_Promote::GU_PROMOTE_MEDIAN
Definition:
GU_Promote.h:33
GU_Promote::GU_PROMOTE_ARRAY
Definition:
GU_Promote.h:39
GU_Promote::GU_PROMOTE_SUM
Definition:
GU_Promote.h:34
GU_Promote::PROMOTE_METHOD
PROMOTE_METHOD
Definition:
GU_Promote.h:27
GU_Promote::GU_PROMOTE_MAX
Definition:
GU_Promote.h:29
GU_Promote::GU_PROMOTE_SUMSQUARE
Definition:
GU_Promote.h:35
GA_Attribute.h
GU_Promote::GU_PROMOTE_MEAN
Definition:
GU_Promote.h:31
GU_API
#define GU_API
Definition:
GU_API.h:14
GU_Promote::GU_PROMOTE_MIN
Definition:
GU_Promote.h:30
GA_AttributeUPtr
UT_UniquePtr< GA_Attribute > GA_AttributeUPtr
Definition:
GA_Attribute.h:930
GA_AttributeOwner
GA_AttributeOwner
Definition:
GA_Types.h:35
GU_Promote::GU_PROMOTE_MODE
Definition:
GU_Promote.h:32
UT_UniquePtr.h
GU_Promote
Promote attributes from one owner to another.
Definition:
GU_Promote.h:24
GU_Detail
Definition:
GU_Detail.h:154
GA_Types.h
GU_API.h
GU_Promote::GU_PROMOTE_RMS
Definition:
GU_Promote.h:36
GU
GU_Promote.h
Generated on Tue Dec 17 2024 03:39:48 for HDK by
1.8.6