24#ifndef _PO_LINEAR_AXIS_
25#define _PO_LINEAR_AXIS_
28#include <Inventor/fields/SoSFEnum.h>
29#include <Inventor/fields/SoSFFloat.h>
32#include <MeshViz/graph/PoCartesianAxis.h>
33#include <MeshViz/graph/PiNumericFormat.h>
34#include <MeshViz/graph/PbNumericDisplayFormat.h>
131 SO_KIT_CATALOG_ENTRY_HEADER(multFactorSep) ;
132 SO_KIT_CATALOG_ENTRY_HEADER(multFactorApp) ;
133 SO_KIT_CATALOG_ENTRY_HEADER(multFactor) ;
207 { init(
SbVec3f(0.,0.,0.), 1.,
XY, 0.0,0.0, 0.) ; }
213 { init(_start, _end, _type, 0.0,0.0, _step) ; }
220 float _gradStart,
float _gradEnd,
float _step = 0.0)
221 { init(_start, _end, _type, _gradStart, _gradEnd,_step) ; }
259 static void initClass() ;
260 static void exitClass() ;
265 static void getLinGradStep(
float deltaValue,
float &requestStep) ;
270 static void getLinGradFirstGrad(
GradFit fit,
float firstVal,
271 float lastVal,
float step,
float &firstGrad,
275 static void getLinGrads(
GradFit fit,
float firstVal,
float lastVal,
276 float &requestStep,
float &firstGrad,
size_t &numGrad) ;
287 MultFactor multFactor ;
288 PiNumericFormat numericFormat ;
296 double firstAxisCoord;
297 double lastAxisCoord;
304 virtual void setDefaultOnNonWritingFields() ;
307 virtual void basicObjectChange(
PbBase *basicObj) ;
310 virtual void saveAxisAttr() ;
313 virtual void addElementsAllCaches() ;
314 virtual void preRebuild() ;
318 void init(
const SbVec3f &
start,
float end,
Type typeAxis,
float _gradStart,
float _gradEnd,
float s = 0.0) ;
326 double getGradCoord(
double gradValue)
const;
330 double getGradValue(
double coord)
const;
336 LinAxisAttr linAxisAttr ;
339 FieldSensorList fieldSensorList ;
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for carte...
SoSFVec3f start
Defines the start of the axis.
Type
Type of axis orientation.
@ XY
X-Axis in the plane XY.
SoSFFloat end
Defines the end of the axis.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build a linear ...
void setFormat(PbNumericDisplayFormat *format)
Sets a reference to a PbNumericDisplayFormat object for the numerical display format for the graduati...
SoSFFloat multFactorDistAxis
Distance from the multiplicative factor to the axis.
SoSFEnum gradFit
This flag indicates if the first graduation is rounded or not.
PoLinearAxis(const SbVec3f &_start, float _end, PoCartesianAxis::Type _type, float _gradStart, float _gradEnd, float _step=0.0)
Constructor.
@ MULT_FACTOR_GRAD
The multiplicative factor is at the graduations of the axis.
@ MULT_FACTOR_EXTR
The multiplicative factor is at the start and at the end of the axis.
@ MULT_FACTOR_START
The multiplicative factor is at the start of the axis.
@ MULT_FACTOR_END
The multiplicative factor is at the end of the axis.
PoLinearAxis()
Default constructor.
const PbNumericDisplayFormat * getFormat() const
Gets a reference to the PbNumericDisplayFormat object for the numerical display format for the gradua...
SoSFFloat step
Defines the step for the axis.
float getStep() const
Returns the current step attribute (the step computed can be different from the associated field).
GradFit
First graduation rounded or not.
@ GRAD_UNFIT
The first graduation is not rounded.
@ GRAD_FIT
The first graduation is rounded.
PoLinearAxis(const SbVec3f &_start, float _end, PoCartesianAxis::Type _type, float _step=0.0)
Constructor.
virtual void rebuild()
Forces node-kit rebuilding.
SoSFEnum multFactorPosition
Position of the multiplicative factor.
void getMultFactor(MultFactorPosition &position, float &distAxis) const
Returns the current multiplicative factor attributes (those computed can be different from the associ...
Maintains a list of pointers to fields.
Field containing an enumerated value.
Field containing a floating-point value.