Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::Box Class Reference
Collaboration diagram for df::Box:
Collaboration graph
[legend]

Public Member Functions

 Box (Vector init_corner, float init_horizontal, float init_vertical)
 
 Box ()
 
void setCorner (Vector new_corner)
 
Vector getCorner () const
 
void setHorizontal (float new_horizontal)
 
float getHorizontal () const
 
void setVertical (float new_vertical)
 
float getVertical () const
 
bool operator== (const Box &other) const
 
bool operator!= (const Box &other) const
 

Private Attributes

Vector m_corner
 
float m_horizontal
 
float m_vertical
 

Constructor & Destructor Documentation

df::Box::Box ( Vector  init_corner,
float  init_horizontal,
float  init_vertical 
)

Create box with upper-left corner, horiz and vert sizes.

df::Box::Box ( )

Create box with (0,0) for corner, and 0 for horiz and vert.

Member Function Documentation

Vector df::Box::getCorner ( ) const

Get upper left corner of box.

float df::Box::getHorizontal ( ) const

Get horizontal size of box.

float df::Box::getVertical ( ) const

Get vertical size of box.

bool df::Box::operator!= ( const Box other) const

Compare boxes.

bool df::Box::operator== ( const Box other) const

Compare boxes.

void df::Box::setCorner ( Vector  new_corner)

Set upper left corner of box.

void df::Box::setHorizontal ( float  new_horizontal)

Set horizontal size of box.

void df::Box::setVertical ( float  new_vertical)

Set vertical size of box.

Member Data Documentation

Vector df::Box::m_corner
private

Upper left corner of box.

float df::Box::m_horizontal
private

Horizontal dimension.

float df::Box::m_vertical
private

Vertical dimension.