Claypool

Courses

Publications

Students

Projects

Service

Downloads

Misc


Dragonfly: Box.h Source File
Dragonfly 2.2
A text-based game engine

Box.h

00001 ///
00002 /// A 2-d bounding box
00003 ///
00004 
00005 #ifndef __BOX_H__
00006 #define __BOX_H__
00007 
00008 #include "Position.h"
00009 
00010 class Box {
00011 
00012  protected:
00013   Position corner;              ///< Upper left corner of box.
00014   int horizontal;               ///< Horizontal dimension.
00015   int vertical;                 ///< Vertical dimension.
00016 
00017  public:
00018   /// Create a box with an upper-left corner, horiz and vert sizes.
00019   Box(Position init_corner, int init_horizontal, int init_vertical);
00020 
00021   /// Create a box with (0,0) for the corner, and 0 for horiz and vert.
00022   Box();
00023   ~Box();
00024 
00025   Position getCorner();
00026   void setCorner(Position new_corner);
00027   int getHorizontal();
00028   void setHorizontal(int new_horizontal);
00029   int getVertical();
00030   void setVertical(int new_vertical);
00031 };
00032 
00033 #endif //__BOX_H__
00034 
 All Classes Functions Variables Friends