UGDK
0.4.1
|
Represents a frame on the screen or an image. More...
#include <ugdk/math/frame.h>
Public Member Functions | |
Frame () | |
Creates an empty frame at (0, 0). | |
Frame (double left, double top, double right, double bottom) | |
Creates a frame with the given coordinates. | |
~Frame () | |
double | width () const |
Returns the width of the frame. | |
double | height () const |
Returns the height of the frame. | |
bool | Collides (const Frame &frame) const |
Returns whether this frame and the other frame are colliding. | |
Accessors and Mutators | |
double | left () const |
void | set_left (double left) |
double | top () const |
void | set_top (double top) |
double | right () const |
void | set_right (double right) |
double | bottom () const |
void | set_bottom (double bottom) |
Represents a frame on the screen or an image.
Represents a rectangular frame on the screen or an image. Useful for working with animations, collision detection, etc. left and top represent the frame's upper-left corner, while right and bottom represent the lower-right coordinates.
|
inline |
Creates an empty frame at (0, 0).
|
inline |
Creates a frame with the given coordinates.
left | The left margin |
top | The upper margin |
right | The right margin |
bottom | The lower margin |
|
inline |
|
inline |
bool ugdk::Frame::Collides | ( | const Frame & | frame | ) | const |
Returns whether this frame and the other frame are colliding.
|
inline |
Returns the height of the frame.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the width of the frame.