The Game Engine  1
Size2D Class Reference

Just for more logical names for sizes of objects. More...

#include <fns.h>

Public Member Functions

 Size2D ()
 
 Size2D (double width, double height)
 
 Size2D (const Size2D &copy)
 
 Size2D (const Point2D &copy)
 
Point2D add (Point2D pt)
 Adds the value of the point to this. More...
 
Point2D sub (Point2D pt)
 Subtracts the value of the point from this. More...
 
Point2D mult (double d)
 Multiplies the values of this by i. More...
 
Point2D div (double d)
 Divides the values of this by i. More...
 
Point2D operator+ (const Point2D &pt) const
 
Point2D operator- (const Point2D &pt) const
 
Point2D operator* (const double scale) const
 
Point2D operator/ (const double scale) const
 

Public Attributes

double w
 x position More...
 
double h
 y Position More...
 

Friends

class Point2D
 

Detailed Description

Just for more logical names for sizes of objects.

This class is tasked with:

  • Being a clone of Point2D with w,h instead of x,y

Definition at line 125 of file fns.h.

Constructor & Destructor Documentation

Size2D::Size2D ( )
inline

Definition at line 129 of file fns.h.

Size2D::Size2D ( double  width,
double  height 
)
inline

Definition at line 130 of file fns.h.

Size2D::Size2D ( const Size2D copy)
inline

Definition at line 131 of file fns.h.

Size2D::Size2D ( const Point2D copy)
inline

Definition at line 136 of file fns.h.

Member Function Documentation

Point2D Size2D::add ( Point2D  pt)

Adds the value of the point to this.

Returns
This after modificaiton
Point2D Size2D::div ( double  d)

Divides the values of this by i.

Returns
This after modificaiton
Point2D Size2D::mult ( double  d)

Multiplies the values of this by i.

Returns
This after modificaiton
Point2D Size2D::operator* ( const double  scale) const
inline

Definition at line 149 of file fns.h.

+ Here is the call graph for this function:

Point2D Size2D::operator+ ( const Point2D pt) const
inline

Definition at line 147 of file fns.h.

+ Here is the call graph for this function:

Point2D Size2D::operator- ( const Point2D pt) const
inline

Definition at line 148 of file fns.h.

+ Here is the call graph for this function:

Point2D Size2D::operator/ ( const double  scale) const
inline

Definition at line 150 of file fns.h.

+ Here is the call graph for this function:

Point2D Size2D::sub ( Point2D  pt)

Subtracts the value of the point from this.

Returns
This after modification

Friends And Related Function Documentation

friend class Point2D
friend

Definition at line 128 of file fns.h.

Member Data Documentation

double Size2D::h

y Position

Definition at line 142 of file fns.h.

double Size2D::w

x position

Definition at line 141 of file fns.h.


The documentation for this class was generated from the following file: