Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | Class Members | Related Pages

PlotMM::DoublePoint Class Reference

List of all members.

Detailed Description

Class defining a point in double coordinates.


Public Member Functions

 DoublePoint ()
 DoublePoint (double x, double y)
 DoublePoint (const Gdk::Point &)
bool is_null () const
double get_x () const
double get_y () const
void set_x (double x)
void set_y (double y)
bool operator== (const DoublePoint &) const
bool operator!= (const DoublePoint &) const
const DoublePoint operator- () const
const DoublePoint operator+ (const DoublePoint &) const
const DoublePoint operator- (const DoublePoint &) const
const DoublePoint operator * (double) const
const DoublePoint operator/ (double) const
DoublePointoperator+= (const DoublePoint &)
DoublePointoperator-= (const DoublePoint &)
DoublePointoperator *= (double)
DoublePointoperator/= (double)


Constructor & Destructor Documentation

DoublePoint::DoublePoint  ) 
 

Constructs a point with coordinates (0.0, 0.0) (is_null() returns TRUE).

DoublePoint::DoublePoint double  x,
double  y
 

Constructs a point with x value xpos and y value ypos.

DoublePoint::DoublePoint const Gdk::Point &   ) 
 

Copy constructor.


Member Function Documentation

double PlotMM::DoublePoint::get_x  )  const
 

Returns the x coordinate of the point.

double PlotMM::DoublePoint::get_y  )  const
 

Returns the y coordinate of the point.

bool PlotMM::DoublePoint::is_null  )  const
 

Returns TRUE if both the x value and the y value are 0; otherwise returns false.

const DoublePoint DoublePoint::operator * double   )  const
 

Returns the point formed by multiplying both components by c.

DoublePoint & DoublePoint::operator *= double   ) 
 

Multiplies this point's x and y by c, and returns a reference to this point.

bool DoublePoint::operator!= const DoublePoint  )  const
 

Returns TRUE if point and other are not equal; otherwise returns FALSE.

const DoublePoint DoublePoint::operator+ const DoublePoint other  )  const
 

Returns the point formed by adding both components by the components of other. Each component is added separately.

DoublePoint & DoublePoint::operator+= const DoublePoint  ) 
 

Adds point other to this point and returns a reference to this point.

const DoublePoint DoublePoint::operator- const DoublePoint other  )  const
 

Returns the point formed by subtracting both components by the components of other. Each component is subtracted separately.

const DoublePoint DoublePoint::operator-  )  const
 

Returns the point formed by changing the sign of both components, equivalent to QDoublePoint(-x(), -y());

DoublePoint & DoublePoint::operator-= const DoublePoint  ) 
 

Subtracts point other from this point and returns a reference to this point.

const DoublePoint DoublePoint::operator/ double   )  const
 

Returns the point formed by dividing both components by c.

DoublePoint & DoublePoint::operator/= double   ) 
 

Divides both x and y by c, and returns a reference to this point.

bool DoublePoint::operator== const DoublePoint  )  const
 

Returns TRUE if point and other are equal; otherwise returns FALSE.

void PlotMM::DoublePoint::set_x double  x  ) 
 

Sets the x coordinate of the point to x.

void PlotMM::DoublePoint::set_y double  y  ) 
 

Sets the y coordinate of the point to x.


Generated on Thu Nov 10 15:26:22 2005 for PlotMM by  doxygen 1.4.4