OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
marchsq::__impl::Grid< Rst >::CellIt Struct Reference
Collaboration diagram for marchsq::__impl::Grid< Rst >::CellIt:

Public Types

using iterator_category = std::random_access_iterator_tag
using value_type = TRasterValue<Rst>
using pointer = TRasterValue<Rst>*
using reference = TRasterValue<Rst>&
using difference_type = long

Public Member Functions

TRasterValue< Rst > operator* () const
TRasterValue< Rst > & operator[] (long n) const
CellIt & operator++ ()
CellIt operator++ (int)
CellIt & operator-- ()
CellIt operator-- (int)
CellIt & operator+= (long n)
CellIt & operator-= (long n)
CellIt operator+ (long n) const
CellIt operator- (long n) const
long operator- (const CellIt &o) const
bool operator== (const CellIt &o) const
bool operator!= (const CellIt &o) const
bool operator< (const CellIt &o) const
bool operator> (const CellIt &o) const
bool operator<= (const CellIt &o) const
bool operator>= (const CellIt &o) const

Public Attributes

Coord crd
Dir dir = Dir::none
const Rst * grid = nullptr

Detailed Description

template<class Rst>
struct marchsq::__impl::Grid< Rst >::CellIt

Member Typedef Documentation

◆ difference_type

template<class Rst>
using marchsq::__impl::Grid< Rst >::CellIt::difference_type = long

◆ iterator_category

template<class Rst>
using marchsq::__impl::Grid< Rst >::CellIt::iterator_category = std::random_access_iterator_tag

◆ pointer

template<class Rst>
using marchsq::__impl::Grid< Rst >::CellIt::pointer = TRasterValue<Rst>*

◆ reference

template<class Rst>
using marchsq::__impl::Grid< Rst >::CellIt::reference = TRasterValue<Rst>&

◆ value_type

template<class Rst>
using marchsq::__impl::Grid< Rst >::CellIt::value_type = TRasterValue<Rst>

Member Function Documentation

◆ operator!=()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator!= ( const CellIt & o) const
inline
463{ return crd != o.crd; }
Definition MarchingSquares.hpp:224
Coord crd
Definition MarchingSquares.hpp:402

References crd.

◆ operator*()

template<class Rst>
TRasterValue< Rst > marchsq::__impl::Grid< Rst >::CellIt::operator* ( ) const
inline
406{ return isoval(*grid, crd); }
TRasterValue< T > isoval(const T &rst, const Coord &crd)
Definition MarchingSquares.hpp:175
const Rst * grid
Definition MarchingSquares.hpp:404

References crd, grid, and marchsq::__impl::isoval().

Here is the call graph for this function:

◆ operator+()

template<class Rst>
CellIt marchsq::__impl::Grid< Rst >::CellIt::operator+ ( long n) const
inline
441 {
442 CellIt o = *this;
443 o += n;
444 return o;
445 }

◆ operator++() [1/2]

template<class Rst>
CellIt & marchsq::__impl::Grid< Rst >::CellIt::operator++ ( )
inline
409 {
410 step(crd, dir);
411 return *this;
412 }
void step(Coord &crd, const Dir d, const long n=1)
Definition MarchingSquares.hpp:213
Dir dir
Definition MarchingSquares.hpp:403

References crd, dir, and marchsq::__impl::step().

Here is the call graph for this function:

◆ operator++() [2/2]

template<class Rst>
CellIt marchsq::__impl::Grid< Rst >::CellIt::operator++ ( int )
inline
414 {
415 CellIt o = *this;
416 ++(*this);
417 return o;
418 }

◆ operator+=()

template<class Rst>
CellIt & marchsq::__impl::Grid< Rst >::CellIt::operator+= ( long n)
inline
431 {
432 step(crd, dir, n);
433 return *this;
434 }

References crd, dir, and marchsq::__impl::step().

Here is the call graph for this function:

◆ operator-() [1/2]

template<class Rst>
long marchsq::__impl::Grid< Rst >::CellIt::operator- ( const CellIt & o) const
inline
453 {
454 switch (dir) {
455 case Dir::left: return o.crd.c - crd.c;
456 case Dir::down: return crd.r - o.crd.r;
457 case Dir::right: return crd.c - o.crd.c;
458 case Dir::up: return o.crd.r - crd.r;
459 default: return 0;
460 }
461 }

References marchsq::Coord::c, crd, dir, marchsq::__impl::down, marchsq::__impl::left, marchsq::Coord::r, marchsq::__impl::right, and marchsq::__impl::up.

◆ operator-() [2/2]

template<class Rst>
CellIt marchsq::__impl::Grid< Rst >::CellIt::operator- ( long n) const
inline
447 {
448 CellIt o = *this;
449 o -= n;
450 return o;
451 }

◆ operator--() [1/2]

template<class Rst>
CellIt & marchsq::__impl::Grid< Rst >::CellIt::operator-- ( )
inline
420 {
421 step(crd, dir, -1);
422 return *this;
423 }

References crd, dir, and marchsq::__impl::step().

Here is the call graph for this function:

◆ operator--() [2/2]

template<class Rst>
CellIt marchsq::__impl::Grid< Rst >::CellIt::operator-- ( int )
inline
425 {
426 CellIt o = *this;
427 --(*this);
428 return o;
429 }

◆ operator-=()

template<class Rst>
CellIt & marchsq::__impl::Grid< Rst >::CellIt::operator-= ( long n)
inline
436 {
437 step(crd, dir, -n);
438 return *this;
439 }

References crd, dir, and marchsq::__impl::step().

Here is the call graph for this function:

◆ operator<()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator< ( const CellIt & o) const
inline
464{ return (*this - o) < 0; }

◆ operator<=()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator<= ( const CellIt & o) const
inline
466{ return (*this - o) <= 0; }

◆ operator==()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator== ( const CellIt & o) const
inline
462{ return crd == o.crd; }

References crd.

◆ operator>()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator> ( const CellIt & o) const
inline
465{ return (*this - o) > 0; }

◆ operator>=()

template<class Rst>
bool marchsq::__impl::Grid< Rst >::CellIt::operator>= ( const CellIt & o) const
inline
467{ return (*this - o) >= 0; }

◆ operator[]()

template<class Rst>
TRasterValue< Rst > & marchsq::__impl::Grid< Rst >::CellIt::operator[] ( long n) const
inline
407{ return *((*this) + n); }

Member Data Documentation

◆ crd

◆ dir

◆ grid

template<class Rst>
const Rst* marchsq::__impl::Grid< Rst >::CellIt::grid = nullptr

Referenced by operator*().


The documentation for this struct was generated from the following file: