Skip to content
GitLab
Menu
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
76ee23c7
Commit
76ee23c7
authored
Nov 15, 2011
by
Philippe Pébay
Browse files
Have a min and max possible number of radial axes, clamp with them.
Change-Id: Ia4c7ac3578e0c17468c016bde30056ccc6f79c85
parent
20d0ca90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkPolarAxesActor.cxx
View file @
76ee23c7
...
...
@@ -109,7 +109,7 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
this
->
Pole
[
2
]
=
VTK_DOUBLE_MAX
;
// Default number of polar axes
this
->
NumberOfRadialAxes
=
VTK_
DEFAULT
_NUMBER_OF_RADIAL_AXES
;
this
->
NumberOfRadialAxes
=
VTK_
MAXIMUM
_NUMBER_OF_RADIAL_AXES
;
// Default maximum polar radius
this
->
MaximumRadius
=
VTK_DOUBLE_MAX
;
...
...
@@ -145,8 +145,8 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
this
->
PolarAxisLabelTextProperty
->
SetFontFamilyToArial
();
// Create and set radial axes
this
->
RadialAxes
=
new
vtkAxisActor
*
[
VTK_
DEFAULT
_NUMBER_OF_RADIAL_AXES
];
for
(
int
i
=
0
;
i
<
VTK_
DEFAULT
_NUMBER_OF_RADIAL_AXES
;
++
i
)
this
->
RadialAxes
=
new
vtkAxisActor
*
[
VTK_
MAXIMUM
_NUMBER_OF_RADIAL_AXES
];
for
(
int
i
=
0
;
i
<
VTK_
MAXIMUM
_NUMBER_OF_RADIAL_AXES
;
++
i
)
{
// Create axis of type X
this
->
RadialAxes
[
i
]
=
vtkAxisActor
::
New
();
...
...
@@ -231,7 +231,7 @@ vtkPolarAxesActor::~vtkPolarAxesActor()
if
(
this
->
RadialAxes
)
{
for
(
int
i
=
0
;
i
<
VTK_
DEFAULT
_NUMBER_OF_RADIAL_AXES
;
++
i
)
for
(
int
i
=
0
;
i
<
VTK_
MAXIMUM
_NUMBER_OF_RADIAL_AXES
;
++
i
)
{
if
(
this
->
RadialAxes
[
i
]
)
{
...
...
Hybrid/vtkPolarAxesActor.h
View file @
76ee23c7
...
...
@@ -32,7 +32,8 @@ All rights reserve
#ifndef __vtkPolarAxesActor_h
#define __vtkPolarAxesActor_h
#define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 100
#define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50
#define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5
#define VTK_DEFAULT_MAXIMUM_POLAR_ANGLE 90.0
#include
"vtkActor.h"
...
...
@@ -66,7 +67,7 @@ public:
// Description:
// Gets/Sets the number of radial axes
// Default: VTK_DEFAULT_NUMBER_OF_RADIAL_AXES
vtkSetMacro
(
NumberOfRadialAxes
,
vtkIdType
);
vtkSet
Clamp
Macro
(
NumberOfRadialAxes
,
vtkIdType
,
2
,
VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES
);
vtkGetMacro
(
NumberOfRadialAxes
,
vtkIdType
);
// Description:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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