PoAxis Class Reference
[Axis]

MeshViz Abstract class for axis representations. More...

#include <MeshViz/graph/PoAxis.h>

Inheritance diagram for PoAxis:
PoBaseAxis PoGraphMaster PoBase SoBaseKit SoNode SoGetView SoFieldContainer SoBase SoRefCounter SoTypedObject PoAngularAxis PoCartesianAxis PoPolarAxis PoTimeAxis PoGenAxis PoLinearAxis PoLogAxis PoPolarLinAxis PoPolarLogAxis

List of all members.

Classes

struct  ArrowAttr
struct  AxisAttr
struct  GradAttr
struct  GridAttr
struct  MarginAttr
struct  MiscAttr
struct  SecondaryLogGrad
struct  TickAttr
struct  TitleAttr

Public Types

enum  Visibility {
  VISIBILITY_OFF,
  VISIBILITY_ON,
  VISIBILITY_DEPEND
}
enum  TextPath {
  PATH_RIGHT,
  PATH_LEFT,
  PATH_UP,
  PATH_DOWN,
  PATH_DEPEND
}
enum  GradPosition {
  GRAD_ABOVE,
  GRAD_BELOW,
  GRAD_DEPEND
}
enum  MarginType {
  REL_MARGIN,
  FIXED_MARGIN
}
enum  TickPosition {
  TICK_GRAD_SIDE,
  TICK_GRAD_OTHER_SIDE,
  TICK_ACROSS_AXIS
}
enum  TitlePosition {
  TITLE_MIDDLE,
  TITLE_END,
  TITLE_DEPEND
}
enum  TickSubDef {
  NUM_SUB_TICK,
  PERIOD_MAIN_TICK
}
enum  AxisReverse {
  AXIS_NO_REVERSE,
  AXIS_REVERSE,
  AXIS_REVERSE_DEPEND
}

Public Member Functions

virtual SoType getTypeId () const
virtual const SoNodekitCataloggetNodekitCatalog () const
void setMiscTextAttr (PbMiscTextAttr *textAttr)
const PbMiscTextAttrgetMiscTextAttr () const
void getGrad (Visibility &visibility, GradPosition &position, TextPath &path, SbString &fontName, float &fontSize, float &distAxis, SbBool &addStringVisibility, SbString &addString) const
void getMargin (MarginType &type, float &start, float &end) const
void getTitle (Visibility &visibility, TitlePosition &position, TextPath &path, SbString &fontName, float &fontSize, float &distAxis, SbString &string) const
void getGrid (Visibility &visibility, float &lengthGradSide, float &lengthGradOtherSide) const
void getArrow (Visibility &visibility, float &height, float &length) const
void getTick (Visibility &visibility, TickPosition &position, float &mainLength, float &subLength, TickSubDef &def, unsigned short &numOrPeriod, unsigned short &firstGrad, unsigned short &lastGrad) const
AxisReverse getReverseFlag () const

Static Public Member Functions

static SoType getClassTypeId ()
static const SoNodekitCataloggetClassNodekitCatalog ()

Public Attributes

SoSFEnum gradVisibility
SoSFEnum gradPosition
SoSFEnum gradPath
SoSFString gradFontName
SoSFFloat gradFontSize
SoSFFloat gradDistAxis
SoSFBool gradAddStringVisibility
SoSFString gradAddString
SoSFEnum marginType
SoSFFloat marginStart
SoSFFloat marginEnd
SoSFEnum titleVisibility
SoSFEnum titlePosition
SoSFEnum titlePath
SoSFString titleFontName
SoSFFloat titleFontSize
SoSFFloat titleDistAxis
SoSFString titleString
SoSFEnum gridVisibility
SoSFFloat gridLengthGradSide
SoSFFloat gridLengthGradOtherSide
SoSFEnum arrowVisibility
SoSFFloat arrowHeight
SoSFFloat arrowLength
SoSFEnum tickVisibility
SoSFEnum tickPosition
SoSFFloat tickMainLength
SoSFFloat tickSubLength
SoSFEnum tickSubDef
SoSFUShort tickNumOrPeriod
SoSFUShort tickFirstGrad
SoSFUShort tickLastGrad
SoSFEnum reverseFlag

Detailed Description

MeshViz Abstract class for axis representations.

This class groups all common methods and all common fields of all axes. Some enumerations are named DEPEND, in such a case, the choice of these values is done when building the axis.

All axis texts depend on the current miscellaneous text attributes which define the font name, line length and so on. If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes are defined by "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node PoMiscTextAttr).

