HDK
|
A range of elements in an index-map. More...
#include <GA_Range.h>
Classes | |
class | emptyrange |
class | enditerator |
class | ignore_order |
class | includetemporaries |
class | ordered |
class | pointref |
class | primitiveref |
class | safedeletions |
Public Types | |
typedef GA_Iterator | const_iterator |
typedef GA_Iterator | iterator |
Public Member Functions | |
bool | empty () const |
Determine whether a range is empty. More... | |
GA_Range (const GA_IndexMap &map, const GA_OffsetList &offsetlist, GA_Size start=0, GA_Size end=-1) | |
GA_Range (const GA_ElementGroup &group, bool complement=false) | |
GA_Range (const GA_IndexMap &map, const GA_ElementGroup *group, bool complement=false) | |
GA_Range (const GA_Detail &geo, GA_Offset point, GA_AttributeOwner owner, pointref, bool harden) | |
GA_Range (const GA_Detail &geo, const GA_Range &point_range, GA_AttributeOwner type, pointref, bool harden) | |
GA_Range (const GA_Detail &geo, GA_Offset prim, GA_AttributeOwner owner, primitiveref, bool harden) | |
GA_Range (const GA_Detail &geo, const GA_Range &primitive_range, GA_AttributeOwner type, primitiveref, bool harden) | |
GA_Range (const GA_Detail &geo, const GA_Range &primitive_range, GA_AttributeOwner type, primitiveref, ordered, bool harden) | |
GA_Range (const GA_IndexMap &map, includetemporaries) | |
void | adopt (GA_RangeTypeInterface *r) |
bool | isValid () const |
Check whether range is valid (i.e. has an implementation) More... | |
GA_AttributeOwner | getOwner () const |
Query type of element. More... | |
bool | isEmpty () const |
Check whether the range is empty. More... | |
GA_Size | getMaxEntries () const |
Get an upper bound on the range. More... | |
GA_Size | getEntries () const |
Get an accurate count of the entries in the range. More... | |
bool | areTraversalDeletionsSafe () const |
bool | canContainDuplicates () const |
const GA_RangeMemberQuery * | allocMemberQuery () const |
const GA_RangeTypeInterface * | getRTI () const |
Accessor for RTI. More... | |
GA_Range () | |
GA_Range (const GA_RangeTypeInterface &range) | |
GA_Range (const GA_Range &src) | |
GA_Range (GA_Range &&src) noexcept | |
~GA_Range () | |
GA_Iterator | begin () const |
enditerator | end () const |
GA_Range (const GA_Range &src, ordered, bool descending=false) | |
GA_Range (const GA_Range &src, safedeletions) | |
GA_Range (const GA_IndexMap &map, emptyrange) | |
GA_Range (const GA_IndexMap &map) | |
GA_Range (const GA_IndexMap &map, GA_Offset start, GA_Offset end) | |
GA_Range (const GA_IndexMap &map, GA_Index start, GA_Index end, ordered) | |
GA_Range (const GA_IndexMap &map, GA_Index start, GA_Index end, GA_Size step, ordered) | |
GA_Range (const GA_ElementGroup &group, ignore_order, bool complement=false) | |
GA_Range (const GA_IndexMap &map, const GA_ElementGroup *group, ignore_order, bool complement=false) | |
const GA_Range & | operator= (const GA_Range &src) |
const GA_Range & | operator= (GA_Range &&src) noexcept |
bool | operator== (const GA_Range &src) const |
Friends | |
class | GA_RangeTypeInterface |
class | GA_SplittableRange |
A range of elements in an index-map.
A range specifies a selection/collection of elements in an index map for iteration. The membership state of individual elements can also be queried (
Iteration over a range, performed by instantiating a GA_Iterator, does not affect the range object itself. The begin() method can be used to initialize a basic iterator.
Custom range types are implemented by subclassing GA_RangeTypeInterface.
Definition at line 42 of file GA_Range.h.
typedef GA_Iterator GA_Range::const_iterator |
Definition at line 45 of file GA_Range.h.
typedef GA_Iterator GA_Range::iterator |
Definition at line 46 of file GA_Range.h.
GA_Range::GA_Range | ( | ) |
Constructor/destructors
GA_Range::GA_Range | ( | const GA_RangeTypeInterface & | range | ) |
Constructor/destructors
GA_Range::GA_Range | ( | const GA_Range & | src | ) |
Constructor/destructors
|
noexcept |
Constructor/destructors
GA_Range::~GA_Range | ( | ) |
Constructor/destructors
Interface for making another range into an ordered range.
descending | If true, the index order is going to be in a descending order. If false, it's ascending. |
GA_Range::GA_Range | ( | const GA_Range & | src, |
safedeletions | |||
) |
Interface for making another range into one where deletions are safe to perform during the traversal.
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
emptyrange | |||
) |
An empty range.
|
explicit |
Convenience constructor to construct an offset range The range includes start
, but doesn't include end
.
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
GA_Offset | start, | ||
GA_Offset | end | ||
) |
Convenience constructor to construct an offset range The range includes start
, but doesn't include end
.
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
GA_Index | start, | ||
GA_Index | end, | ||
ordered | |||
) |
Convenience constructor to construct an index range
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
GA_Index | start, | ||
GA_Index | end, | ||
GA_Size | step, | ||
ordered | |||
) |
Convenience constructor to construct an index range
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
const GA_OffsetList & | offsetlist, | ||
GA_Size | start = 0 , |
||
GA_Size | end = -1 |
||
) |
Constructor to create a range containing the offsets in the given list. If end < 0, it will be set to the offsetlist.entries()
|
explicit |
Construct a range of the elements in a given group
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
const GA_ElementGroup * | group, | ||
bool | complement = false |
||
) |
Construct a range of the elements in a given group
GA_Range::GA_Range | ( | const GA_ElementGroup & | group, |
ignore_order | , | ||
bool | complement = false |
||
) |
Construct a range of the elements in a given group, ignoring its order even if it is ordered.
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
const GA_ElementGroup * | group, | ||
ignore_order | , | ||
bool | complement = false |
||
) |
Construct a range of the elements in a given group, ignoring its order even if it is ordered.
GA_Range::GA_Range | ( | const GA_Detail & | geo, |
GA_Offset | point, | ||
GA_AttributeOwner | owner, | ||
pointref | , | ||
bool | harden | ||
) |
Construct a range of all the elements referencing a given point. The harden argument determines whether it is safe to use this range after the point has been deleted. If the point will exist for the lifetime of the range, harden can be false and thus more efficient.
For example, to find all the vertices which reference point number 3:
GA_Range::GA_Range | ( | const GA_Detail & | geo, |
const GA_Range & | point_range, | ||
GA_AttributeOwner | type, | ||
pointref | , | ||
bool | harden | ||
) |
Construct a range of all primitives/vertices referenced by the points in the given range. The harden argument determines whether it is safe to use this range after the point has been deleted. If the point will exist for the lifetime of the range, harden can be false and thus more efficient.
GA_Range::GA_Range | ( | const GA_Detail & | geo, |
GA_Offset | prim, | ||
GA_AttributeOwner | owner, | ||
primitiveref | , | ||
bool | harden | ||
) |
Construct a range of all the elements used by a given primitive. The harden argument determines whether it is safe to use this range after the primitive has been deleted. If the primitive will exist for the lifetime of the range, harden can be false, and thus more efficient. If vertices are added or removed during traversal and harden is true, only the original vertices will be traversed, but behaviour is undefined if harden is false.
For example, to find all the points which referenced by primitive 3:
GA_Range::GA_Range | ( | const GA_Detail & | geo, |
const GA_Range & | primitive_range, | ||
GA_AttributeOwner | type, | ||
primitiveref | , | ||
bool | harden | ||
) |
Construct a range of all points/vertices referenced by the primitives in the given range. The harden argument determines whether it is safe to use this range after the primitive has been deleted. If the primitive will exist for the lifetime of the range, harden can be false and thus more efficient.
GA_Range::GA_Range | ( | const GA_Detail & | geo, |
const GA_Range & | primitive_range, | ||
GA_AttributeOwner | type, | ||
primitiveref | , | ||
ordered | , | ||
bool | harden | ||
) |
Construct a range of all points/vertices referenced by the primitives in the given range. The harden argument determines whether it is safe to use this range after the primitive has been deleted. If the primitive will exist for the lifetime of the range, harden can be false and thus more efficient.
This version delivers the points/vertices in the order imposed by the primitive_range
. This is equivalent to traversing the vertices of each primitive with a GA_Primitive::const_iterator as it is visited.
GA_Range::GA_Range | ( | const GA_IndexMap & | map, |
includetemporaries | |||
) |
Iterate over all elements in the index map, including any temporary elements. This should be used within ATI's when changing data for all elements (including temporaries).
|
inline |
Take ownership of the given GA_RangeTypeInterface. This is used to avoid unnecessary calls to GA_RangeTypeInterface::copy().
Definition at line 238 of file GA_Range.h.
const GA_RangeMemberQuery* GA_Range::allocMemberQuery | ( | ) | const |
Allocate an object for testing the membership of individual elements to this range. The caller is responsible for deleting this object, which should not outlive the allocating range.
Behaviour of this object is undefined for any elements that have been deleted or moved since its creation.
|
inline |
Query if it is safe to delete an element during traversal. If not, you can build an equivalent range by calling: GA_Range(initial_range, GA_Range::safedeletions)
Definition at line 257 of file GA_Range.h.
GA_Iterator GA_Range::begin | ( | ) | const |
Default iterator
|
inline |
Query if the range contains duplicates. If it cannot, then optimizations can be made assuming that there are no duplicates in the range. This defaults to true.
Definition at line 266 of file GA_Range.h.
|
inline |
Determine whether a range is empty.
Definition at line 66 of file GA_Range.h.
|
inline |
Default iterator
Definition at line 62 of file GA_Range.h.
|
inline |
Get an accurate count of the entries in the range.
Definition at line 252 of file GA_Range.h.
|
inline |
Get an upper bound on the range.
Definition at line 250 of file GA_Range.h.
|
inline |
Query type of element.
Definition at line 244 of file GA_Range.h.
|
inline |
Accessor for RTI.
Definition at line 296 of file GA_Range.h.
|
inline |
Check whether the range is empty.
Definition at line 247 of file GA_Range.h.
|
inline |
Check whether range is valid (i.e. has an implementation)
Definition at line 241 of file GA_Range.h.
Operators
Definition at line 220 of file GA_Range.h.
Operators
Definition at line 225 of file GA_Range.h.
bool GA_Range::operator== | ( | const GA_Range & | src | ) | const |
Operators
|
friend |
Definition at line 312 of file GA_Range.h.
|
friend |
Definition at line 313 of file GA_Range.h.