11 #ifndef __GA_MergeMap__
12 #define __GA_MergeMap__
72 void createOffsetMaps();
76 void createTrivialMaps();
79 void createGlobalOffsetMap();
104 {
return *myOffsetMaps[owner]; }
107 {
return myOffsetMaps[owner]->getSourceRange(); }
114 {
return myOffsetMaps[owner]->getDestRange(); }
118 {
return myOffsetMaps[owner]->getDestInitCapacity(); }
122 {
return myOffsetMaps[owner]->getDestCapacity(); }
129 {
return myOffsetMaps[owner]->getDestStart(); }
131 {
return myOffsetMaps[owner]->getDestEnd(); }
137 {
return myOffsetMaps[own]->mapDestFromSource(off);}
141 {
return myOffsetMaps[own]->isIdentityMap(); }
145 {
return myOffsetMaps[own]->isTrivial(); }
149 {
return myOffsetMaps[own]->getTrivialDiff(); }
155 {
return myOffsetMaps[own]->getMergeStrategy(); }
161 void buildMergeOptionPrimitiveMaps()
const;
171 myDest.append(&dest);
176 myDest.setCapacityIfNeeded(entries);
177 mySrc.setCapacityIfNeeded(entries);
184 bool empty()
const {
return myDest.entries() == 0; }
213 return myI == src.myI &&
214 myEnd == src.myEnd &&
218 {
return !(*
this ==
src); }
220 bool atEnd()
const {
return myI == myEnd; }
231 , myEnd(map->entries())
254 return myAttributeMap;
261 AttributeMap myAttributeMap;
bool operator==(const const_iterator &src) const
bool isTrivialMap(GA_AttributeOwner own) const
Convenience method to check for a trivial offset map.
Definition of a geometry attribute.
GA_Size getTrivialDiff(GA_AttributeOwner own) const
Convenience method to check for the dest-source of a trivial offset map.
GA_MergeOptions & getOptions() const
Get the merging options.
bool isIdentityMap(GA_AttributeOwner own) const
Convenience method to check for an identity offset map.
const_iterator end() const
const_iterator begin() const
const_iterator & operator=(const const_iterator &src)
void setCapacityIfNeeded(exint entries)
The merge map keeps track of information when merging details.
const GA_Attribute * getSrc(exint i) const
GA_Offset getDestEnd(GA_AttributeOwner owner) const
exint GA_Size
Defines the bit width for index and offset types in GA.
A range of elements in an index-map.
GA_Offset mapDestFromSource(GA_AttributeOwner own, GA_Offset off) const
Convenience method to get the destination offset from the source offset.
const GA_Attribute * getSrc() const
const GA_Detail & getSource() const
Get the source geometry.
const_iterator & operator++()
void append(GA_Attribute &dest, const GA_Attribute &src)
const GA_Range & getSourceRange(GA_AttributeOwner owner) const
Convenience method to get iterator over the source elements.
GA_Attribute * getDest() const
const_iterator(const const_iterator &src)
GA_Attribute * getDest(exint i) const
void setIterationCount(GA_Size i)
Keeps track of offset mapping when merging index lists.
GA_Size iterationCount() const
bool operator!=(const const_iterator &src) const
GA_MergeOptions::MergeStrategy getMergeStrategy(GA_AttributeOwner own) const
GA_Detail & getDestination() const
Get the destination geometry.
const AttributeMap & getAttributeMap() const
Provide options when performing a merge operation.
Container class for all geometry.
GA_Offset getDestCapacity(GA_AttributeOwner owner) const
Convenience method to get new destination size.
const GA_Range & getDestRange(GA_AttributeOwner owner) const
GA_MergeOffsetMap & getOffsetMap(GA_AttributeOwner owner) const
GA_Offset getDestStart(GA_AttributeOwner owner) const
GA_Offset getDestInitCapacity(GA_AttributeOwner owner) const
Convenience method to get old destination size.