Andreas Garmannslund / Mbed 2 deprecated SimplePlatformGame

Dependencies:   N5110 PinDetect PowerControl mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Geometry.h Source File

Geometry.h

Go to the documentation of this file.
00001 #ifndef GEOMETRY_H
00002 #define GEOMETRY_H
00003 
00004 /// @file Geometry.h
00005 
00006 /// Simple objects with a position (x,y) and velocity (vx, vy)
00007 struct Point
00008 {
00009     int x;
00010     int y;
00011     int vx, vy;
00012 };
00013 
00014 /// Rectangle with position (x and y) and dimensions (width and height)
00015 struct Rectangle
00016 {
00017     Rectangle(int x, int y, int w, int h) : x(x), y(y), width(w), height(h) {}
00018     int x;
00019     int y;
00020     int width;
00021     int height;
00022 };
00023 
00024 #endif