20#include <Inventor/SbLinear.h>
70 const char *numPrefix2Text ,
71 const char *numPrefix3Text ,
72 const char *numPostfix1Text,
73 const char *numPostfix2Text,
74 const char *numPostfix3Text);
116 float sld[3],
float ad0[3],
float ad1[3],
135 bool _axisNumberingFlag;
138 const char *_axisTexts[3];
141 const char *_numberPrefixes[3];
144 const char *_numberPostfixes[3];
153 float _axisOrigin[3];
156 float _axisNumBias[3];
159 float _axisNumScale[3];
162 float _axisStepSizes[3];
165 float _axisMarkerLength[3];
168 float _axisEnds[3][2];
174 float _axisWingLength[3];
177 float _axisOverScale[3];
180 float _subTickSteps[3];
183 float _subTickScale[3];
189 float _axisTicksExt[3][2];
192 bool _multiAxis[3][2];
A class to administrate an axis coordinate system drawable in OpenGL.
void setSubTickScale(float x, float y, float z)
Set tick lengths on additional cross axis, measured in parts of axisMarkerLength.
void setFontSize(MLuint32 size)
The set size of the font, used in drawString().
void setAxisNumBias(float x, float y, float z)
Set a offset added to the drawn axis numbers.
void setAxisTicks(float xmi, float xma, float ymi, float yma, float zmi, float zma)
Set start and end position of axis ticks.
void setSubTickSteps(float x, float y, float z)
Set tick distances on additional cross axis, measured in parts of axisStepSizes.
void setAxisNumScale(float x, float y, float z)
Set a scale multiplied to the drawn axis numbers.
void setAxisOverScale(float sx, float sy, float sz)
Set scale factors for base axis, so that they're longer then axis ends.
void drawAxis()
Draw axis coordinate system with current parameter set.
AxisTextAlignMode
Type selector for text alignment modes.
void drawString(const char *s, const SbVec4f &color, AxisTextAlignMode alignMode=AXIS_TEXT_ALIGN_LEFT)
Draws a string at the current raster position.
Axis()
Default constructor.
void axisNumberingOn(bool b)
Enable/Disable axis tick numbering for all three axis.
void subTickingOn(bool b1, bool b2, bool b3)
Set sub tick drawing for base coordinate system lines.
void setAxisEnds(float xmi, float xma, float ymi, float yma, float zmi, float zma)
Set minimum and maximum extends of all three axis.
void setAxisTexts(const char *at0, const char *at1, const char *at2)
Set description texts of the three axis.
void setAxisVisibility(bool b1, bool b2, bool b3)
Enable/Disable visibility of the three axis.
void drawSubLines(float axis_ori[3], float len, float step, float sld[3], float ad0[3], float ad1[3], const char *axisText, float startTick, float endTick, bool drawAxis[3], int numAxis, int baseAxis, float numBias, float numScale, MLint32 recursions)
Draws one axis with its additional cross axis. It also calls draw_linearAxis.
void setAxisStepSizes(float x, float y, float z)
Set distances between axis ticks.
void setAxisColors(SbVec4f c[3])
Set colors for the three axis.
void setMultiAxis(bool xy, bool xz, bool yx, bool yz, bool zx, bool zy)
Set which additional cross axis shall be drawn.
void setAxisNumberAlignModes(AxisTextAlignMode align0=AXIS_TEXT_ALIGN_LEFT, AxisTextAlignMode align1=AXIS_TEXT_ALIGN_LEFT, AxisTextAlignMode align2=AXIS_TEXT_ALIGN_LEFT)
Set texts alignment for the three axis numbering texts.
void setAxisTextAlignModes(AxisTextAlignMode align0=AXIS_TEXT_ALIGN_LEFT, AxisTextAlignMode align1=AXIS_TEXT_ALIGN_LEFT, AxisTextAlignMode align2=AXIS_TEXT_ALIGN_LEFT)
Set texts alignment for the three axis tip texts.
void setAxisWingLength(float sx, float sy, float sz)
Set length of arrow wings.
void drawLinearAxis(float axisOri[3], float aml[3], float ass[3], float awl[3], const char *at[3], bool drawAxis[3], int baseAxis, MLint32 recursions=0)
Draw the coordinate system and calls drawSubLines, so it is also called recursively.
void setAxisMarkerLength(float x, float y, float z)
Set length of axis ticks.
void setAxisOrigin(float x, float y, float z)
Set world position where axis coordinate system is drawn.
void setNumberPreAndPostFixes(const char *numPrefix1Text, const char *numPrefix2Text, const char *numPrefix3Text, const char *numPostfix1Text, const char *numPostfix2Text, const char *numPostfix3Text)
Set prefixes and postfixes to be inserted before/after each drawn number next to axis.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.