Note: Some axis attributes can be defined by calling the method SoBaseKit::set(). However this is typically not possible for attributes that are reset during the traversal of the scene graph. For instance the following code sample must be used in order to specify a renderStyle "texture" for the font of the main graduations of an axis.

        void myAxisCB(void *userData, PoBase *base)
        {
          PoLinearAxis *myAxis = (PoLinearAxis*)base;
          myAxis->set("mainGradTextApp.font", "renderStyle TEXTURE");
        }
        ...
        PoLinearAxis *myAxis = new PoLinearAxis ;
        myAxis->addPostRebuildCallback(myAxisCB,myAxis);

Member Enumeration Documentation

Axis reverse type.

Enumerator:
AXIS_NO_REVERSE 

Texts of the axis are no reversed.

AXIS_REVERSE 

Texts of the axis are reversed (mirror effect).

AXIS_REVERSE_DEPEND 

Depends on the axis type.

Graduation position type.

Enumerator:
GRAD_ABOVE 

Graduations are above the axis.

GRAD_BELOW 

Graduations are below the axis.

GRAD_DEPEND 

Depends on the type of the axis.

Margin type.

Enumerator:
REL_MARGIN 

Relative margin on the axis.

FIXED_MARGIN 

Absolute margin on the axis.

Text path type.

Enumerator:
PATH_RIGHT 

Writing from left to right.

PATH_LEFT 

Writing from right to left.

PATH_UP 

Writing from bottom to top.

PATH_DOWN 

Writing from top to bottom.

PATH_DEPEND 

Depends on the type of the axis.

Tick position type.

Enumerator:
TICK_GRAD_SIDE 

Ticks are on the same side of graduations.

TICK_GRAD_OTHER_SIDE 

Ticks are on the other side of graduations.

TICK_ACROSS_AXIS 

Ticks across the axis.

Sub-tick type.

Enumerator:
NUM_SUB_TICK 

Number of secondary graduations.

PERIOD_MAIN_TICK 

or period of texts of graduations

Title position type.

Enumerator:
TITLE_MIDDLE 

Title is at the middle of the axis.

TITLE_END 

Title is at the end of the axis.

TITLE_DEPEND 

Depends on the axis type.

Enumerations.

Visibility type

Enumerator:
VISIBILITY_OFF 

Invisible.

VISIBILITY_ON 

Visible.

VISIBILITY_DEPEND 

Depends on the type of the axis.


Member Function Documentation

void PoAxis::getArrow ( Visibility visibility,
float &  height,
float &  length 
) const

Gets the arrow axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

static const SoNodekitCatalog* PoAxis::getClassNodekitCatalog (  )  [static]

Returns the SoNodekitCatalog for this class.

Reimplemented from PoBaseAxis.

Reimplemented in PoAngularAxis, PoCartesianAxis, PoGenAxis, PoLinearAxis, PoLogAxis, PoPolarAxis, PoPolarLinAxis, PoPolarLogAxis, and PoTimeAxis.

static SoType PoAxis::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from PoBaseAxis.

Reimplemented in PoAngularAxis, PoCartesianAxis, PoGenAxis, PoLinearAxis, PoLogAxis, PoPolarAxis, PoPolarLinAxis, PoPolarLogAxis, and PoTimeAxis.

void PoAxis::getGrad ( Visibility visibility,
GradPosition position,
TextPath path,
SbString fontName,
float &  fontSize,
float &  distAxis,
SbBool addStringVisibility,
SbString addString 
) const

Gets the graduations axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

void PoAxis::getGrid ( Visibility visibility,
float &  lengthGradSide,
float &  lengthGradOtherSide 
) const

Gets the grid axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

void PoAxis::getMargin ( MarginType type,
float &  start,
float &  end 
) const

Gets the margin axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

const PbMiscTextAttr* PoAxis::getMiscTextAttr (  )  const

Gets a reference to PbMiscTextAttr object for miscellaneous text attributes.

virtual const SoNodekitCatalog* PoAxis::getNodekitCatalog (  )  const [virtual]

Returns the SoNodekitCatalog for this instance.

Reimplemented from PoBaseAxis.

Reimplemented in PoAngularAxis, PoCartesianAxis, PoGenAxis, PoLinearAxis, PoLogAxis, PoPolarAxis, PoPolarLinAxis, PoPolarLogAxis, and PoTimeAxis.

AxisReverse PoAxis::getReverseFlag (  )  const

Gets the reverse flag axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

