#include <OpenGLWindow.h>
Inheritance diagram for OpenGLWindow:
Definition at line 23 of file OpenGLWindow.h.
Public Member Functions | |
virtual void | drawColorLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const std::vector< Color > &colors, float size) |
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on. | |
virtual void | drawLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float) |
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on. | |
virtual void | drawMag (float x, float y, int mag, float fontsize) |
Draws the exponent on the axis label. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, const std::vector< Color > &colors, hippodraw::Symbol::Type type, float sym_size) |
Draws symbol points. | |
virtual void | drawPoints (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Symbol::Type type, float sym_size, const Color &color) |
Draws symbol points. | |
virtual void | drawPolyLine (const std::vector< double > &xpoints, const std::vector< double > &ypoints, hippodraw::Line::Style style, const Color &color, float) |
Draws a polyline. | |
virtual void | drawSelf () |
Draws itself. | |
virtual void | drawSquare (double x1, double y1, double x2, double y2, int red, int green, int blue) |
Draws a colored square. | |
virtual void | drawText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize=false, const FontBase *font=0) |
Draws a text string at a point in the view's coordinate system. | |
virtual void | drawText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp, bool resize=false) |
virtual void | drawUserText (const std::string &s, float x, float y, float fontsize, float angle, char xp, char yp) |
Draws a text string at a point in the data coordinate system. | |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, const Color &color, float) |
Draws multiple line segments. | |
virtual void | drawViewLines (const std::vector< double > &x, const std::vector< double > &y, hippodraw::Line::Style style, bool color, float) |
Draws multiple line segments. | |
virtual void | drawViewSquare (float x1, float y1, float x2, float y2, int red, int green, int blue) |
Draws a colored square in view space. | |
virtual void | endPlot () |
Finalizes a view when all drawing has been done. | |
void | flush () |
virtual double | getAspectRatio () const |
Get the aspect ratio. | |
virtual HippoRectangle | getDrawRect () const |
Returns the drawing Rectangle in the devices coordinate system. | |
virtual HippoRectangle | getMarginRect () const |
Returns the Rectangle within which points representations are draw. | |
PlotterBase * | getPlotter () |
Returns the plotter used by this view. | |
PlotterBase * | getPlotter () const |
Returns the plotter used by this view. | |
const Range & | getRange (hippodraw::Axes::Type axis) const |
Returns the range of the data space on specified axis. | |
const HippoRectangle & | getUserRect () const |
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made. | |
virtual void | initPlot (double) |
Initializes a view before drawing. | |
OpenGLWindow (Display *, Colormap, XVisualInfo *, GLXContext) | |
void | resize (int, int) |
virtual void | setDrawRect (float x, float y, float w, float h) |
Sets the drawing Rectangle in the devices coordinate system. | |
void | setPlotter (PlotterBase *) |
Sets the PlotterBase object to plotter. | |
void | setRect (double x, double y, double w, double h) |
virtual void | update (const Observable *) |
Implements the update method of the Observer pattern. | |
float | userToDrawColor (double c) const |
Converts a coordinate in user space to drawing space along the color (X) axis. | |
float | userToDrawX (double x) const |
Converts a coordinate in user space to drawing space along the X axis. | |
float | userToDrawY (double x) const |
Converts a coordinate in user space to drawing space along the Y axis. | |
virtual void | willDelete (const Observable *) |
Notifies this Observer object that one of its Observable objects is about to be deleted. | |
Window | window () const |
virtual | ~OpenGLWindow () |
Protected Attributes | |
PlotterBase * | m_plotter |
The plotter object used by this view. | |
Private Member Functions | |
void | paint () |
Private Attributes | |
Colormap | m_colormap |
GLXContext | m_ctx |
Display * | m_display |
int | m_height |
XVisualInfo * | m_vinfo |
int | m_width |
Window | m_window |
|
Definition at line 22 of file OpenGLWindow.cxx. References m_colormap, m_display, m_height, m_vinfo, m_width, and m_window. |
|
Definition at line 85 of file OpenGLWindow.cxx. |
|
Draws multiple line segments, each with a different color - that is, a line between x0,y0 and x1,y1, with color[0] =color[1] another between x2,y2 and x3,y3 with color[2]=color[3] and so on.
Implements ViewBase. Definition at line 127 of file OpenGLView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::Line::Solid, OpenGLView::toViewX(), and OpenGLView::toViewY(). |
|
Draws multiple line segments - that is, a line between x0,y0 and x1,y2, another between x2,y2 and x3,y3 and so on.
Implements ViewBase. Definition at line 76 of file OpenGLView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::Line::Solid, OpenGLView::toViewX(), and OpenGLView::toViewY(). |
|
Draws the exponent on the axis label. The arguments stand for the starting position of the writing ( x, y ), for the value of the magnitude ( mag ), and for the font ( fontsize ).
Implements ViewBase. Definition at line 510 of file OpenGLView.cxx. References OpenGLView::draw_Text(), OpenGLView::toX(), and OpenGLView::toY(). |
|
Draws symbol points. x and y are the coordinates, type is the type of symbol, and sym_size is the size. hue is the hue parameters for each point. The saturation and brightness are set to 1.0. Implements ViewBase. Definition at line 411 of file OpenGLView.cxx. |
|
Draws symbol points. x and y are the coordinates, type is the type of symbol, and sym_size is the size. All symbols are draw in the same color. Implements ViewBase. Definition at line 321 of file OpenGLView.cxx. References hippodraw::Symbol::CIRCLE, hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::Symbol::PLUS, hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, OpenGLView::toViewX(), OpenGLView::toViewY(), and hippodraw::Symbol::TRIANGLE. |
|
Draws a polyline.
Implements ViewBase. Definition at line 241 of file OpenGLView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::Line::Solid, OpenGLView::toViewX(), and OpenGLView::toViewY(). |
|
Draws itself.
Definition at line 60 of file ViewBase.cxx. References PlotterBase::drawIn(), and ViewBase::m_plotter. Referenced by QtViewWidget::draw(), QtView::draw(), QtView::drawWithPixmap(), paint(), and QtViewWidget::paintEvent(). |
|
Draws a colored square. Used for shading on the cuts and the gray plot. Implements ViewBase. Definition at line 279 of file OpenGLView.cxx. References OpenGLView::toViewX(), and OpenGLView::toViewY(). |
|
Draws a text string at a point in the view's coordinate system.
Implements ViewBase. Definition at line 565 of file OpenGLView.cxx. References OpenGLView::draw_Text(), OpenGLView::toX(), and OpenGLView::toY(). |
|
Definition at line 555 of file OpenGLView.cxx. References OpenGLView::draw_Text(), OpenGLView::toX(), and OpenGLView::toY(). |
|
Draws a text string at a point in the data coordinate system.
Implements ViewBase. Definition at line 545 of file OpenGLView.cxx. References OpenGLView::draw_Text(), OpenGLView::toViewX(), and OpenGLView::toViewY(). |
|
Draws multiple line segments.
Implements ViewBase. Definition at line 205 of file OpenGLView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, Color::getBlue(), Color::getGreen(), Color::getRed(), hippodraw::Line::Solid, OpenGLView::toX(), and OpenGLView::toY(). |
|
Draws multiple line segments.
Implements ViewBase. Definition at line 169 of file OpenGLView.cxx. References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::Dot, hippodraw::Line::Solid, OpenGLView::toX(), and OpenGLView::toY(). |
|
Draws a colored square in view space. Used for shading on the cuts and the gray plot. Implements ViewBase. Definition at line 300 of file OpenGLView.cxx. References OpenGLView::toX(), and OpenGLView::toY(). |
|
Finalizes a view when all drawing has been done.
Implements ViewBase. Definition at line 71 of file OpenGLView.cxx. |
|
Definition at line 88 of file OpenGLWindow.cxx. References m_display, and m_window. Referenced by paint(). |
|
Get the aspect ratio.
Definition at line 85 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by CanvasView::contentsMouseMoveEvent(), and QtView::drawWithPixmap(). |
|
Returns the drawing Rectangle in the devices coordinate system. Must be implemented in derived class. Implements ViewBase. Definition at line 598 of file OpenGLView.cxx. References OpenGLView::m_draw_rect. |
|
Returns the Rectangle within which points representations are draw.
Reimplemented in QtViewImp. Definition at line 80 of file ViewBase.cxx. References PlotterBase::getMarginRect(), and ViewBase::m_plotter. Referenced by AxisRepColor::drawColorScale(), ContourPointRep::drawContourTicks(), AxisRepBase::drawTitle(), AxisRepBase::drawXLabels(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYLabels(), AxisRepBase::drawYMag(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZLabels(), AxisRepColor::drawZTickLabels(), and AxisRepColor::drawZTickLines(). |
|
Returns the plotter used by this view.
Definition at line 55 of file ViewBase.cxx. References ViewBase::m_plotter. |
|
Returns the plotter used by this view.
Reimplemented from ViewBase. Definition at line 61 of file OpenGLView.cxx. References ViewBase::getPlotter(). |
|
Returns the range of the data space on specified axis.
Definition at line 68 of file ViewBase.cxx. References ViewBase::m_plotter. Referenced by ContourPointRep::drawContourTicks(). |
|
Is called by the AxisRepBase object (or one of its derived objects), and returns the rectangle where the drawing is made.
Definition at line 75 of file ViewBase.cxx. References PlotterBase::getUserRect(), and ViewBase::m_plotter. Referenced by ContourPointRep::endPlot(), and AxisRepBase::initAxisRect(). |
|
Initializes a view before drawing. The view should check it size. The parameter aspect, if greater than 0.0, sets the aspect ratio of the view, i.e. the ratio of the width to the height. Implements ViewBase. Definition at line 66 of file OpenGLView.cxx. |
|
Definition at line 110 of file OpenGLWindow.cxx. References ViewBase::drawSelf(), flush(), m_height, m_width, and OpenGLView::setRect(). Referenced by resize(). |
|
Definition at line 99 of file OpenGLWindow.cxx. References m_ctx, m_display, m_height, m_width, m_window, and paint(). Referenced by OpenGLApp::exec(). |
|
Sets the drawing Rectangle in the devices coordinate system.
Implements ViewBase. Definition at line 602 of file OpenGLView.cxx. |
|
Sets the PlotterBase object to plotter. The ViewBase object does not own the plotter. If the plotter is being changed, it is up to client code to decide to destroy the previous plotter or not. Reimplemented from ViewBase. Definition at line 55 of file OpenGLView.cxx. References ViewBase::setPlotter(). Referenced by main(). |
|
Definition at line 49 of file OpenGLView.cxx. References OpenGLView::m_draw_rect, and HippoRectangle::setRect(). Referenced by paint(). |
|
Implements the update method of the Observer pattern. Derived classes should send a message to what ever object is the parent of this ViewBase object. Implements ViewBase. Definition at line 576 of file OpenGLView.cxx. |
|
Converts a coordinate in user space to drawing space along the color (X) axis.
Implements ViewBase. Definition at line 593 of file OpenGLView.cxx. References ViewBase::m_plotter, and PlotterBase::userToMarginColor(). |
|
Converts a coordinate in user space to drawing space along the X axis.
Implements ViewBase. Definition at line 583 of file OpenGLView.cxx. References ViewBase::m_plotter, and PlotterBase::userToMarginX(). |
|
Converts a coordinate in user space to drawing space along the Y axis.
Implements ViewBase. Definition at line 588 of file OpenGLView.cxx. References ViewBase::m_plotter, and PlotterBase::userToInvertedMarginY(). |
|
Notifies Since most Observable objects are owned by its Observer, it is the Observer that issued the delete. Thus the default implementation here does nothing. Derived classes that observe objects owned by another should implement this method to remove the Observable from the list they are observing. Reimplemented in FunctionRep, DataSourceController, CutPlotter, TextPlotter, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, and ProfileProjector. Definition at line 25 of file Observer.cxx. Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple(). |
|
Definition at line 94 of file OpenGLWindow.cxx. References m_window. Referenced by OpenGLApp::findView(). |
|
Definition at line 34 of file OpenGLWindow.h. Referenced by OpenGLWindow(). |
|
Definition at line 36 of file OpenGLWindow.h. Referenced by resize(). |
|
Definition at line 33 of file OpenGLWindow.h. Referenced by flush(), OpenGLWindow(), and resize(). |
|
Definition at line 39 of file OpenGLWindow.h. Referenced by OpenGLWindow(), paint(), and resize(). |
|
|
Definition at line 35 of file OpenGLWindow.h. Referenced by OpenGLWindow(). |
|
Definition at line 38 of file OpenGLWindow.h. Referenced by OpenGLWindow(), paint(), and resize(). |
|
Definition at line 37 of file OpenGLWindow.h. Referenced by flush(), OpenGLWindow(), resize(), and window(). |