a class for converting 2D integer coordinates into 1D linear coordinates and backward
More...
#include <MRRectIndexer.h>
|
Vector2i | dims_ |
|
size_t | size_ = 0 |
| = dims_.x * dims_.y
|
|
a class for converting 2D integer coordinates into 1D linear coordinates and backward
◆ RectIndexer()
MR::RectIndexer::RectIndexer |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ areNeigbors() [1/2]
bool MR::RectIndexer::areNeigbors |
( |
const Vector2i & | pos0, |
|
|
const Vector2i & | pos1 ) const |
|
inline |
◆ areNeigbors() [2/2]
bool MR::RectIndexer::areNeigbors |
( |
PixelId | v0, |
|
|
PixelId | v1 ) const |
|
inline |
returns true if v1 is within at most 4 neighbors of v0
◆ dims()
const Vector2i & MR::RectIndexer::dims |
( |
| ) |
const |
|
inline |
◆ getNeighbor() [1/2]
MRMESH_API PixelId MR::RectIndexer::getNeighbor |
( |
PixelId | v, |
|
|
const Vector2i & | pos, |
|
|
OutEdge2 | toNei ) const |
◆ getNeighbor() [2/2]
PixelId MR::RectIndexer::getNeighbor |
( |
PixelId | v, |
|
|
OutEdge2 | toNei ) const |
|
inline |
returns id of v's neighbor specified by the edge
◆ size()
size_t MR::RectIndexer::size |
( |
| ) |
const |
|
inline |
◆ toPixelId()
PixelId MR::RectIndexer::toPixelId |
( |
const Vector2i & | pos | ) |
const |
|
inline |
◆ toPos()
Vector2i MR::RectIndexer::toPos |
( |
PixelId | id | ) |
const |
|
inline |
◆ dims_
Vector2i MR::RectIndexer::dims_ |
|
protected |
◆ size_
size_t MR::RectIndexer::size_ = 0 |
|
protected |
The documentation for this class was generated from the following file: