Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
adf4b800
Commit
adf4b800
authored
Nov 18, 2011
by
Philippe Pébay
Browse files
Removed unused exponent method
Change-Id: I6660c865e2c993d5181359745aae565b511b421e
parent
bda2e527
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkPolarAxesActor.cxx
View file @
adf4b800
...
...
@@ -456,58 +456,6 @@ void vtkPolarAxesActor::TransformBounds( vtkViewport *viewport,
bounds
[
5
]
=
transMaxPt
[
2
];
}
//-----------------------------------------------------------------------------
// Method: LabelExponent
//
// Purpose:
// Determines the proper exponent for the min and max values.
//
// Arguments:
// min The minimum value along a certain axis.
// max The maximum value along a certain axis.
//
// Note: This code is mostly stolen from old MeshTV code,
// /meshtvx/toolkit/plotgrid.c, axlab_format.
int
vtkPolarAxesActor
::
LabelExponent
(
double
min
,
double
max
)
{
if
(
min
==
max
)
{
return
0
;
}
//
// Determine power of 10 to scale axis labels to.
//
double
range
=
(
fabs
(
min
)
>
fabs
(
max
)
?
fabs
(
min
)
:
fabs
(
max
)
);
double
pow10
=
log10
(
range
);
//
// Cutoffs for using scientific notation. The following 4 variables
// should all be static for maximum performance but were made non-static
// to get around a compiler bug with the MIPSpro 7.2.1.3 compiler.
//
double
eformat_cut_min
=
-
1.5
;
double
eformat_cut_max
=
3.0
;
double
cut_min
=
pow
(
10.
,
eformat_cut_min
);
double
cut_max
=
pow
(
10.
,
eformat_cut_max
);
double
ipow10
;
if
(
range
<
cut_min
||
range
>
cut_max
)
{
//
// We are going to use scientific notation and round the exponents to
// the nearest multiple of three.
//
ipow10
=
(
floor
(
floor
(
pow10
)
/
3.
)
)
*
3
;
}
else
{
ipow10
=
0
;
}
return
static_cast
<
int
>
(
ipow10
);
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
BuildAxes
(
vtkViewport
*
viewport
)
{
...
...
@@ -657,6 +605,7 @@ inline double vtkPolarAxesActor::FSign( double value, double sign )
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
BuildPolarAxisTicks
(
double
x0
)
{
cerr
<<
"In BuildPolarAxisTicks
\n
"
;
double
delta
;
if
(
this
->
AutoSubdividePolarAxis
...
...
@@ -726,6 +675,7 @@ void vtkPolarAxesActor::BuildPolarAxisTicks( double x0 )
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
BuildPolarAxisLabelsArcs
(
double
*
O
)
{
cerr
<<
"In BuildPolarAxisLabelsArcs
\n
"
;
// Prepare storage for polar axis labels
vtkStringArray
*
labels
=
vtkStringArray
::
New
();
labels
->
SetNumberOfValues
(
this
->
NumberOfPolarAxisTicks
);
...
...
Hybrid/vtkPolarAxesActor.h
View file @
adf4b800
...
...
@@ -249,8 +249,6 @@ protected:
// Build polar axis labels and arcs with respect to specified pole.
void
BuildPolarAxisLabelsArcs
(
double
*
);
int
LabelExponent
(
double
min
,
double
max
);
int
Digits
(
double
min
,
double
max
);
double
MaxOf
(
double
,
double
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment