MIRA
Classes | Typedefs | Functions
mira::Private Namespace Reference

Classes

struct  ActiveEdgeCuts
 
struct  ConcreteRPCInvoker
 
struct  ConcreteRPCInvoker_memfn
 
class  EdgeCuts
 
struct  Interval
 
class  Intervals
 
struct  RPCInvokeHelper
 
struct  RPCInvokeHelper< void >
 
struct  RPCInvokeHelperMem
 
struct  RPCInvokeHelperMem< void >
 

Typedefs

template<typename P >
using StrippedType = typename std::remove_const< typename std::remove_reference< P >::type >::type
 

Functions

template<class Visitor >
bool processActiveEdges (ActiveEdgeCuts &activeEdges, const Rect2i &region, Visitor &visitor)
 Process all active edges at current y, advance y, remove any edges that are finished, then return. More...
 
template<class Visitor >
bool processTwoActiveEdges (ActiveEdgeCuts &activeEdges, const Rect2i &region, Visitor &visitor, const int nextY)
 Optimization of processActiveEdges() for exactly 2 active edges: None of them can finish before another edge gets active (or the polygon is done) - designated by nextY. More...
 
template<class Visitor >
bool processIntervals (const ActiveEdgeCuts &activeEdges, Intervals &intervals, const Rect2i &region, Visitor &visitor, uint precision)
 
template<class Visitor >
bool processActiveEdges (ActiveEdgeCuts &activeEdges, Intervals &intervals, const Rect2i &region, Visitor &visitor, uint precision)
 See above. More...
 
template<class Visitor >
bool processTwoActiveEdges (ActiveEdgeCuts &activeEdges, Intervals &intervals, const Rect2i &region, Visitor &visitor, const uint precision, const int nextY)
 See above. More...
 
Point2f roundAwayFromGrid (Point2f point)
 
void processEdge (const Point2f &current, const Point2f &prev, std::vector< EdgeCuts > &cuts)
 
template<class Transformation >
std::vector< EdgeCutscreateEdgeList (const Polygon2f &polygon, Transformation &&F)
 
bool intervalsOverlap (const Interval &interval1, const Interval &interval2)
 
int scaleDown (int numToRound, int multiple)
 
bool compareCurrentCut (const EdgeCuts &a, const EdgeCuts &b)
 
void removeEmptyEdges (ActiveEdgeCuts &activeEdges)
 move empty edges to front of container (and continue behind them) More...
 
void advanceEdgeCuts (ActiveEdgeCuts &activeEdges)
 advance edge cuts, move empty edges to front of container (and continue behind them) More...
 
template<class Visitor >
bool visitInterval (int x_start, int x_end, int y, Visitor &visitor)
 
template<typename Backend , typename T >
StrippedType< T > getFromRequest (typename Backend::ServerRequest &request)
 
template<typename Response >
void throwRPCException (Response &response)
 

Typedef Documentation

◆ StrippedType

using StrippedType = typename std::remove_const<typename std::remove_reference<P>::type>::type

Function Documentation

◆ processActiveEdges() [1/2]

bool mira::Private::processActiveEdges ( ActiveEdgeCuts activeEdges,
const Rect2i region,
Visitor &  visitor 
)

Process all active edges at current y, advance y, remove any edges that are finished, then return.

Gets called for each y by an external loop.

◆ processTwoActiveEdges() [1/2]

bool mira::Private::processTwoActiveEdges ( ActiveEdgeCuts activeEdges,
const Rect2i region,
Visitor &  visitor,
const int  nextY 
)

Optimization of processActiveEdges() for exactly 2 active edges: None of them can finish before another edge gets active (or the polygon is done) - designated by nextY.

Simply loop over y till reaching that point and finally remove finished edges just once.

◆ processIntervals()

bool mira::Private::processIntervals ( const ActiveEdgeCuts activeEdges,
Intervals intervals,
const Rect2i region,
Visitor &  visitor,
uint  precision 
)

◆ processActiveEdges() [2/2]

bool mira::Private::processActiveEdges ( ActiveEdgeCuts activeEdges,
Intervals intervals,
const Rect2i region,
Visitor &  visitor,
uint  precision 
)

See above.

◆ processTwoActiveEdges() [2/2]

bool mira::Private::processTwoActiveEdges ( ActiveEdgeCuts activeEdges,
Intervals intervals,
const Rect2i region,
Visitor &  visitor,
const uint  precision,
const int  nextY 
)

See above.

◆ roundAwayFromGrid()

Point2f mira::Private::roundAwayFromGrid ( Point2f  point)
inline

◆ processEdge()

void mira::Private::processEdge ( const Point2f current,
const Point2f prev,
std::vector< EdgeCuts > &  cuts 
)
inline

◆ createEdgeList()

std::vector<EdgeCuts> mira::Private::createEdgeList ( const Polygon2f polygon,
Transformation &&  F 
)

◆ intervalsOverlap()

bool mira::Private::intervalsOverlap ( const Interval interval1,
const Interval interval2 
)
inline

◆ scaleDown()

int mira::Private::scaleDown ( int  numToRound,
int  multiple 
)
inline

◆ compareCurrentCut()

bool mira::Private::compareCurrentCut ( const EdgeCuts a,
const EdgeCuts b 
)
inline

◆ removeEmptyEdges()

void mira::Private::removeEmptyEdges ( ActiveEdgeCuts activeEdges)
inline

move empty edges to front of container (and continue behind them)

◆ advanceEdgeCuts()

void mira::Private::advanceEdgeCuts ( ActiveEdgeCuts activeEdges)
inline

advance edge cuts, move empty edges to front of container (and continue behind them)

◆ visitInterval()

bool mira::Private::visitInterval ( int  x_start,
int  x_end,
int  y,
Visitor &  visitor 
)

◆ getFromRequest()

StrippedType<T> mira::Private::getFromRequest ( typename Backend::ServerRequest &  request)

◆ throwRPCException()

void mira::Private::throwRPCException ( Response &  response)