void PoAxis::getTick ( Visibility visibility,
TickPosition position,
float &  mainLength,
float &  subLength,
TickSubDef def,
unsigned short &  numOrPeriod,
unsigned short &  firstGrad,
unsigned short &  lastGrad 
) const

Gets the tick axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

void PoAxis::getTitle ( Visibility visibility,
TitlePosition position,
TextPath path,
SbString fontName,
float &  fontSize,
float &  distAxis,
SbString string 
) const

Gets the title axis attributes computed by the last axis rebuilding.

If the axis have never been built, the method return the value of the equivalent field.

virtual SoType PoAxis::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from PoBaseAxis.

Reimplemented in PoAngularAxis, PoCartesianAxis, PoGenAxis, PoLinearAxis, PoLogAxis, PoPolarAxis, PoPolarLinAxis, PoPolarLogAxis, and PoTimeAxis.

void PoAxis::setMiscTextAttr ( PbMiscTextAttr textAttr  ) 

Sets a reference to PbMiscTextAttr object for miscellaneous text attributes.

If this method is not called (or called passing NULL as argument), this is the miscellaneous text attributes defined in the current inherited state (defined with the property node PoMiscTextAttr) which are used.


Member Data Documentation

Arrow height.

If this value is <= 0, the height is fixed at 0.03. This value is a percentage of the current domain (cf PoBase description). Default is 0.03.

Arrow length.

If this value is <= 0, the length is fixed at 0.05. This value is a percentage of the current domain (cf PoBase description). Default is 0.05.

Arrow visibility.

Use enum Visibility. Default is VISIBILITY_DEPEND.

String to be concatenated.

Default is empty string.

Specify the visibility of a string concatenated with the graduations.

Default is false.

Distance from the graduations to the axis.

If this value is <= 0, the distance is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.

Graduations font name.

If the font is equal to its default value (empty string), the font used is the font of the current miscellaneous text attributes. Default is empty string.

Font size of the graduations.

If this value is <= 0, the graduations font size is fixed at 0.04 if the graduations do not cross each other. This value is a percentage of the current domain (see PoBase description). As a result, the size of graduations text on the screen is the same regardless of text orientation. Default is 0.

Graduations path.

Use enum TextPath. Default is PATH_DEPEND.

Graduations position.

Use enum GradPosition. Default is GRAD_DEPEND.

Graduations visibility.

Use enum Visibility. Default is VISIBILITY_DEPEND.

Grid lines length other side graduation texts.

Default is 1.

Grid lines length side graduation texts.

Default is 0.

Grid lines visibility.

Use enum Visibility. Default is VISIBILITY_DEPEND.

Margin at the end of the axis.

Default is 0.

Margin at the start of the axis.

Default is 0.

Relative or absolute margin.

Use enum MarginType. Default is REL_MARGIN.

Allow to reverse the writing path of all axis texts.

Use enum AxisReverse. Default is AXIS_REVERSE_DEPEND.

First graduation to display.

Default is 1.

Last graduation to display (number starting with the ending one).

Default is 1.

Main graduations ticks length.

If this value is <= 0, the height is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.

Number of secondary graduations (tickSubDef = NUM_SUB_TICK), or period of texts of graduations (tickSubDef = PERIOD_MAIN_TICK).

Default is 1.

Position of the tick marks.

Use enum TickPosition. Default is TICK_GRAD_SIDE.

Secondary graduations tick definition.

The secondary graduations can be given either by a number or by a period. Use enum TickSubDef. Default is PERIOD_MAIN_TICK.

Secondary graduations ticks length.

If this value is <= 0, the length is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.

Tick marks visibility.

Use enum Visibility. Default is VISIBILITY_DEPEND.

Distance from the title to the axis.

If this value is <= 0, the distance is automatically calculated. This value is a percentage of the current domain (cf PoBase description). Default is 0.

Title font name.

If the font is equal to its default value (empty string), the font used is the font of the current miscellaneous text attributes. Default is empty string.

Font size of the title.

If this value is <= 0, the graduations font size is fixed at 0.055. This value is a percentage of the current domain (see PoBase description). As a result, the size of text on the screen is the same regardless of text orientation. Default is 0.

Path of the title.

Use enum TextPath. Default is PATH_DEPEND.

Position of the title.

Use enum TitlePosition. Default is TITLE_DEPEND.

Title string.

Default is empty string.

Visibility of the title.

Use enum Visibility. Default is VISIBILITY_DEPEND.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 11 Nov 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/