Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PoSingleHistogram.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PO_SINGLE_HISTOGRAM_
25#define _PO_SINGLE_HISTOGRAM_
26
27#include <MeshViz/graph/PoHistogram.h>
28
29#include <Inventor/fields/SoMFString.h>
30#include <Inventor/fields/SoMFFloat.h>
31
83
84 SO_KIT_HEADER(PoSingleHistogram) ;
85
86
87 public:
88
89 /* Fields */
90
95
101
102
103
104 /* Methods */
105
110 { init(TRUE, SbVec2f(0.,0.), 1., X, 0, NULL, NULL) ; }
111
116 PoSingleHistogram(const SbVec2f &_start, float _end, PoHistogram::Type _type,
117 int numValues, const float *_value, const char **_name)
118 { init(FALSE, _start, _end, _type, numValues, _value, _name) ; }
119
123 virtual void rebuild() ;
124
125 /*----------------------------------------------------------------------------*/
126 private:
127 static void initClass() ;
128 static void exitClass() ;
129
130 private:
131 // Destructor
132 virtual ~PoSingleHistogram() ;
133 virtual void setDefaultOnNonWritingFields() ;
134 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
135
136 // Color the bars
137 void colorBars(SoGroup *group) ;
138
139 private:
140 // Init method
141 void init(SbBool isDefault, const SbVec2f &_start, float _end,
142 Type _type, int numValues, const float *_value, const char **_name) ;
143
144 // Build X or Y Histogram
145 void buildXHistog() ;
146 void buildYHistog() ;
147
148 // Sensors
149 FieldSensorList m_fieldSensorList ;
150
151 // List of fields defined in this class
152 SoFieldList m_fieldList ;
153
154} ;
155
156/*----------------------------------------------------------------------------*/
157
158#endif /* _PO_SINGLE_HISTOGRAM_ */
159
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for histo...
Definition PoHistogram.h:72
Type
Type of orientation of the histogram's bars.
Definition PoHistogram.h:97
@ X
Histogram bars are perpendicular to X-Axis.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build a single ...
virtual void rebuild()
Forces node-kit rebuilding.
PoSingleHistogram(const SbVec2f &_start, float _end, PoHistogram::Type _type, int numValues, const float *_value, const char **_name)
Constructor.
SoMFFloat value
Values of each bars of the histogram.
SoMFString name
Names of each bars of the histogram.
PoSingleHistogram()
Default constructor.
2D vector class.
Definition SbVec.h:76
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Base class for all group nodes.
Definition SoGroup.h:122
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Multiple-value field containing any number of strings.
Definition SoMFString.h:116
int SbBool
Boolean type.
Definition SbBase.h:87