HOG2
|
#include <Plot2D.h>
Public Member Functions | |
Plot2D () | |
void | Clear () |
void | AddLine (Line *) |
void | AddPoint (const Point &p) |
void | SetXAxisLabel (const char *) |
void | SetYAxisLabel (const char *) |
double | GetMaxX () |
double | GetMinX () |
double | GetMaxY () |
double | GetMinY () |
void | OffsetCurrMouse (double deltaX, double deltaY) |
void | SetAxis (double, double, double, double) |
void | Zoom (double) |
void | ResetAxis () |
void | OpenGLDraw () const |
void | Draw (Graphics::Display &display) const |
void | SmoothLines () |
void | NormalizeAxes () |
Private Member Functions | |
point3d | MakeHOG (double x, double y) const |
double | MakeHOGWidth (double w) const |
Private Attributes | |
double | mouseXLoc |
double | mouseYLoc |
double | dLeft |
double | dRight |
double | dTop |
double | dBottom |
double | xMin |
double | xMax |
double | yMin |
double | yMax |
bool | forceAxis |
bool | drawMouse |
bool | recomputeBorders |
int | lastSelectedLine |
std::vector< Point > | points |
std::vector< Line * > | lines |
std::string | xLabel |
std::string | yLabel |
double | xOffset |
double | yOffset |
double | xScale |
double | yScale |
Plotting::Plot2D::Plot2D | ( | ) |
Definition at line 204 of file Plot2D.cpp.
References drawMouse, lastSelectedLine, recomputeBorders, and ResetAxis().
void Plotting::Plot2D::AddLine | ( | Line * | l | ) |
Definition at line 231 of file Plot2D.cpp.
References dBottom, dLeft, dRight, dTop, forceAxis, Plotting::Line::GetMaxX(), Plotting::Line::GetMaxY(), Plotting::Line::GetMinX(), Plotting::Line::GetMinY(), lines, ResetAxis(), xMax, xMin, yMax, and yMin.
void Plotting::Plot2D::AddPoint | ( | const Point & | p | ) |
Definition at line 254 of file Plot2D.cpp.
References dBottom, dLeft, dRight, dTop, max, min(), points, Plotting::Point::x, xMax, xMin, Plotting::Point::y, yMax, and yMin.
void Plotting::Plot2D::Clear | ( | ) |
Definition at line 212 of file Plot2D.cpp.
References lines, points, and ResetAxis().
void Plotting::Plot2D::Draw | ( | Graphics::Display & | display | ) | const |
Definition at line 561 of file Plot2D.cpp.
References Colors::black, dBottom, dLeft, Graphics::Display::DrawLine(), Graphics::Display::DrawText(), dRight, dTop, Graphics::Display::FillRect(), lines, MakeHOG(), MakeHOGWidth(), point3d, points, Graphics::textAlignCenter, Graphics::textAlignLeft, Graphics::textBaselineBottom, Graphics::textBaselineMiddle, Colors::white, xLabel, xOffset, xScale, yLabel, yOffset, and yScale.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
Definition at line 552 of file Plot2D.cpp.
Referenced by Draw().
void Plotting::Plot2D::NormalizeAxes | ( | ) |
void Plotting::Plot2D::OffsetCurrMouse | ( | double | deltaX, |
double | deltaY | ||
) |
Definition at line 372 of file Plot2D.cpp.
References fless(), lastSelectedLine, lines, mouseXLoc, and mouseYLoc.
void Plotting::Plot2D::OpenGLDraw | ( | ) | const |
Definition at line 480 of file Plot2D.cpp.
References dBottom, dLeft, drawMouse, dRight, dTop, lastSelectedLine, lines, mouseXLoc, mouseYLoc, and recomputeBorders.
void Plotting::Plot2D::ResetAxis | ( | ) |
Definition at line 322 of file Plot2D.cpp.
References dBottom, dLeft, dRight, dTop, forceAxis, Plotting::Line::GetMaxX(), Plotting::Line::GetMaxY(), Plotting::Line::GetMinX(), Plotting::Line::GetMinY(), lines, points, recomputeBorders, xMax, xMin, yMax, and yMin.
Referenced by AddLine(), Clear(), Plot2D(), and SmoothLines().
void Plotting::Plot2D::SetAxis | ( | double | minx, |
double | miny, | ||
double | maxx, | ||
double | maxy | ||
) |
void Plotting::Plot2D::SetXAxisLabel | ( | const char * | l | ) |
Definition at line 219 of file Plot2D.cpp.
References xLabel.
void Plotting::Plot2D::SetYAxisLabel | ( | const char * | l | ) |
Definition at line 224 of file Plot2D.cpp.
References yLabel.
void Plotting::Plot2D::SmoothLines | ( | ) |
Definition at line 460 of file Plot2D.cpp.
References lines, and ResetAxis().
void Plotting::Plot2D::Zoom | ( | double | amt | ) |
|
private |
Definition at line 96 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), Draw(), GetMinY(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().
|
private |
Definition at line 96 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), Draw(), GetMinX(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().
|
private |
Definition at line 98 of file Plot2D.h.
Referenced by OpenGLDraw(), and Plot2D().
|
private |
Definition at line 96 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), Draw(), GetMaxX(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().
|
private |
Definition at line 96 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), Draw(), GetMaxY(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().
|
private |
Definition at line 98 of file Plot2D.h.
Referenced by AddLine(), ResetAxis(), and SetAxis().
|
private |
Definition at line 99 of file Plot2D.h.
Referenced by OffsetCurrMouse(), OpenGLDraw(), and Plot2D().
|
private |
Definition at line 101 of file Plot2D.h.
Referenced by AddLine(), Clear(), Draw(), OffsetCurrMouse(), OpenGLDraw(), ResetAxis(), and SmoothLines().
|
private |
Definition at line 95 of file Plot2D.h.
Referenced by OffsetCurrMouse(), and OpenGLDraw().
|
private |
Definition at line 95 of file Plot2D.h.
Referenced by OffsetCurrMouse(), and OpenGLDraw().
|
private |
Definition at line 100 of file Plot2D.h.
Referenced by AddPoint(), Clear(), Draw(), and ResetAxis().
|
private |
Definition at line 98 of file Plot2D.h.
Referenced by OpenGLDraw(), Plot2D(), and ResetAxis().
|
private |
Definition at line 102 of file Plot2D.h.
Referenced by Draw(), and SetXAxisLabel().
|
private |
Definition at line 97 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().
|
private |
Definition at line 97 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().
|
mutableprivate |
|
mutableprivate |
|
private |
Definition at line 102 of file Plot2D.h.
Referenced by Draw(), and SetYAxisLabel().
|
private |
Definition at line 97 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().
|
private |
Definition at line 97 of file Plot2D.h.
Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().
|
mutableprivate |
|
mutableprivate |