|
HDK
|
#include "GU_API.h"#include <CE/CE_BufferDevice.h>#include <CE/CE_Context.h>#include <GA/GA_CEAttribute.h>#include <GA/GA_IndexMap.h>#include <GA/GA_Names.h>#include <GA/GA_Types.h>#include <UT/UT_Array.h>#include <UT/UT_UniquePtr.h>#include <SYS/SYS_Types.h>
Include dependency graph for GU_Blend.h:Go to the source code of this file.
Classes | |
| struct | GU_Blend::PerAttribData |
| struct | GU_Blend::PerAttribDataT< T > |
| struct | GU_Blend::PerMappingData |
| struct | GU_Blend::MaskData |
| struct | GU_Blend::SparseHeader |
| class | GU_Blend::CachedItemsOCL |
| class | GU_Blend::CachedItems |
| class | GU_Blend::CachedItemsT< T > |
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 } |
| enum | GU_Blend::DeltaModeOCL : uint8_t { GU_Blend::DENSE_MODE, GU_Blend::SPARSE_MODE } |
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 bool | GUblendDetailDict (GU_Detail *gdp, const GU_Detail *gdp1, const UT_StringHolder &attribute, const UT_StringArray &keys, const fpreal64 blend) |
| GU_API bool | GUblendDict (UT_OptionsHolder &opt0, const UT_OptionsHolder &opt1, const UT_StringArray &keys, const fpreal64 blend) |
| 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) |
|
strong |
| Enumerator | |
|---|---|
| None | |
| SetFromAttrib | |
| ScaleFromAttrib | |
Definition at line 43 of file GU_Blend.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| ByGridIndex | |
| ByVoxelPos | |
| Advected | |
Definition at line 35 of file GU_Blend.h.
| 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 bool GUblendDetailDict | ( | GU_Detail * | gdp, |
| const GU_Detail * | gdp1, | ||
| const UT_StringHolder & | attribute, | ||
| const UT_StringArray & | keys, | ||
| const fpreal64 | blend | ||
| ) |
Blend float entries from 2 geometry dict detail attributes. This assumes the attributes have the same attribute name on both geometries. The keys argument is an array of string containing a key to match at each level. This was implemented to blend a float 'value' entry inside a nested dict.
| GU_API bool GUblendDict | ( | UT_OptionsHolder & | opt0, |
| const UT_OptionsHolder & | opt1, | ||
| const UT_StringArray & | keys, | ||
| const fpreal64 | blend | ||
| ) |
| 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()).