Class to build a linear axis. More...
#include <MeshViz/graph/PoLinearAxis.h>
Classes | |
struct | LinAxisAttr |
struct | MultFactor |
Public Types | |
enum | GradFit { GRAD_FIT, GRAD_UNFIT } |
enum | MultFactorPosition { MULT_FACTOR_START, MULT_FACTOR_END, MULT_FACTOR_EXTR, MULT_FACTOR_GRAD } |
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
PoLinearAxis () | |
PoLinearAxis (const SbVec3f &_start, float _end, PoCartesianAxis::Type _type, float _step=0.0) | |
PoLinearAxis (const SbVec3f &_start, float _end, PoCartesianAxis::Type _type, float _gradStart, float _gradEnd, float _step=0.0) | |
virtual void | rebuild () |
void | setFormat (PbNumericDisplayFormat *format) |
const PbNumericDisplayFormat * | getFormat () const |
float | getStep () const |
void | getMultFactor (MultFactorPosition &position, float &distAxis) const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFFloat | step |
SoSFEnum | gradFit |
SoSFEnum | multFactorPosition |
SoSFFloat | multFactorDistAxis |
This class builds a linear axis. This axis will be generated between the point start and the point end. The graduations (tick marks, labels, etc) will be in the plane given by the field PoCartesianAxis::type.
By default, the text of the displayed graduations (the tick mark labels) are based on the actual coordinates of the axis (start and end). The text of the graduations is based on the specified range if the gradStart and gradEnd fields are not equal.
The graduations format depends on the current numerical display format. If the method setFormat(format) is called, the current numerical display format is "format". Otherwise the numerical display format is the inherited value from PoNumericDisplayFormat (default AUTO).
See PoAxis for discussion of axis attributes.
Axis Attributes |
|
Many other kinds of axes can generated, for example:
Multiple axes can generated conveniently using PoGroup2Axis, etc.
gradVisibility | VISILITY_DEPEND |
gradPosition | GRAD_DEPEND |
gradPath | PATH_DEPEND |
gradFontName | "" |
gradFontSize | 0 |
gradDistAxis | 0 |
gradAddStringVisibility | FALSE |
gradAddString | "" |
marginType | REL_MARGIN |
marginStart | 0 |
marginEnd | 0 |
titleVisibility | VISILITY_DEPEND |
titlePosition | TITLE_DEPEND |
titlePath | PATH_DEPEND |
titleFontName | "" |
titleFontSize | 0 |
titleDistAxis | 0 |
titleString | "" |
gridVisibility | VISILITY_DEPEND |
gridLengthGradSide | 0 |
gridLengthGradOtherSide | 1 |
arrowVisibility | VISIBILITY_DEPEND |
arrowHeight | 0.03 |
arrowLength | 0.05 |
tickVisibility | VISIBILITY_DEPEND |
tickPosition | TICK_GRAD_SIDE |
tickMainLength | 0 |
tickSubLength | 0 |
tickSubDef | PERIOD_MAIN_TICK |
tickNumOrPeriod | 1 |
tickFirstGrad | 1 |
tickLastGrad | 1 |
reverseFlag | AXIS_REVERSE_DEPEND |
start | 0 0 0 |
end | 1 |
gradStart | 0 |
gradEnd | 0 |
type | XY |
step | 0 |
gradFit | GRAD_UNFIT |
multFactorPosition | MULT_FACTOR_END |
multFactorDistAxis | 0 |
PoGenAxis, PoLogAxis, PoLogAxis, PoTimeAxis, PoPolarLinAxis, PoPolarLogAxis
PoLinearAxis::PoLinearAxis | ( | ) | [inline] |
Default constructor.
PoLinearAxis::PoLinearAxis | ( | const SbVec3f & | _start, | |
float | _end, | |||
PoCartesianAxis::Type | _type, | |||
float | _step = 0.0 | |||
) | [inline] |
Constructor.
PoLinearAxis::PoLinearAxis | ( | const SbVec3f & | _start, | |
float | _end, | |||
PoCartesianAxis::Type | _type, | |||
float | _gradStart, | |||
float | _gradEnd, | |||
float | _step = 0.0 | |||
) | [inline] |
Constructor. Since Open Inventor 9.3
static const SoNodekitCatalog* PoLinearAxis::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoCartesianAxis.
static SoType PoLinearAxis::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoCartesianAxis.
const PbNumericDisplayFormat* PoLinearAxis::getFormat | ( | ) | const |
Gets a reference to the PbNumericDisplayFormat object for the numerical display format for the graduations.
Returns null if none specified.
void PoLinearAxis::getMultFactor | ( | MultFactorPosition & | position, | |
float & | distAxis | |||
) | const |
Returns the current multiplicative factor attributes (those computed can be different from the associated field).
virtual const SoNodekitCatalog* PoLinearAxis::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoCartesianAxis.
float PoLinearAxis::getStep | ( | ) | const |
Returns the current step attribute (the step computed can be different from the associated field).
virtual SoType PoLinearAxis::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoCartesianAxis.
virtual void PoLinearAxis::rebuild | ( | ) | [virtual] |
void PoLinearAxis::setFormat | ( | PbNumericDisplayFormat * | format | ) |
Sets a reference to a PbNumericDisplayFormat object for the numerical display format for the graduations.
If this method is not called (or called passing NULL as argument), the numerical display format defined in the current inherited state (defined with the property node PoNumericDisplayFormat) is used.
This flag indicates if the first graduation is rounded or not.
Distance from the multiplicative factor to the axis.
This value is a percentage of the current domain (cf PoBase description). If this value is <= 0, the distance is automatically calculated.
Position of the multiplicative factor.
Defines the step for the axis.
If this value is <= 0, the step is automatically calculated.