Isis 3 Developer Reference
LineEquation.h
Go to the documentation of this file.
1 #ifndef LineEquation_h
2 #define LineEquation_h
3 
25 #include <vector>
26 
27 namespace Isis {
44  class LineEquation {
45  public:
47  LineEquation();
48  LineEquation(double x1, double y1, double x2, double y2);
49 
52  void AddPoint(double x, double y);
53  double Slope();
54  double Intercept();
55  int Points() {
56  return p_x.size();
57  };
58  bool HaveSlope() {
59  return p_slopeDefined;
60  };
61  bool HaveIntercept() {
62  return p_interceptDefined;
63  };
64  bool Defined() {
65  return p_defined;
66  };
67 
68  private:
69  std::vector<double> p_x;
70  std::vector<double> p_y;
71  bool p_defined;
72  bool p_slopeDefined;
73  bool p_interceptDefined;
74  double p_slope;
75  double p_intercept;
76 
77  }; // end of LineEquation class
78 }
79 #endif
LineEquation()
Constructors.
Definition: LineEquation.cpp:35
Utility class for creating and using cartesean line equations.
Definition: LineEquation.h:44
double Intercept()
Compute the intercept of the line.
Definition: LineEquation.cpp:103
bool Defined()
Definition: LineEquation.h:64
bool HaveSlope()
Definition: LineEquation.h:58
int Points()
Definition: LineEquation.h:55
void AddPoint(double x, double y)
Add a point to the object.
Definition: LineEquation.cpp:67
~LineEquation()
Destroys the LineEquation object.
Definition: LineEquation.h:51
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double Slope()
Compute the slope of the line.
Definition: LineEquation.cpp:82
bool HaveIntercept()
Definition: LineEquation.h:61