raisim::RayCollisionList::basic_iterator
class · #include <raisim/rayCollision.hpp>
cpp
template <bool IsConst>
class basic_iteratorForward iterator over the valid hits (const or mutable).
Public types
self_type
cpp
using self_type = basic_iterator<IsConst>value_type
cpp
using value_type = RayCollisionItemreference
cpp
using reference = std::conditional_t<IsConst, const value_type &, value_type &>pointer
cpp
using pointer = std::conditional_t<IsConst, const value_type *, value_type *>iterator_category
cpp
using iterator_category = std::forward_iterator_tagiterator_concept
cpp
using iterator_concept = std::forward_iterator_tagdifference_type
cpp
using difference_type = std::ptrdiff_tConstructors & destructor
basic_iterator
cpp
basic_iterator() = defaultcpp
explicit basic_iterator(pointer ptr)Parameters
| Parameter | Description |
|---|---|
ptr (in) | item the iterator points to |
cpp
template <bool OtherConst, typename = std::enable_if_t<IsConst && !OtherConst>>
basic_iterator(const basic_iterator<OtherConst> &other)Conversion from a mutable to a const iterator.
Parameters
| Parameter | Description |
|---|---|
other (in) | mutable iterator |
Public member functions
operator++
cpp
self_type &operator++()prefix: advance, then return the new (incremented) iterator
Returns this iterator
cpp
self_type operator++(int)postfix: return a copy of the pre-increment value
Returns the iterator before incrementing
operator*
cpp
reference operator*() constReturns the current item
operator->
cpp
pointer operator->() constReturns pointer to the current item
operator==
cpp
bool operator==(const self_type &rhs) constParameters
| Parameter | Description |
|---|---|
rhs (in) | other iterator |
Returns true if both point to the same item
operator!=
cpp
bool operator!=(const self_type &rhs) constParameters
| Parameter | Description |
|---|---|
rhs (in) | other iterator |
Returns true if they point to different items