Click or drag to resize
Ab4d.SharpEngine logo

AxisWithLabelsBaseNode Class

AxisWithLabelsBaseNode is a base class for AxisWithLabelsNode and defines many common properties that define the value ranges, size and style of the value labels and title and other common axis properties.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public abstract class AxisWithLabelsBaseNode : GroupNode, 
	IDisposable

The AxisWithLabelsBaseNode type exposes the following members.

Constructors
 NameDescription
Protected methodAxisWithLabelsBaseNode Constructor
Top
Properties
 NameDescription
Public propertyAxisEndPosition Gets or sets the axis's end position. Default value is (0, 100, 0).
Public propertyAxisLineColor Gets or sets the color of the axis line. Default value is black.
Public propertyAxisLineNode Gets the LineNode that is used to show axis line.
Public propertyAxisLineThickness Gets or sets the thickness of the axis line in screen coordinates. Default value is 2.
Public propertyAxisStartPosition Gets or sets axis's start position. Default value is (0, 0, 0).
Public propertyAxisTitle Gets or sets the title of this axis.
Public propertyAxisTitleColor Gets or sets the color of the axis title text. Default value is black.
Public propertyAxisTitleFontSize Gets or sets the size of the axis title text. Default value is 6.
Public propertyAxisTitlePadding Gets or sets a float value that how much the axis title text is positioned away from the longest value label. Default value is 3.
Public propertyIsRenderingOnRightSideOfAxis Gets or sets a Boolean that specifies if Ticks and Labels are rendered on the right side of the axis (when true) or on the left side of the axis (when false). An example of right side is when the axis goes from the bottom of the screen to the top of the screen, then right side is right to the axis line. Default value is false.
Public propertyMajorTicksLength Gets or sets a float value that defines the length of major tick lines. Default value is 5. When set to 0, then major tick lines are not shown (but labels are still shown).
Public propertyMajorTicksStep Gets or sets a float value that defines the step (difference) between two major ticks makers and labels (labels are rendered next to major tick markers). When set to zero or negative value, then major ticks and labels are not shown. Default value is 1.
Public propertyMaximumValue Gets or sets a float that defines the maximum value on the graph. When SnapMaximumValueToMajorTicks is set to true, the actually used maximum value can be bigger then this value. Default value is 10.
Public propertyMinimumValue Gets or sets a float that defines the minimum value on the graph. Default value is 0.
Public propertyMinorTicksLength Gets or sets a float value that defines the length of minor tick lines. Default value is 2.5. When set to 0, then minor tick lines are not shown.
Public propertyMinorTicksStep Gets or sets a float value that defines the step (difference) between two minor ticks makers. When set to zero, negative value or when the value is smaller then MajorTicksStep, then minor ticks are not shown. Default value is 0.5.
Public propertyRightDirectionVector Gets or sets the Vector3 that specifies the right direction of the axis - the direction in which the text is drawn. The axis up direction is defined by the AxisStartPosition and AxisEndPosition. Default value is (1, 0, 0).
Public propertySnapMaximumValueToMajorTicks When true (by default) then the used maximum value is always snapped to the value with major ticks marker. This way the label for maximum value is always shown. When false then the value that is set to the MaximumValue is always used.
Public propertyTicksLineColor Gets or sets the color of ticks lines. Default value is black.
Public propertyTicksLineThickness Gets or sets the thickness of the ticks lines in screen coordinates. Default value is 1.
Public propertyTicksMultiLineNode Gets the MultiLineNode that is used to show major and minor tick lines.
Public propertyValueDisplayCulture Gets or sets the culture that is used to format value labels. Default value is null (using current culture).
Public propertyValueDisplayFormatString Gets or sets the string that defines the format string that is used to format the displayed values. When this string is empty, then values are not displayed. Default value is "#,##0". Culture that is used to format the value is defined by the ValueDisplayCulture property (InvariantCulture by default).
Public propertyValueLabelsColor Gets or sets the color of the value labels text. Default value is black.
Public propertyValueLabelsFontSize Gets or sets the size of the value labels text. Default value is 6.
Public propertyValueLabelsPadding Gets or sets a float value that how much are the value labels texts positioned away from the major tick markers. Default value is 3.
Top
Methods
 NameDescription
Protected methodCloneProperties 
Public methodGetMajorTickValues Returns an array of float value that represents the major tick values. By default major tick values are calculated based on MinimumValue, MaximumValue and MajorTicksStep properties.
Public methodGetMinorTickValues Returns an array of float value that represents the minor tick values. By default minor tick values are calculated based on MinimumValue, MaximumValue and MinorTicksStep properties.
Public methodGetRelativeValue GetRelativeValue returns a relative value in range from 0 to 1 from the specified absoluteValue (where the value lies between the AxisStartPosition and AxisEndPosition). Value 0 is returned when absoluteValue is set to MinimumValue. Value 1 is returned when absoluteValue is set to the value returned by the GetUsedMaximumValue method. Returned value is negative when absoluteValue is smaller then MinimumValue and bigger then 1 when the absoluteValue is bigger then used maximum value.
Public methodGetUsedMaximumValue Returns the used maximum value. This value can be different from MaximumValue when SnapMaximumValueToMajorTicks is set to true.
Public methodGetValueLabels Returns an array of strings that represents the value labels.
Protected methodGetValuesRange GetValuesRange returns the difference between used maximum value and used minimum value. Note that used maximum value can be different from MaximumValue when SnapMaximumValueToMajorTicks is set to true
Protected methodOnTicksPositionsChanged OnTicksPositionsChanged method must be implemented by a derived class. The method is called when the tick positions are changed.
Protected methodOnUpdate Updates the axis if needed.
(Overrides SceneNodeOnUpdate)
Protected methodRequestTickValuesRegeneration 
Protected methodRequestUpdateAxisTitle 
Protected methodRequestUpdateValuesPositions 
Public methodSetAxisDataRange SetAxisDataRange method sets the data range and ticks steps for this axis. An advantage of this method is that it calls the RequestTickValuesRegeneration only once and not after each propety set.
Public methodSetCustomMajorTickValues SetCustomMajorTickValues method sets custom float values that represents custom major tick values. The tick values should be between MinimumValue and MaximumValue (values outside of this range will not be shown). The values define the text for the shown labels (when custom labels are not used) and also define the positions of the major tick lines and value labels - if the value is in the middle between MinimumValue and MaximumValue, the tick and label will be also shown in the middle between AxisStartPosition and AxisEndPosition. When customMajorTickValues is null, then major thick lines and value labels will not be shown.
Public methodSetCustomMinorTickValues SetCustomMinorTickValues method sets custom float values that represents custom minor tick values. The tick values should be between MinimumValue and MaximumValue (values outside of this range will not be shown). The values define the positions of the minor tick lines. When customMinorTickValues is null, then minor thick lines will not be shown.
Public methodSetCustomValueColors SetCustomValueColors method sets custom colors for value labels. The number of elements in the customValueLabels array should be the same as number of displayed major ticks (to get this number call GetValueLabels method). To stop using custom value color, call this method with null.
Public methodSetCustomValueLabels SetCustomValueLabels method sets custom texts that will be used as value labels. One value label is displayed for one major tick. The number of elements in the customValueLabels array should be the same as number of displayed major ticks (to get this number call GetValueLabels method). To skip a value label set the array element to null or empty string. To set custom value colors, call SetCustomValueColors method.
Protected methodUpdateTicksMultiLinePositions UpdateTicksMultiLinePositions method sets various 3D positions (majorTickPositions, minorTickPositions, valueLabelPositions) that represent positions of ticks and value labels in 3D space. The values are calculated based on majorTickValues, minorTickValues and valueLabels lists. The method is virtual and can be overridden to provide custom positioning of ticks and value labels.
Protected methodUpdateTickValues UpdateTickValues method sets values of each major and minor tick and writes them into majorTickValues, minorTickValues lists. The method also for each major tick sets the value label text and set that to valueLabels list. The method is virtual and can be overridden to provide custom calculation of ticks and value label texts.
Top
Fields
 NameDescription
Protected fieldcustomValueColors When not null, it provides the custom colors for the value labels. To set custom value colors, call SetCustomValueColors method.
Protected fieldisAxisTitleDirty 
Protected fieldisTickValuesDirty 
Protected fieldisValuePositionsDirty 
Protected fieldmajorTickPositions A list of Vector3 values that define the positions for each major tick. Those positions lie on the axis.
Protected fieldmajorTickValues A list of float values that define the major tick values. The values are stored as actual values.
Protected fieldminorTickPositions A list of Vector3 values that define the positions for each minor tick. Those positions lie on the axis.
Protected fieldminorTickValues A list of float values that define the minor tick values. The values are stored as actual values.
Protected fielduseCustomMajorTickValues When true, then custom major tick values are used and are not defined by interpolating between MinimumValue and MaximumValue. Custom value labels are set by SetCustomMajorTickValues.
Protected fielduseCustomMinorTickValues When true, then custom minor tick values are used and are not defined by interpolating between MinimumValue and MaximumValue. Custom value labels are set by SetCustomMinorTickValues.
Protected fielduseCustomValueLabels When true, then custom value labels are used and are not defined by calling string.Format for each major tick value. Custom value labels are set by SetCustomValueLabels.
Protected fieldvalueLabelPositions A list of Vector3 values that define the positions for each value label - text that shows the value for each major tick. Those positions are defined away from the axis based on ValueLabelsPadding.
Protected fieldvalueLabels A list of strings that define the text for value label that is shown for each major value. Indexes of texts are the same as indexes in majorTickValues. Custom value labels can be set by calling SetCustomValueLabels method. To set custom value colors, call SetCustomValueColors method.
Top
Extension Methods
 NameDescription
Public Extension MethodDumpHierarchy Writes the hierarchy of the GroupNode and its children into the Visual Studio Output window.
(Defined by Extensions)
Top
See Also