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 |
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 | ( | GA_Range && | src | ) |
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
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 237 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 256 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 265 of file GA_Range.h.
|
inline |
Determine whether a range is empty.
Definition at line 64 of file GA_Range.h.
GA_Iterator GA_Range::end | ( | ) | const |
Default iterator
|
inline |
Get an accurate count of the entries in the range.
Definition at line 251 of file GA_Range.h.
|
inline |
Get an upper bound on the range.
Definition at line 249 of file GA_Range.h.
|
inline |
Query type of element.
Definition at line 243 of file GA_Range.h.
|
inline |
Accessor for RTI.
Definition at line 295 of file GA_Range.h.
|
inline |
Check whether the range is empty.
Definition at line 246 of file GA_Range.h.
|
inline |
Check whether range is valid (i.e. has an implementation)
Definition at line 240 of file GA_Range.h.
Operators
Definition at line 219 of file GA_Range.h.
Operators
Definition at line 224 of file GA_Range.h.
|
friend |
Definition at line 311 of file GA_Range.h.
|
friend |
Definition at line 312 of file GA_Range.h.