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
d668a2cc
Commit
d668a2cc
authored
Nov 15, 2011
by
Philippe Pébay
Browse files
Implemented simplifications allowed by particular nature of radial axes
Change-Id: Ie19e17c987495a8c0f1d1c565866ff47d68f8b63
parent
b90107c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hybrid/Testing/Cxx/TestPolarAxes.cxx
View file @
d668a2cc
...
...
@@ -79,7 +79,7 @@ int TestPolarAxes( int argc, char * argv [] )
vtkNew
<
vtkPolarAxesActor
>
polaxes
;
polaxes
->
SetBounds
(
normals
->
GetOutput
()
->
GetBounds
()
);
polaxes
->
SetPole
(
0
.
,
1.
,
3.
);
polaxes
->
SetPole
(
.
5
,
1.
,
3.
);
polaxes
->
SetAutoScaleRadius
(
false
);
polaxes
->
SetMaximumRadius
(
3.
);
polaxes
->
SetMaximumAngle
(
180.
);
...
...
Hybrid/vtkPolarAxesActor.cxx
View file @
d668a2cc
...
...
@@ -670,13 +670,12 @@ void vtkPolarAxesActor::BuildPolarAxisTicks( double origin )
majorStart
=
major
*
(
this
->
FFix
(
sortedRange
[
0
]
*
(
1.
/
major
)
)
+
1.
);
}
// Set major start and delta corresponding to range
axis
->
SetMajorRangeStart
(
majorStart
);
axis
->
SetDeltaRangeMajor
(
major
);
double
t
=
(
majorStart
-
sortedRange
[
0
]
)
/
range
;
majorStart
=
t
*
range
+
origin
;
// Set major start and deltas
// Set major start and delta corresponding to coordinates
majorStart
=
majorStart
-
sortedRange
[
0
]
+
origin
;
axis
->
SetMajorStart
(
VTK_AXIS_TYPE_X
,
majorStart
);
axis
->
SetDeltaMajor
(
VTK_AXIS_TYPE_X
,
major
);
}
...
...
@@ -689,9 +688,8 @@ void vtkPolarAxesActor::BuildPolarAxisLabels( double zeroThreshold )
double
deltaMajor
=
axis
->
GetDeltaMajor
(
VTK_AXIS_TYPE_X
);
double
val
=
axis
->
GetMajorStart
(
VTK_AXIS_TYPE_X
);
const
double
*
p2
=
axis
->
GetPoint2Coordinate
()
->
GetValue
();
double
lastVal
=
p2
[
0
];
vtkIdType
nLabels
=
0
;
while
(
val
<=
lastVal
&&
nLabels
<
VTK_MAX_LABELS
)
while
(
val
<=
p2
[
0
]
&&
nLabels
<
VTK_MAX_LABELS
)
{
++
nLabels
;
val
+=
deltaMajor
;
...
...
@@ -719,7 +717,6 @@ void vtkPolarAxesActor::BuildPolarAxisLabels( double zeroThreshold )
// Now create labels and polar arcs
val
=
axis
->
GetMajorRangeStart
();
deltaMajor
=
axis
->
GetDeltaRangeMajor
();
const
char
*
format
=
this
->
RadialLabelFormat
;
char
label
[
64
];
for
(
int
i
=
0
;
i
<
nLabels
;
++
i
)
...
...
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