HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Blend.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_Blend.h (C++)
7  *
8  * COMMENTS: Functions for blending between details.
9  *
10  */
11 
12 
13  #ifndef __GU_BLEND_H__
14 #define __GU_BLEND_H__
15 
16 #include "GU_API.h"
17 #include <GA/GA_Names.h>
18 #include <GA/GA_Types.h>
19 
20 class UT_StringRef;
21 class GU_Detail;
22 class GA_Group;
23 
24 enum class GU_VoxelBlend
25 {
26  None,
28  ByVoxelPos,
29  Advected
30 };
31 
32 namespace GU_Blend
33 {
35 {
39 };
40 
42 {
44  bool myHasIdAttribMapping = false;
45  bool myIdAttribDataIdIsSame = false;
46 };
47 
49 {
50 public:
60 };
61 }
62 
63 GU_API void GUblend(
64  GU_Detail *dest, const GU_Detail *source, fpreal weight,
65  const char *pattern = "*", const UT_StringRef &ptidattr = GA_Names::id, const UT_StringRef &primidattr = GA_Names::name,
66  bool doslerp = true, bool usevforpinterp = false, float timestep = (1/24.0),
67  GU_VoxelBlend dovoxel = GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items = NULL, const char *velname = "vel", float advdt = 1);
68 
69 /// NOTE: Advected volume interpolation is necessarily linear; in that case, volweight is needed to determine
70 /// which detail to blend with and by how much.
71 GU_API void GUblend(
72  GU_Detail *dest, const GU_Detail *gdps[], const float *weights, int size, const GA_Group *group,
73  const char *pattern = "*", const UT_StringRef &ptidattr = GA_Names::id, const UT_StringRef &primidattr = GA_Names::name,
74  bool doslerp = true, GU_VoxelBlend dovoxel = GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items = NULL,
75  bool is_differencing = true, bool dosparse = false,
76  float timestep = (1/24.0), const char *velname = "vel", float advdt = 1, fpreal volweight = 0);
77 
78 #endif
UT_Array< GA_Offset > myArrayOfOffsets
Definition: GU_Blend.h:43
UT_Array< PerAttribData > * myVertexArrayOfPerAttribData
Definition: GU_Blend.h:53
UT_Array< PerMappingData > * myPtArrayOfPerMappingData
Definition: GU_Blend.h:54
UT_Array< PerAttribData > * myPtArrayOfPerAttribData
Definition: GU_Blend.h:51
GLsizeiptr size
Definition: glcorearb.h:663
GA_API const UT_StringHolder name
Definition: png.h:2467
long long int64
Definition: SYS_Types.h:107
UT_Array< int64 > * myPrimListDataIds
Definition: GU_Blend.h:57
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
UT_Array< PerAttribData > * myPrimArrayOfPerAttribData
Definition: GU_Blend.h:52
#define GU_API
Definition: GU_API.h:12
GA_API const UT_StringHolder id
UT_Array< UT_Array< GA_Offset > > myArrayOfOffsets
Definition: GU_Blend.h:37
GU_VoxelBlend
Definition: GU_Blend.h:24
UT_Array< int64 > * myPtTopoDataIds
Definition: GU_Blend.h:56
double fpreal
Definition: SYS_Types.h:270
int64 * myPtIdDataId
Definition: GU_Blend.h:58
UT_Array< int64 > myArrayOfDataId
Definition: GU_Blend.h:38
GU_API void GUblend(GU_Detail *dest, const GU_Detail *source, fpreal weight, const char *pattern="*", const UT_StringRef &ptidattr=GA_Names::id, const UT_StringRef &primidattr=GA_Names::name, bool doslerp=true, bool usevforpinterp=false, float timestep=(1/24.0), GU_VoxelBlend dovoxel=GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items=NULL, const char *velname="vel", float advdt=1)
int64 * myPrimIdDataId
Definition: GU_Blend.h:59
UT_Array< UT_Array< float > > myArrayOfDeltas
Definition: GU_Blend.h:36
UT_Array< PerMappingData > * myPrimArrayOfPerMappingData
Definition: GU_Blend.h:55