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_AttributeSwap.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_AttributeSwap.h ( GU Library, C++)
7
*
8
* COMMENTS:
9
*/
10
11
#ifndef __GU_AttributeSwap__
12
#define __GU_AttributeSwap__
13
14
#include "
GU_API.h
"
15
#include <
GA/GA_Types.h
>
16
17
class
GU_Detail
;
18
class
UT_StringRef
;
19
20
21
class
GU_API
GU_AttributeSwap
22
{
23
public
:
24
/// Operation to perform.
25
/// Move will remove the source. Note the point attribute P cannot
26
/// be moved so it will be instead silently copied.
27
/// Swap exchanges the pair. If destination is missing, it is copied.
28
enum
SwapMethod
29
{
30
METHOD_SWAP
,
31
METHOD_COPY
,
32
METHOD_MOVE
,
33
NUM_METHODS
34
};
35
36
/// What to do about typeinfos. When stashing attributes one often
37
/// wants to clear the transform type so succeeding deformers don't
38
/// also change your stashed values, this becomes the preserve-dest.
39
/// OTOH, when duplicating, you want the copy to have the source typeinfo.
40
/// This is ignored for swapping.
41
enum
TypeInfo
42
{
43
TYPEINFO_USE_SOURCE
,
44
TYPEINFO_PRESERVE_DEST
,
45
NUM_TYPEINFOS
46
};
47
48
/// Does the method to the two named attributes. If swapping a missing
49
/// attribute, will first create it.
50
/// source attribute is assumed to exist.
51
/// Returns false if failed for some reason; note there are special
52
/// rules about how P can change.
53
/// You must invoke gdp->refreshCachedAttributes() if there is a risk
54
/// you changed the P attribute!
55
static
bool
swapAttribute(
GU_Detail
*gdp, SwapMethod method, TypeInfo typeinfo,
GA_AttributeOwner
owner,
const
UT_StringRef
&srcname,
const
UT_StringRef
&dstname);
56
};
57
58
#endif
59
GU_AttributeSwap::TYPEINFO_PRESERVE_DEST
Definition:
GU_AttributeSwap.h:44
GU_AttributeSwap::METHOD_SWAP
Definition:
GU_AttributeSwap.h:30
UT_StringRef
Definition:
UT_StringHolder.h:188
GU_AttributeSwap::SwapMethod
SwapMethod
Definition:
GU_AttributeSwap.h:28
GU_API
#define GU_API
Definition:
GU_API.h:14
GU_AttributeSwap::METHOD_COPY
Definition:
GU_AttributeSwap.h:31
GA_AttributeOwner
GA_AttributeOwner
Definition:
GA_Types.h:35
GU_Detail
Definition:
GU_Detail.h:154
GU_AttributeSwap::METHOD_MOVE
Definition:
GU_AttributeSwap.h:32
GA_Types.h
GU_API.h
GU_AttributeSwap
Definition:
GU_AttributeSwap.h:21
GU_AttributeSwap::TypeInfo
TypeInfo
Definition:
GU_AttributeSwap.h:41
GU_AttributeSwap::TYPEINFO_USE_SOURCE
Definition:
GU_AttributeSwap.h:43
GU
GU_AttributeSwap.h
Generated on Sun Nov 17 2024 03:01:16 for HDK by
1.8.6