Isis 3.0 Object Programmers' Reference |
Home |
#include <LineEquation.h>
Collaboration diagram for Isis::LineEquation:
This class contains utility methods for creating and using cartesean line equations. If both points have the same value for the independent variable (vertical line) an error is thrown.
Definition at line 43 of file LineEquation.h.
Public Member Functions | |
LineEquation () | |
Construct an empty LineEquation object. | |
LineEquation (double x1, double y1, double x2, double y2) | |
Construct and fill LineEquation object. | |
~LineEquation () | |
Destroys the LineEquation object. | |
void | AddPoint (double x, double y) |
Add a point to the object. | |
double | Slope () |
Compute the slope of the line. | |
double | Intercept () |
Compute the intercept of the line. | |
int | Points () |
bool | HaveSlope () |
bool | HaveIntercept () |
bool | Defined () |
Private Attributes | |
std::vector< double > | p_x |
Independent variables. | |
std::vector< double > | p_y |
Dependent variables. | |
bool | p_defined |
Variable indicating if line is defined yet. | |
bool | p_slopeDefined |
Variable indicating if slope is defined yet. | |
bool | p_interceptDefined |
Variable indicating if intercept is defined yet. | |
double | p_slope |
double | p_intercept |
|
Construct an empty LineEquation object.
Definition at line 35 of file LineEquation.cpp. References p_defined, p_interceptDefined, and p_slopeDefined. |
|
Construct and fill LineEquation object.
Definition at line 48 of file LineEquation.cpp. References AddPoint(), Intercept(), p_defined, p_intercept, p_interceptDefined, p_slope, p_slopeDefined, and Slope(). |
|
Destroys the LineEquation object.
Definition at line 50 of file LineEquation.h. |
|
Add a point to the object. The object is considered filled once 2 points have been added (the line is defined).
Definition at line 67 of file LineEquation.cpp. References _FILEINFO_, Isis::iException::Message(), p_defined, p_x, p_y, and Points(). Referenced by LineEquation(). |
|
Compute the intercept of the line.
Definition at line 102 of file LineEquation.cpp. References _FILEINFO_, Isis::iException::Message(), p_defined, p_intercept, p_interceptDefined, p_x, p_y, and Slope(). Referenced by LineEquation(). |
|
Compute the slope of the line.
Definition at line 82 of file LineEquation.cpp. References _FILEINFO_, Isis::iException::Message(), p_defined, p_slope, p_slopeDefined, p_x, and p_y. Referenced by Intercept(), and LineEquation(). |
|
Variable indicating if line is defined yet.
Definition at line 62 of file LineEquation.h. Referenced by AddPoint(), Intercept(), LineEquation(), and Slope(). |
|
Variable indicating if intercept is defined yet.
Definition at line 64 of file LineEquation.h. Referenced by HaveIntercept(), Intercept(), and LineEquation(). |
|
Variable indicating if slope is defined yet.
Definition at line 63 of file LineEquation.h. Referenced by HaveSlope(), LineEquation(), and Slope(). |
|
Independent variables.
Definition at line 57 of file LineEquation.h. Referenced by AddPoint(), Intercept(), Points(), and Slope(). |
|
Dependent variables.
Definition at line 61 of file LineEquation.h. Referenced by AddPoint(), Intercept(), and Slope(). |