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
d726afdb
Commit
d726afdb
authored
Dec 05, 2011
by
Philippe Pébay
Browse files
Updating LOD for radial axis titles at the right time
Change-Id: I7827fe0a27df10b1802c3cae81e13367636e83ec
parent
08c1db7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkPolarAxesActor.cxx
View file @
d726afdb
...
...
@@ -108,7 +108,6 @@ void vtkPolarAxesActor::PrintSelf( ostream& os, vtkIndent indent )
os
<<
indent
<<
"Radial Title Visibility: "
<<
(
this
->
RadialTitleVisibility
?
"On"
:
"Off"
)
<<
endl
;
os
<<
indent
<<
"Polar Arcs Visibility: "
<<
(
this
->
PolarArcsVisibility
?
"On"
:
"Off"
)
<<
endl
;
}
...
...
@@ -190,9 +189,8 @@ vtkPolarAxesActor::vtkPolarAxesActor() : vtkActor()
this
->
RadialAxesProperty
=
vtkProperty
::
New
();
this
->
RadialAxesProperty
->
SetColor
(
0.
,
0.
,
0.
);
// Create and set radial axes of type X with base offset for followers
double
offset
=
this
->
LabelScreenOffset
+
this
->
ScreenSize
*
0.5
;
this
->
CreateRadialAxes
(
offset
);
// Create and set radial axes of type X
this
->
CreateRadialAxes
();
// Create and set polar arcs and ancillary objects, with default color white
this
->
PolarArcs
=
vtkPolyData
::
New
();
...
...
@@ -630,8 +628,9 @@ inline double vtkPolarAxesActor::FSign( double value, double sign )
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
CreateRadialAxes
(
double
offset
)
void
vtkPolarAxesActor
::
CreateRadialAxes
()
{
// Create requested number of radial axes
this
->
RadialAxes
=
new
vtkAxisActor
*
[
this
->
NumberOfRadialAxes
];
for
(
int
i
=
0
;
i
<
this
->
NumberOfRadialAxes
;
++
i
)
{
...
...
@@ -642,20 +641,16 @@ void vtkPolarAxesActor::CreateRadialAxes( double offset )
axis
->
SetAxisPositionToMinMax
();
axis
->
SetCalculateTitleOffset
(
0
);
axis
->
SetCalculateLabelOffset
(
0
);
// Set radial axis title follower
axis
->
GetTitleActor
()
->
SetAxis
(
axis
);
axis
->
GetTitleActor
()
->
SetScreenOffset
(
.67
*
offset
);
axis
->
GetTitleActor
()
->
SetEnableDistanceLOD
(
this
->
EnableDistanceLOD
);
axis
->
GetTitleActor
()
->
SetDistanceLODThreshold
(
this
->
DistanceLODThreshold
);
axis
->
GetTitleActor
()
->
SetEnableViewAngleLOD
(
this
->
EnableViewAngleLOD
);
axis
->
GetTitleActor
()
->
SetViewAngleLODThreshold
(
this
->
ViewAngleLODThreshold
);
}
// for ( int i = 0; i < this->NumberOfRadialAxes; ++ i )
}
cerr
<<
this
->
RadialAxes
[
0
]
->
GetTitleActor
()
->
GetDistanceLODThreshold
()
<<
endl
;
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
BuildRadialAxes
()
{
// Base offset for radial axis title followers
double
offset
=
.67
*
(
this
->
LabelScreenOffset
+
this
->
ScreenSize
*
0.5
);
// Create requested number of radial axes
double
dAlpha
=
(
this
->
MaximumAngle
-
this
->
MinimumAngle
)
/
(
this
->
NumberOfRadialAxes
-
1.
);
...
...
@@ -701,7 +696,13 @@ void vtkPolarAxesActor::BuildRadialAxes()
<<
(
this
->
RadialUnits
?
" deg"
:
""
);
axis
->
SetTitle
(
title
.
str
().
c_str
()
);
// Update axis title follower
// Update axis title followers
axis
->
GetTitleActor
()
->
SetAxis
(
axis
);
axis
->
GetTitleActor
()
->
SetScreenOffset
(
offset
);
axis
->
GetTitleActor
()
->
SetEnableDistanceLOD
(
this
->
EnableDistanceLOD
);
axis
->
GetTitleActor
()
->
SetDistanceLODThreshold
(
this
->
DistanceLODThreshold
);
axis
->
GetTitleActor
()
->
SetEnableViewAngleLOD
(
this
->
EnableViewAngleLOD
);
axis
->
GetTitleActor
()
->
SetViewAngleLODThreshold
(
this
->
ViewAngleLODThreshold
);
}
// No labels nor ticks for radial axes
...
...
@@ -985,8 +986,7 @@ void vtkPolarAxesActor::SetNumberOfRadialAxes( vtkIdType n )
// Create and set n radial axes of type X
this
->
NumberOfRadialAxes
=
n
;
double
offset
=
this
->
LabelScreenOffset
+
this
->
ScreenSize
*
0.5
;
this
->
CreateRadialAxes
(
offset
);
this
->
CreateRadialAxes
();
this
->
Modified
();
}
...
...
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