-
Notifications
You must be signed in to change notification settings - Fork 6
mirror_y
Alexandre Marcireau edited this page May 30, 2018
·
8 revisions
In header "../third_party/tarsier/source/mirror_y.hpp"
tarsier::MirrorY
reflects the event's y
property in a horizontal axis.
namespace tarsier {
template <typename Event, std::size_t height,typename HandleEvent>
class MirrorY {
public:
MirrorY(HandleEvent handleEvent);
/// operator() handles an event.
virtual void operator()(Event event);
};
}
-
Event
is the input type. It must have at least the propertyy
. -
height
is the highesty
possible plus one. As an example, ify
is in the range[0, 239]
, thenheight
must be240
. -
HandlEvent
is the event handler. The expressionhandleEvent(event)
, whereevent
is anEvent
, must be valid.
Event
must be specified when using make_mirrorY
:
struct Event {
std::size_t y;
};
auto mirrorY = tarsier::make_mirrorY<Event, 240>([](Event event) {
// do something with event
});