UGDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
ugdk::Frame Class Reference

Represents a frame on the screen or an image. More...

#include <frame.h>

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

ugdk::Frame::Frame ( ) [inline]

Creates an empty frame at (0, 0).

ugdk::Frame::Frame ( double  left,
double  top,
double  right,
double  bottom 
) [inline]

Creates a frame with the given coordinates.

Parameters:
leftThe left margin
topThe upper margin
rightThe right margin
bottomThe lower margin
ugdk::Frame::~Frame ( ) [inline]

Member Function Documentation

double ugdk::Frame::bottom ( ) const [inline]
bool ugdk::Frame::Collides ( const Frame frame) const

Returns whether this frame and the other frame are colliding.

double ugdk::Frame::height ( ) const [inline]

Returns the height of the frame.

double ugdk::Frame::left ( ) const [inline]
double ugdk::Frame::right ( ) const [inline]
void ugdk::Frame::set_bottom ( double  bottom) [inline]
void ugdk::Frame::set_left ( double  left) [inline]
void ugdk::Frame::set_right ( double  right) [inline]
void ugdk::Frame::set_top ( double  top) [inline]
double ugdk::Frame::top ( ) const [inline]
double ugdk::Frame::width ( ) const [inline]

Returns the width of the frame.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines