Poster of Linux kernelThe best gift for a Linux geek
tlp::GlQuantitativeAxis

tlp::GlQuantitativeAxis

Section: Tulip Open GL Library (3) Updated: 19 Jul 2010
Local index Up
 

NAME

tlp::GlQuantitativeAxis -

A class to render an axis graduated with numerical values for a given range.

 

SYNOPSIS


#include <GlQuantitativeAxis.h>

Inherits tlp::GlAxis.  

Public Member Functions


GlQuantitativeAxis (const std::string &axisName, const Coord &axisBaseCoord, const float axisLength, const AxisOrientation &axisOrientation, const Color &axisColor, const bool addArrow=true, const bool ascendingOrder=true)

void setAxisParameters (const double min, const double max, const unsigned int nbGraduations, const LabelPosition &axisGradsLabelsPosition=LEFT_OR_BELOW, const bool drawFirstLabel=true)

void setAxisParameters (const int min, const int max, const unsigned int incrementStep, const LabelPosition &axisGradsLabelsPosition=LEFT_OR_BELOW, const bool drawFirstLabel=true)

void setLogScale (const bool logScale, const unsigned int logBase=10)

void setAscendingOrder (const bool ascendingOrder)

void updateAxis ()

Coord getAxisPointCoordForValue (double value) const

double getValueForAxisPoint (const Coord &axisPointCoord)

bool hasAscendingOrder () const
 

Detailed Description

A class to render an axis graduated with numerical values for a given range.

This class allows to draw a quantitative axis (i.e. an axis axis graduated with numerical values for a given range)  

Constructor & Destructor Documentation

 

tlp::GlQuantitativeAxis::GlQuantitativeAxis (const std::string & axisName, const Coord & axisBaseCoord, const float axisLength, const AxisOrientation & axisOrientation, const Color & axisColor, const bool addArrow = true, const bool ascendingOrder = true)GlQuantitativeAxis constructor. Create an quantitative axis without graduations (need to call setAxisParameters to build them)

Parameters:

axisName the name of the axis the base coord of the axis (if the axis is horizontal, it is the the left end, if vertical it is the down end) the length of the axis the orientation of the axis, 2 possible values (HORIZONTAL_AXIS or VERTICAL_AXIS) the color of the axis If true, an arrow will be added to one end of the axis according to the axis order (ascending or descending) If true, the min value will be at the bottom end and the max will be at the top end if the axis is vertical (min at the left and max at the right if it is horizontal). If false this positions are switched

 

Member Function Documentation

 

Coord tlp::GlQuantitativeAxis::getAxisPointCoordForValue (double value) constMethod to get the axis point coordinates for a given value

Parameters:

value the value we want to retrieve axis point coordinates

 

double tlp::GlQuantitativeAxis::getValueForAxisPoint (const Coord & axisPointCoord)Method to get the value associated to an axis point

Parameters:

axisPointCoord the axis point coordinates we want to retrieve associated value

 

bool tlp::GlQuantitativeAxis::hasAscendingOrder () const [inline]Method to get the order of the values on the axis (ascending or descending)

 

void tlp::GlQuantitativeAxis::setAscendingOrder (const bool ascendingOrder) [inline]Method to set the order of the values on the axis (ascending or descending). A call to updateAxis has to be done after calling this method to build or update the axis graduations

 

void tlp::GlQuantitativeAxis::setAxisParameters (const int min, const int max, const unsigned int incrementStep, const LabelPosition & axisGradsLabelsPosition = LEFT_OR_BELOW, const bool drawFirstLabel = true)

 

void tlp::GlQuantitativeAxis::setAxisParameters (const double min, const double max, const unsigned int nbGraduations, const LabelPosition & axisGradsLabelsPosition = LEFT_OR_BELOW, const bool drawFirstLabel = true)Method to set the quantitative axis parameters. A call to updateAxis has to be done after calling this method to build or update the axis graduations

Parameters:

min the min value of the range the axis represents
max the max value of the range the axis represents
nbGraduations the number of graduations to build
axisGradsLabelsPosition the relative position of the axis graduations label. Two possible values : LEFT_OR_BELOW (if the axis is vertical, labels will be on the left of the axis, otherwise below) or RIGHT_OR_ABOVE
drawFirstLabel If false, the first graduation label will not be drawn (usefull when some axis have the same base coord to avoid labels overlapping)

 

void tlp::GlQuantitativeAxis::setLogScale (const bool logScale, const unsigned int logBase = 10)Method to set a logarithmic scale on the axis. A call to updateAxis has to be done after calling this method to build or update the axis graduations

Parameters:

logScale If true, activate the logarithmic scale on the axis
logBase If filled, set the logarithm base

 

void tlp::GlQuantitativeAxis::updateAxis () [virtual]Method to update the axis drawing. It has to be called when one (or more) of the setters method above has been used. This method redraw the whole axis and the graduations.

Reimplemented from tlp::GlAxis.

 

Author

Generated automatically by Doxygen for Tulip Open GL Library from the source code.


 

Index

NAME
SYNOPSIS
Public Member Functions
Detailed Description
Constructor & Destructor Documentation
tlp::GlQuantitativeAxis::GlQuantitativeAxis (const std::string & axisName, const Coord & axisBaseCoord, const float axisLength, const AxisOrientation & axisOrientation, const Color & axisColor, const bool addArrow = true, const bool ascendingOrder = true)GlQuantitativeAxis constructor. Create an quantitative axis without graduations (need to call setAxisParameters to build them)
Member Function Documentation
Coord tlp::GlQuantitativeAxis::getAxisPointCoordForValue (double value) constMethod to get the axis point coordinates for a given value
double tlp::GlQuantitativeAxis::getValueForAxisPoint (const Coord & axisPointCoord)Method to get the value associated to an axis point
bool tlp::GlQuantitativeAxis::hasAscendingOrder () const [inline]Method to get the order of the values on the axis (ascending or descending)
void tlp::GlQuantitativeAxis::setAscendingOrder (const bool ascendingOrder) [inline]Method to set the order of the values on the axis (ascending or descending). A call to updateAxis has to be done after calling this method to build or update the axis graduations
void tlp::GlQuantitativeAxis::setAxisParameters (const int min, const int max, const unsigned int incrementStep, const LabelPosition & axisGradsLabelsPosition = LEFT_OR_BELOW, const bool drawFirstLabel = true)
void tlp::GlQuantitativeAxis::setAxisParameters (const double min, const double max, const unsigned int nbGraduations, const LabelPosition & axisGradsLabelsPosition = LEFT_OR_BELOW, const bool drawFirstLabel = true)Method to set the quantitative axis parameters. A call to updateAxis has to be done after calling this method to build or update the axis graduations
void tlp::GlQuantitativeAxis::setLogScale (const bool logScale, const unsigned int logBase = 10)Method to set a logarithmic scale on the axis. A call to updateAxis has to be done after calling this method to build or update the axis graduations
void tlp::GlQuantitativeAxis::updateAxis () [virtual]Method to update the axis drawing. It has to be called when one (or more) of the setters method above has been used. This method redraw the whole axis and the graduations.
Author

This document was created by man2html, using the manual pages.
Time: 22:28:16 GMT, April 16, 2011