Skip to content

raisim::RayCollisionList::basic_iterator ​

class · #include <raisim/rayCollision.hpp>

cpp
template <bool IsConst>
class basic_iterator

Forward 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 = RayCollisionItem

reference ​

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_tag

iterator_concept ​

cpp
using iterator_concept = std::forward_iterator_tag

difference_type ​

cpp
using difference_type = std::ptrdiff_t

Constructors & destructor ​

basic_iterator ​

cpp
basic_iterator() = default
cpp
explicit basic_iterator(pointer ptr)

Parameters

ParameterDescription
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

ParameterDescription
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*() const

Returns the current item

operator-> ​

cpp
pointer operator->() const

Returns pointer to the current item

operator== ​

cpp
bool operator==(const self_type &rhs) const

Parameters

ParameterDescription
rhs (in)other iterator

Returns true if both point to the same item

operator!= ​

cpp
bool operator!=(const self_type &rhs) const

Parameters

ParameterDescription
rhs (in)other iterator

Returns true if they point to different items

RaiSim — physics for robotics and AI.