HDK
|
The merge map keeps track of information when merging details. More...
#include <GA_MergeMap.h>
Classes | |
class | AttributeMap |
Public Member Functions | |
GA_MergeMap (GA_Detail &dest, const GA_Detail &src, GA_MergeOptions &opts) | |
~GA_MergeMap () | |
void | clear () |
Clear for multiple iterations. More... | |
void | createOffsetMaps () |
void | createTrivialMaps () |
void | createGlobalOffsetMap () |
Create offset maps for merging of global attributes. More... | |
GA_Detail & | getDestination () const |
Get the destination geometry. More... | |
const GA_Detail & | getSource () const |
Get the source geometry. More... | |
GA_MergeOptions & | getOptions () const |
Get the merging options. More... | |
void | setAttributeMap (const GA_Attribute &src, GA_Attribute &dest) |
const GA_Attribute * | getSourceAttribute (const GA_Attribute &dest) const |
Retrieve the source attribute mapped to the destination attribute. More... | |
GA_Offset | mapDestFromSource (GA_AttributeOwner own, GA_Offset off) const |
Convenience method to get the destination offset from the source offset. More... | |
bool | isIdentityMap (GA_AttributeOwner own) const |
Convenience method to check for an identity offset map. More... | |
bool | isTrivialMap (GA_AttributeOwner own) const |
Convenience method to check for a trivial offset map. More... | |
GA_Size | getTrivialDiff (GA_AttributeOwner own) const |
Convenience method to check for the dest-source of a trivial offset map. More... | |
GA_MergeOptions::MergeStrategy | getMergeStrategy (GA_AttributeOwner own) const |
void | buildMergeOptionPrimitiveMaps () const |
const AttributeMap & | getAttributeMap () const |
GA_Size | iterationCount () const |
void | setIterationCount (GA_Size i) |
GA_MergeOffsetMap & | getOffsetMap (GA_AttributeOwner owner) const |
const GA_Range & | getSourceRange (GA_AttributeOwner owner) const |
Convenience method to get iterator over the source elements. More... | |
const GA_Range & | getDestRange (GA_AttributeOwner owner) const |
GA_Offset | getDestInitCapacity (GA_AttributeOwner owner) const |
Convenience method to get old destination size. More... | |
GA_Offset | getDestCapacity (GA_AttributeOwner owner) const |
Convenience method to get new destination size. More... | |
GA_Offset | getDestStart (GA_AttributeOwner owner) const |
GA_Offset | getDestEnd (GA_AttributeOwner owner) const |
The merge map keeps track of information when merging details.
Merging details involves merging
When merging attribute data there are two different modes. The mode is per attribute type (i.e. point data might be a full merge while primitives might be a compact merge).
When merging subsets of the source geometry, compact merging is automatically turned on.
Definition at line 53 of file GA_MergeMap.h.
GA_MergeMap::GA_MergeMap | ( | GA_Detail & | dest, |
const GA_Detail & | src, | ||
GA_MergeOptions & | opts | ||
) |
GA_MergeMap::~GA_MergeMap | ( | ) |
void GA_MergeMap::buildMergeOptionPrimitiveMaps | ( | ) | const |
Used to fill out the GA_MergeOptions primitive maps, after the primitives have been merged.
void GA_MergeMap::clear | ( | ) |
Clear for multiple iterations.
void GA_MergeMap::createGlobalOffsetMap | ( | ) |
Create offset maps for merging of global attributes.
void GA_MergeMap::createOffsetMaps | ( | ) |
Before the merge map can be used, the source & destination iterators need to be created. This may also adjust index maps if they need to be interleaved.
void GA_MergeMap::createTrivialMaps | ( | ) |
Creates a trivial merge map, and doesn't change the destination detail, because the index maps are assumed to have already been updated.
|
inline |
Access the attribute map that maps between the destination and source attributes. The key is the destination attribute, the value is the source attribute. All values are stored as pointers.
Definition at line 252 of file GA_MergeMap.h.
|
inline |
Convenience method to get new destination size.
Definition at line 121 of file GA_MergeMap.h.
|
inline |
Get the offset map for a class of elements.
Definition at line 130 of file GA_MergeMap.h.
|
inline |
Get the destination geometry.
Definition at line 82 of file GA_MergeMap.h.
|
inline |
Convenience method to get old destination size.
Definition at line 117 of file GA_MergeMap.h.
|
inline |
Convenience method to get iterator over the destination elements.
Definition at line 113 of file GA_MergeMap.h.
|
inline |
Convenience methods to get the destination range where the merged data is to be placed (MERGE_COPY, MERGE_APPEND). This range is inclusive [start..end].
Definition at line 128 of file GA_MergeMap.h.
|
inline |
Convenience method to get the merge strategy
Definition at line 154 of file GA_MergeMap.h.
|
inline |
Get the offset map for a class of elements.
Definition at line 103 of file GA_MergeMap.h.
|
inline |
Get the merging options.
Definition at line 88 of file GA_MergeMap.h.
|
inline |
Get the source geometry.
Definition at line 85 of file GA_MergeMap.h.
const GA_Attribute* GA_MergeMap::getSourceAttribute | ( | const GA_Attribute & | dest | ) | const |
Retrieve the source attribute mapped to the destination attribute.
|
inline |
Convenience method to get iterator over the source elements.
Definition at line 106 of file GA_MergeMap.h.
|
inline |
Convenience method to check for the dest-source of a trivial offset map.
Definition at line 148 of file GA_MergeMap.h.
|
inline |
Convenience method to check for an identity offset map.
Definition at line 140 of file GA_MergeMap.h.
|
inline |
Convenience method to check for a trivial offset map.
Definition at line 144 of file GA_MergeMap.h.
|
inline |
When performing multiple merges of a single source geometry, this is set to the iteration count.
Definition at line 65 of file GA_MergeMap.h.
|
inline |
Convenience method to get the destination offset from the source offset.
Definition at line 135 of file GA_MergeMap.h.
void GA_MergeMap::setAttributeMap | ( | const GA_Attribute & | src, |
GA_Attribute & | dest | ||
) |
Store a mapping between a source attribute and a destination attribute. This is built automatically for during attribute processing during merging. The GA_AIFMerge::getDestination() is used to define the map.
When performing multiple merges of a single source geometry, this is set to the iteration count.
Definition at line 66 of file GA_MergeMap.h.