HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Plotting::Plot2D Class Reference

#include <Plot2D.h>

Collaboration diagram for Plotting::Plot2D:
Collaboration graph
[legend]

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< Pointpoints
 
std::vector< Line * > lines
 
std::string xLabel
 
std::string yLabel
 
double xOffset
 
double yOffset
 
double xScale
 
double yScale
 

Detailed Description

Definition at line 70 of file Plot2D.h.

Constructor & Destructor Documentation

◆ Plot2D()

Plotting::Plot2D::Plot2D ( )

Definition at line 204 of file Plot2D.cpp.

References drawMouse, lastSelectedLine, recomputeBorders, and ResetAxis().

Member Function Documentation

◆ AddLine()

void Plotting::Plot2D::AddLine ( Line l)

◆ AddPoint()

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.

◆ Clear()

void Plotting::Plot2D::Clear ( )

Definition at line 212 of file Plot2D.cpp.

References lines, points, and ResetAxis().

◆ Draw()

void Plotting::Plot2D::Draw ( Graphics::Display display) const

◆ GetMaxX()

double Plotting::Plot2D::GetMaxX ( )
inline

Definition at line 80 of file Plot2D.h.

References dRight.

◆ GetMaxY()

double Plotting::Plot2D::GetMaxY ( )
inline

Definition at line 82 of file Plot2D.h.

References dTop.

◆ GetMinX()

double Plotting::Plot2D::GetMinX ( )
inline

Definition at line 81 of file Plot2D.h.

References dLeft.

◆ GetMinY()

double Plotting::Plot2D::GetMinY ( )
inline

Definition at line 83 of file Plot2D.h.

References dBottom.

◆ MakeHOG()

point3d Plotting::Plot2D::MakeHOG ( double  x,
double  y 
) const
private

Definition at line 547 of file Plot2D.cpp.

References point3d, xOffset, xScale, yOffset, and yScale.

Referenced by Draw().

◆ MakeHOGWidth()

double Plotting::Plot2D::MakeHOGWidth ( double  w) const
private

Definition at line 552 of file Plot2D.cpp.

Referenced by Draw().

◆ NormalizeAxes()

void Plotting::Plot2D::NormalizeAxes ( )

Definition at line 467 of file Plot2D.cpp.

References dBottom, dLeft, dRight, dTop, max, min(), xMax, xMin, yMax, and yMin.

◆ OffsetCurrMouse()

void Plotting::Plot2D::OffsetCurrMouse ( double  deltaX,
double  deltaY 
)

Definition at line 372 of file Plot2D.cpp.

References fless(), lastSelectedLine, lines, mouseXLoc, and mouseYLoc.

◆ OpenGLDraw()

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.

◆ ResetAxis()

void Plotting::Plot2D::ResetAxis ( )

◆ SetAxis()

void Plotting::Plot2D::SetAxis ( double  minx,
double  miny,
double  maxx,
double  maxy 
)

Definition at line 313 of file Plot2D.cpp.

References forceAxis, xMax, xMin, yMax, and yMin.

◆ SetXAxisLabel()

void Plotting::Plot2D::SetXAxisLabel ( const char *  l)

Definition at line 219 of file Plot2D.cpp.

References xLabel.

◆ SetYAxisLabel()

void Plotting::Plot2D::SetYAxisLabel ( const char *  l)

Definition at line 224 of file Plot2D.cpp.

References yLabel.

◆ SmoothLines()

void Plotting::Plot2D::SmoothLines ( )

Definition at line 460 of file Plot2D.cpp.

References lines, and ResetAxis().

◆ Zoom()

void Plotting::Plot2D::Zoom ( double  amt)

Definition at line 292 of file Plot2D.cpp.

References dBottom, dLeft, dRight, dTop, height, width, xMax, xMin, yMax, and yMin.

Member Data Documentation

◆ dBottom

double Plotting::Plot2D::dBottom
private

Definition at line 96 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), Draw(), GetMinY(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().

◆ dLeft

double Plotting::Plot2D::dLeft
private

Definition at line 96 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), Draw(), GetMinX(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().

◆ drawMouse

bool Plotting::Plot2D::drawMouse
private

Definition at line 98 of file Plot2D.h.

Referenced by OpenGLDraw(), and Plot2D().

◆ dRight

double Plotting::Plot2D::dRight
private

Definition at line 96 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), Draw(), GetMaxX(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().

◆ dTop

double Plotting::Plot2D::dTop
private

Definition at line 96 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), Draw(), GetMaxY(), NormalizeAxes(), OpenGLDraw(), ResetAxis(), and Zoom().

◆ forceAxis

bool Plotting::Plot2D::forceAxis
private

Definition at line 98 of file Plot2D.h.

Referenced by AddLine(), ResetAxis(), and SetAxis().

◆ lastSelectedLine

int Plotting::Plot2D::lastSelectedLine
private

Definition at line 99 of file Plot2D.h.

Referenced by OffsetCurrMouse(), OpenGLDraw(), and Plot2D().

◆ lines

std::vector<Line *> Plotting::Plot2D::lines
private

Definition at line 101 of file Plot2D.h.

Referenced by AddLine(), Clear(), Draw(), OffsetCurrMouse(), OpenGLDraw(), ResetAxis(), and SmoothLines().

◆ mouseXLoc

double Plotting::Plot2D::mouseXLoc
private

Definition at line 95 of file Plot2D.h.

Referenced by OffsetCurrMouse(), and OpenGLDraw().

◆ mouseYLoc

double Plotting::Plot2D::mouseYLoc
private

Definition at line 95 of file Plot2D.h.

Referenced by OffsetCurrMouse(), and OpenGLDraw().

◆ points

std::vector<Point> Plotting::Plot2D::points
private

Definition at line 100 of file Plot2D.h.

Referenced by AddPoint(), Clear(), Draw(), and ResetAxis().

◆ recomputeBorders

bool Plotting::Plot2D::recomputeBorders
private

Definition at line 98 of file Plot2D.h.

Referenced by OpenGLDraw(), Plot2D(), and ResetAxis().

◆ xLabel

std::string Plotting::Plot2D::xLabel
private

Definition at line 102 of file Plot2D.h.

Referenced by Draw(), and SetXAxisLabel().

◆ xMax

double Plotting::Plot2D::xMax
private

Definition at line 97 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().

◆ xMin

double Plotting::Plot2D::xMin
private

Definition at line 97 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().

◆ xOffset

double Plotting::Plot2D::xOffset
mutableprivate

Definition at line 103 of file Plot2D.h.

Referenced by Draw(), and MakeHOG().

◆ xScale

double Plotting::Plot2D::xScale
mutableprivate

Definition at line 105 of file Plot2D.h.

Referenced by Draw(), and MakeHOG().

◆ yLabel

std::string Plotting::Plot2D::yLabel
private

Definition at line 102 of file Plot2D.h.

Referenced by Draw(), and SetYAxisLabel().

◆ yMax

double Plotting::Plot2D::yMax
private

Definition at line 97 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().

◆ yMin

double Plotting::Plot2D::yMin
private

Definition at line 97 of file Plot2D.h.

Referenced by AddLine(), AddPoint(), NormalizeAxes(), ResetAxis(), SetAxis(), and Zoom().

◆ yOffset

double Plotting::Plot2D::yOffset
mutableprivate

Definition at line 104 of file Plot2D.h.

Referenced by Draw(), and MakeHOG().

◆ yScale

double Plotting::Plot2D::yScale
mutableprivate

Definition at line 106 of file Plot2D.h.

Referenced by Draw(), and MakeHOG().


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