-
Notifications
You must be signed in to change notification settings - Fork 6
mirror_y
Alexandre Marcireau edited this page May 31, 2018
·
8 revisions
In header "../third_party/tarsier/source/mirror_y.hpp"
tarsier::mirror_y
inverts the y coordinate.
namespace tarsier {
template <typename Event, typename HandleEvent>
class mirror_y {
public:
mirror_y(uint16_t height, HandleEvent handle_event)
/// operator() handles an event.
virtual void operator()(Event event);
};
}
-
Event
is the input type. It must have at least the propertyy
. - The expression
handle_event(event)
, whereevent
is anEvent
object, must be valid. -
height
is the maximum y coordinate plus one (ify
is in the integer range[0, 239]
,height
must be240
).
Event
must be specified when using make_mirror_y
:
struct event {
uint16_t y;
};
auto mirror_y = tarsier::make_mirror_y<event>(
239,
[](event event) {
// do something with event
});