HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Blend.h File Reference
#include "GU_API.h"
#include <GA/GA_Names.h>
#include <GA/GA_Types.h>
#include <UT/UT_Array.h>
+ Include dependency graph for GU_Blend.h:

Go to the source code of this file.

Classes

struct  GU_Blend::PerAttribData
 
struct  GU_Blend::PerMappingData
 
struct  GU_Blend::MaskData
 
class  GU_Blend::CachedItems
 

Namespaces

 GU_Blend
 

Enumerations

enum  GU_VoxelBlend { GU_VoxelBlend::None, GU_VoxelBlend::ByGridIndex, GU_VoxelBlend::ByVoxelPos, GU_VoxelBlend::Advected }
 
enum  GU_MaskMode { GU_MaskMode::None, GU_MaskMode::SetFromAttrib, GU_MaskMode::ScaleFromAttrib }
 

Functions

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)
 
GU_API void GUblend (GU_Detail *dest, const GU_Detail *gdps[], const float *weights, int size, const GA_Group *group, const char *pattern="*", const UT_StringRef &ptidattr=GA_Names::id, const UT_StringRef &primidattr=GA_Names::name, bool doslerp=true, GU_VoxelBlend dovoxel=GU_VoxelBlend::None, GU_Blend::CachedItems *cached_items=NULL, bool is_differencing=true, bool dosparse=false, float timestep=(1/24.0), const char *velname="vel", float advdt=1, fpreal volweight=0, int deleteUnmatched=0, const char *unmatchedGroupName=NULL, const GU_Blend::MaskData *mask_data=NULL, float total=1)
 
GU_API float GUgetInbetweenWeight (float channel_weight, const UT_Array< float > &inbetween_weights, int inbetween_idx)
 
GU_API void GUblendRange (GA_Attribute &attrib0, const GA_Attribute &attrib1, const GA_Range &range0, float weight, const UT_Array< GA_Offset > *mapping)
 
GU_API void GUblendRange (GA_Attribute &attrib0, const GA_Attribute &attrib1, const GA_Range &range0, const UT_Array< float > &weights, const UT_Array< GA_Offset > *mapping)
 

Enumeration Type Documentation

enum GU_MaskMode
strong
Enumerator
None 
SetFromAttrib 
ScaleFromAttrib 

Definition at line 35 of file GU_Blend.h.

enum GU_VoxelBlend
strong
Enumerator
None 
ByGridIndex 
ByVoxelPos 
Advected 

Definition at line 27 of file GU_Blend.h.

Function Documentation

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 
)

If deleteUnmatched is true, points that don't have a match to interpolate with are deleted. If deleteUnmatched is false but unmatchedGroupName is given (non-NULL), then these points are instead put into a point group of the specified name. Note that points of volume and VDB primitives are neither deleted nor put into the group.

GU_API void GUblend ( GU_Detail dest,
const GU_Detail gdps[],
const float weights,
int  size,
const GA_Group group,
const char *  pattern = "*",
const UT_StringRef ptidattr = GA_Names::id,
const UT_StringRef primidattr = GA_Names::name,
bool  doslerp = true,
GU_VoxelBlend  dovoxel = GU_VoxelBlend::None,
GU_Blend::CachedItems cached_items = NULL,
bool  is_differencing = true,
bool  dosparse = false,
float  timestep = (1/24.0),
const char *  velname = "vel",
float  advdt = 1,
fpreal  volweight = 0,
int  deleteUnmatched = 0,
const char *  unmatchedGroupName = NULL,
const GU_Blend::MaskData mask_data = NULL,
float  total = 1 
)

If deleteUnmatched is non-zero, points that have fewer than that many interpolation sources are deleted from the output (or put into the specified group if unmatchedGroupName is not NULL). NOTE: Advected volume interpolation is necessarily linear; in that case, volweight is needed to determine which detail to blend with and by how much.

GU_API void GUblendRange ( GA_Attribute attrib0,
const GA_Attribute attrib1,
const GA_Range range0,
float  weight,
const UT_Array< GA_Offset > *  mapping 
)

Blend the attribute values for the given range, with an optional mapping to different offsets in the second detail. If set, the weights and mapping arrays should be at least as long as attrib0's offset map (attrib0.getIndexMap().offsetSize()).

GU_API void GUblendRange ( GA_Attribute attrib0,
const GA_Attribute attrib1,
const GA_Range range0,
const UT_Array< float > &  weights,
const UT_Array< GA_Offset > *  mapping 
)

Blend the attribute values for the given range, with an optional mapping to different offsets in the second detail. If set, the weights and mapping arrays should be at least as long as attrib0's offset map (attrib0.getIndexMap().offsetSize()).

GU_API float GUgetInbetweenWeight ( float  channel_weight,
const UT_Array< float > &  inbetween_weights,
int  inbetween_idx 
)

Calculate the blend weight for an in-between shape given the channel weight and a list of all in-between weights