WXP::Points Class Reference

This class creates an array a 2D points (x, y). More...

#include "../include/Points.h"

List of all members.

Public Member Functions

int init ()
int init (int size)
 Points ()
 Points (int size)
 ~Points ()
 Points (const Points &data)
Points operator= (const Points &data)
int copy (const Points &data)
int copy (const Points &data, int start, int rnum)
int clear ()
int expand (int size)
int add (float x, float y)
int add (Point pt)
int add1 (Point pt)
int add (int ind)
int add1 (int ind)
int set (int ind, float rx, float ry)
int set (int ind, Point &pt)
int get (int ind, Point &pt)
Point get (int ind)
int remove (int ind)
int insert (int ind, Point &pt)
int insert (int ind, float x, float y)
float getX (int ind)
float getY (int ind)
float getX1 (int ind)
float getY1 (int ind)
int getNum ()
int offset (int ind, float rx, float ry)
int offset (float rx, float ry)
int within (Point &pt)
int getCenter (Point &pt)
int getCentroid (Point &pt)
int print ()

Detailed Description

This class creates an array a 2D points (x, y).

Author:
Dan Vietor

Constructor & Destructor Documentation

Points::Points (  ) 

Constructor. Initializes the values.

References init().

Points::Points ( int  size  ) 

Constructor. Size the arrays.

References init().

Points::~Points (  ) 

Destructor.

Points::Points ( const Points data  ) 

Copy constructor.

Parameters:
data Strings class to copy from

References copy().


Member Function Documentation

int Points::add ( int  ind  ) 

Adds a new point from the existing list.

Parameters:
ind Index of point to copy to and of list

References add().

int Points::add ( Point  pt  ) 

Adds a new point.

Parameters:
pt Point class with values

References WXP::Point::x, and WXP::Point::y.

int Points::add ( float  rx,
float  ry 
)
int Points::copy ( const Points data  ) 

Copy data.

Parameters:
epts Strings class to copy from

References init().

Referenced by WXP::Plot::drawLine(), WXP::Plot::drawSpline(), operator=(), and Points().

Point Points::get ( int  ind  ) 

Gets a specific point value from array.

Parameters:
ind Index of value to get
Returns:
Output Point class with values
int Points::get ( int  ind,
Point pt 
)

Gets a specific point value from array.

Parameters:
ind Index of value to get
Return values:
pnt Output Point class with values

References WXP::Point::x, and WXP::Point::y.

Referenced by WXP::Domain::adjust(), and WXP::Lev2Plot::draw().

int WXP::Points::getNum (  )  [inline]
int Points::init ( int  size  ) 

Initializes the values

int Points::init (  ) 

Initializes the values

Referenced by copy(), and Points().

int Points::offset ( float  rx,
float  ry 
)

Offsets the entire array.

Parameters:
rx New x value
ry New y value
int Points::offset ( int  ind,
float  rx,
float  ry 
)

Offsets a specific point value in array.

Parameters:
ind Index of value to set
rx New x value
ry New y value

Referenced by WXP::Lev2Plot::draw(), WXP::Graph::drawLine(), WXP::Domain::offsetLine(), and WXP::Domain::wrapLine().

Points Points::operator= ( const Points data  ) 

Assignment operator. Used to overload copying

Parameters:
data String class to copy from

References copy().

int Points::print (  ) 

Prints the values to standard output.

int Points::remove ( int  ind  ) 

Deletes a specific point from array.

Parameters:
ind Index of point to delete
int Points::set ( int  ind,
Point pt 
)

Sets a specific point value in array.

Parameters:
ind Index of value to set
pnt New values

References WXP::Point::x, and WXP::Point::y.

int Points::set ( int  ind,
float  rx,
float  ry 
)

Sets a specific point value in array.

Parameters:
ind Index of value to set
rx New x value
ry New y value

Referenced by WXP::Domain::adjust().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1