Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

node/histogrm.h

Go to the documentation of this file.
00001 #ifndef NODE_HISTOGRM_H
00002 #define NODE_HISTOGRM_H
00003 
00004 /*
00005 
00006   GLT OpenGL C++ Toolkit (LGPL)
00007   Copyright (C) 2000-2002 Nigel Stewart  
00008 
00009   Email: nigels.com@gmail.com   
00010   WWW:   http://www.nigels.com/glt/
00011 
00012   This library is free software; you can redistribute it and/or
00013   modify it under the terms of the GNU Lesser General Public
00014   License as published by the Free Software Foundation; either
00015   version 2.1 of the License, or (at your option) any later version.
00016 
00017   This library is distributed in the hope that it will be useful,
00018   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020   Lesser General Public License for more details.
00021 
00022   You should have received a copy of the GNU Lesser General Public
00023   License along with this library; if not, write to the Free Software
00024   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 */
00027 
00033 #ifdef GLT_WIN32
00034 #pragma warning(disable: 4786)      
00035 #endif
00036 
00037 #include <node/shape.h>
00038 #include <node/field.h>
00039 
00040 #include <vector>
00041 
00047 class GltHistogram : public GltShape 
00048 {
00049 public:
00050 
00051     GltHistogram();
00052     ~GltHistogram();
00053 
00054     void draw() const;
00055 
00056     void reset();
00057     void add(const double x);
00058     void add(const int    n);
00059 
00060     GltFieldPtr settings(); 
00061 
00062     double &min();
00063     double &max();
00064     int    &size();
00065     bool   &cumulative();
00066 
00067     bool   &drawLine();
00068 
00069     unsigned int samples() const;
00070     unsigned int outlyers() const;
00071     unsigned int minCount() const;
00072     unsigned int maxCount() const;
00073 
00074 private:
00075 
00076     double  _min;           
00077     double  _max;   
00078     int     _size;
00079     bool    _cumulative;
00080 
00081     bool    _drawLine;
00082 
00083     unsigned int    _samples;
00084     unsigned int    _outlyers;
00085 
00086     std::vector<unsigned int> _count;
00087 };
00088 
00089 #endif

Generated on Tue Nov 5 11:11:05 2002 for GLT by doxygen1.2.18