This class creates an array a 2D points (x, y). More...
#include "../include/Points.h"
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 () |
This class creates an array a 2D points (x, y).
| 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 | ) |
| int Points::add | ( | int | ind | ) |
Adds a new point from the existing list.
| ind | Index of point to copy to and of list |
References add().
| int Points::add | ( | Point | pt | ) |
Adds a new point.
| pt | Point class with values |
References WXP::Point::x, and WXP::Point::y.
| int Points::add | ( | float | rx, | |
| float | ry | |||
| ) |
Adds a new point.
| rx | Sets X | |
| ry | Sets Y |
Referenced by add(), WXP::WatchPlot::draw(), WXP::RedbookPlot::draw(), WXP::MetaPlot::draw(), WXP::MapPlot::draw(), WXP::Lev2Plot::draw(), WXP::CloudPlot::draw(), WXP::Plot::drawCircle(), WXP::Graph::drawCircle(), WXP::Graph::drawFill(), WXP::Plot::drawLine(), WXP::Graph::drawLine(), WXP::Graph::drawMarkLine(), WXP::Graph::drawRect(), WXP::Plot::drawSpline(), and WXP::Graph::drawSymbol().
| int Points::copy | ( | const Points & | data | ) |
Copy data.
| 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.
| ind | Index of value to get |
| int Points::get | ( | int | ind, | |
| Point & | pt | |||
| ) |
Gets a specific point value from array.
| ind | Index of value to get |
| 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] |
Return the number of points
Referenced by WXP::Domain::adjust(), WXP::MapPlot::draw(), WXP::XWindow::drawFill(), WXP::Graph::drawFill(), WXP::XWindow::drawLine(), WXP::Plot::drawLine(), WXP::Graph::drawLine(), WXP::Plot::drawSpline(), WXP::Domain::offsetLine(), WXP::GTran::pointsInWindow(), and WXP::Domain::wrapLine().
| int Points::init | ( | int | size | ) |
Initializes the values
| int Points::offset | ( | float | rx, | |
| float | ry | |||
| ) |
Offsets the entire array.
| rx | New x value | |
| ry | New y value |
| int Points::offset | ( | int | ind, | |
| float | rx, | |||
| float | ry | |||
| ) |
Offsets a specific point value in array.
| 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().
| int Points::print | ( | ) |
Prints the values to standard output.
| int Points::remove | ( | int | ind | ) |
Deletes a specific point from array.
| ind | Index of point to delete |
| int Points::set | ( | int | ind, | |
| Point & | pt | |||
| ) |
Sets a specific point value in array.
| 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.
| ind | Index of value to set | |
| rx | New x value | |
| ry | New y value |
Referenced by WXP::Domain::adjust().
1.6.1