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 {
40 };
41 
43 {
45  bool myHasIdAttribMapping = false;
46  bool myIdAttribDataIdIsSame = false;
47 };
48 
50 {
51 public:
61 };
62 }
63 
64 /// If deleteUnmatched is true, points that don't have a match to interpolate with are deleted.
65 /// If deleteUnmatched is false but unmatchedGroupName is given (non-NULL), then these points
66 /// are instead put into a point group of the specified name.
67 /// Note that points of volume and VDB primitives are neither deleted nor put into the group.
68 GU_API void GUblend(
69  GU_Detail *dest, const GU_Detail *source, fpreal weight,
70  const char *pattern = "*", const UT_StringRef &ptidattr = GA_Names::id, const UT_StringRef &primidattr = GA_Names::name,
71  bool doslerp = true, bool usevforpinterp = false, float timestep = (1/24.0),
72  GU_VoxelBlend dovoxel = GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items = NULL, const char *velname = "vel",
73  float advdt = 1, bool deleteUnmatched = false, const char *unmatchedGroupName = NULL);
74 
75 /// If deleteUnmatched is non-zero, points that have fewer than that many interpolation sources
76 /// are deleted from the output (or put into the specified group if unmatchedGroupName is not
77 /// NULL).
78 /// NOTE: Advected volume interpolation is necessarily linear; in that case, volweight is needed to determine
79 /// which detail to blend with and by how much.
80 GU_API void GUblend(
81  GU_Detail *dest, const GU_Detail *gdps[], const float *weights, int size, const GA_Group *group,
82  const char *pattern = "*", const UT_StringRef &ptidattr = GA_Names::id, const UT_StringRef &primidattr = GA_Names::name,
83  bool doslerp = true, GU_VoxelBlend dovoxel = GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items = NULL,
84  bool is_differencing = true, bool dosparse = false,
85  float timestep = (1/24.0), const char *velname = "vel", float advdt = 1, fpreal volweight = 0,
86  int deleteUnmatched = 0, const char *unmatchedGroupName = NULL);
87 
88 #endif
UT_Array< GA_Offset > myArrayOfOffsets
Definition: GU_Blend.h:44
GLbyte * weights
Definition: glew.h:7551
GLsizeiptr size
Definition: glew.h:1681
UT_Array< PerAttribData > * myVertexArrayOfPerAttribData
Definition: GU_Blend.h:54
UT_Array< PerMappingData > * myPtArrayOfPerMappingData
Definition: GU_Blend.h:55
GLuint GLuint GLfloat weight
Definition: glew.h:13609
UT_Array< PerAttribData > * myPtArrayOfPerAttribData
Definition: GU_Blend.h:52
GLsizei GLsizei GLchar * source
Definition: glew.h:1832
GA_API const UT_StringHolder name
long long int64
Definition: SYS_Types.h:111
UT_Array< UT_Array< int > > myArrayOfPageOffsets
Definition: GU_Blend.h:37
UT_Array< int64 > * myPrimListDataIds
Definition: GU_Blend.h:58
UT_Array< UT_Array< std::pair< GA_PageNum, exint > > > myArrayOfPageStarts
Definition: GU_Blend.h:38
UT_Array< PerAttribData > * myPrimArrayOfPerAttribData
Definition: GU_Blend.h:53
#define GU_API
Definition: GU_API.h:14
GA_API const UT_StringHolder id
GU_VoxelBlend
Definition: GU_Blend.h:24
UT_Array< int64 > * myPtTopoDataIds
Definition: GU_Blend.h:57
double fpreal
Definition: SYS_Types.h:276
int64 * myPtIdDataId
Definition: GU_Blend.h:59
UT_Array< int64 > myArrayOfDataId
Definition: GU_Blend.h:39
int64 * myPrimIdDataId
Definition: GU_Blend.h:60
GLubyte * pattern
Definition: glew.h:5711
UT_Array< UT_Array< float > > myArrayOfDeltas
Definition: GU_Blend.h:36
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, bool deleteUnmatched=false, const char *unmatchedGroupName=NULL)
GLboolean GLuint group
Definition: glew.h:2745
UT_Array< PerMappingData > * myPrimArrayOfPerMappingData
Definition: GU_Blend.h:56