MeVisLab Resolution Independence API
|
A class to administrate an axis coordinate system drawable in OpenGL. More...
#include <Axis.h>
Public Types | |
enum | AxisTextAlignMode { AXIS_TEXT_ALIGN_LEFT = 0 , AXIS_TEXT_ALIGN_CENTER , AXIS_TEXT_ALIGN_RIGHT } |
Type selector for text alignment modes. More... | |
Public Member Functions | |
Axis () | |
Default constructor. | |
void | setAxisColors (SbVec4f c[3]) |
Set colors for the three axis. | |
void | axisNumberingOn (bool b) |
Enable/Disable axis tick numbering for all three axis. | |
void | setAxisStepSizes (float x, float y, float z) |
Set distances between axis ticks. | |
void | setAxisVisibility (bool b1, bool b2, bool b3) |
Enable/Disable visibility of the three axis. | |
void | setAxisOrigin (float x, float y, float z) |
Set world position where axis coordinate system is drawn. | |
void | setAxisNumBias (float x, float y, float z) |
Set a offset added to the drawn axis numbers. | |
void | setAxisNumScale (float x, float y, float z) |
Set a scale multiplied to the drawn axis numbers. | |
void | setAxisMarkerLength (float x, float y, float z) |
Set length of axis ticks. | |
void | setAxisWingLength (float sx, float sy, float sz) |
Set length of arrow wings. | |
void | setAxisOverScale (float sx, float sy, float sz) |
Set scale factors for base axis, so that they're longer then axis ends. | |
void | setAxisTicks (float xmi, float xma, float ymi, float yma, float zmi, float zma) |
Set start and end position of axis ticks. | |
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. | |
void | setAxisTexts (const char *at0, const char *at1, const char *at2) |
Set description texts of the three axis. | |
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 | 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 | setAxisEnds (float xmi, float xma, float ymi, float yma, float zmi, float zma) |
Set minimum and maximum extends of all 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 | setSubTickSteps (float x, float y, float z) |
Set tick distances on additional cross axis, measured in parts of axisStepSizes. | |
void | setSubTickScale (float x, float y, float z) |
Set tick lengths on additional cross axis, measured in parts of axisMarkerLength. | |
void | subTickingOn (bool b1, bool b2, bool b3) |
Set sub tick drawing for base coordinate system lines. | |
void | drawString (const char *s, const SbVec4f &color, AxisTextAlignMode alignMode=AXIS_TEXT_ALIGN_LEFT) |
Draws a string at the current raster position. | |
void | drawAxis () |
Draw axis coordinate system with current parameter set. | |
void | setFontSize (MLuint32 size) |
The set size of the font, used in drawString(). | |
Protected Member Functions | |
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 | 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. | |
A class to administrate an axis coordinate system drawable in OpenGL.
Axis::Axis | ( | ) |
Default constructor.
void Axis::axisNumberingOn | ( | bool | b | ) |
Enable/Disable axis tick numbering for all three axis.
void Axis::drawAxis | ( | ) |
Draw axis coordinate system with current parameter set.
|
protected |
Draw the coordinate system and calls drawSubLines, so it is also called recursively.
void Axis::drawString | ( | const char * | s, |
const SbVec4f & | color, | ||
AxisTextAlignMode | alignMode = AXIS_TEXT_ALIGN_LEFT ) |
Draws a string at the current raster position.
|
protected |
Draws one axis with its additional cross axis. It also calls draw_linearAxis.
void Axis::setAxisColors | ( | SbVec4f | c[3] | ) |
Set colors for the three axis.
void Axis::setAxisEnds | ( | float | xmi, |
float | xma, | ||
float | ymi, | ||
float | yma, | ||
float | zmi, | ||
float | zma ) |
Set minimum and maximum extends of all three axis.
void Axis::setAxisMarkerLength | ( | float | x, |
float | y, | ||
float | z ) |
Set length of axis ticks.
void Axis::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 Axis::setAxisNumBias | ( | float | x, |
float | y, | ||
float | z ) |
Set a offset added to the drawn axis numbers.
void Axis::setAxisNumScale | ( | float | x, |
float | y, | ||
float | z ) |
Set a scale multiplied to the drawn axis numbers.
void Axis::setAxisOrigin | ( | float | x, |
float | y, | ||
float | z ) |
Set world position where axis coordinate system is drawn.
void Axis::setAxisOverScale | ( | float | sx, |
float | sy, | ||
float | sz ) |
Set scale factors for base axis, so that they're longer then axis ends.
void Axis::setAxisStepSizes | ( | float | x, |
float | y, | ||
float | z ) |
Set distances between axis ticks.
void Axis::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 Axis::setAxisTexts | ( | const char * | at0, |
const char * | at1, | ||
const char * | at2 ) |
Set description texts of the three axis.
void Axis::setAxisTicks | ( | float | xmi, |
float | xma, | ||
float | ymi, | ||
float | yma, | ||
float | zmi, | ||
float | zma ) |
Set start and end position of axis ticks.
void Axis::setAxisVisibility | ( | bool | b1, |
bool | b2, | ||
bool | b3 ) |
Enable/Disable visibility of the three axis.
void Axis::setAxisWingLength | ( | float | sx, |
float | sy, | ||
float | sz ) |
Set length of arrow wings.
|
inline |
The set size of the font, used in drawString().
void Axis::setMultiAxis | ( | bool | xy, |
bool | xz, | ||
bool | yx, | ||
bool | yz, | ||
bool | zx, | ||
bool | zy ) |
Set which additional cross axis shall be drawn.
void Axis::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.
void Axis::setSubTickScale | ( | float | x, |
float | y, | ||
float | z ) |
Set tick lengths on additional cross axis, measured in parts of axisMarkerLength.
void Axis::setSubTickSteps | ( | float | x, |
float | y, | ||
float | z ) |
Set tick distances on additional cross axis, measured in parts of axisStepSizes.
void Axis::subTickingOn | ( | bool | b1, |
bool | b2, | ||
bool | b3 ) |
Set sub tick drawing for base coordinate system lines.