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
f00d05b6
Commit
f00d05b6
authored
Dec 03, 2011
by
Philippe Pébay
Browse files
Make sure that bounds are recalculated when pole is modified
Change-Id: If38cfd11f68a70f277d1bc55daed0fa9b2207e67
parent
a0d9dbb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Examples/Hybrid/Python/CylinderAndPolarAxes.py
View file @
f00d05b6
...
...
@@ -73,5 +73,4 @@ interactor.SetRenderWindow( window )
# Start interaction
window
.
Render
()
interactor
.
Start
()
Hybrid/vtkPolarAxesActor.cxx
View file @
f00d05b6
...
...
@@ -416,7 +416,6 @@ void vtkPolarAxesActor::ReleaseGraphicsResources( vtkWindow *win )
this
->
RadialAxes
[
i
]
->
ReleaseGraphicsResources
(
win
);
}
this
->
PolarArcsActor
->
ReleaseGraphicsResources
(
win
);
}
//-----------------------------------------------------------------------------
...
...
@@ -524,6 +523,9 @@ void vtkPolarAxesActor::CalculateBounds()
this
->
Bounds
[
4
]
=
this
->
Pole
[
2
];
// zmax
this
->
Bounds
[
5
]
=
this
->
Pole
[
2
];
// Update modification time of bounds
this
->
BoundsMTime
.
Modified
();
}
//-----------------------------------------------------------------------------
...
...
@@ -557,7 +559,7 @@ double *vtkPolarAxesActor::GetBounds()
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
BuildAxes
(
vtkViewport
*
viewport
)
{
if
(
(
this
->
GetMTime
()
<
this
->
BuildTime
.
GetMTime
()
))
if
(
(
this
->
GetMTime
()
<
this
->
BuildTime
.
GetMTime
()
)
)
{
this
->
AutoScale
(
viewport
);
return
;
...
...
@@ -922,6 +924,30 @@ void vtkPolarAxesActor::AutoScale( vtkViewport *viewport )
}
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
SetPole
(
double
p
[
3
]
)
{
this
->
Pole
[
0
]
=
p
[
0
];
this
->
Pole
[
1
]
=
p
[
1
];
this
->
Pole
[
2
]
=
p
[
2
];
// Update bounds
this
->
CalculateBounds
();
this
->
Modified
();
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
SetPole
(
double
x
,
double
y
,
double
z
)
{
this
->
Pole
[
0
]
=
x
;
this
->
Pole
[
1
]
=
y
;
this
->
Pole
[
2
]
=
z
;
// Update bounds
this
->
CalculateBounds
();
this
->
Modified
();
}
//-----------------------------------------------------------------------------
void
vtkPolarAxesActor
::
SetPolarAxisProperty
(
vtkProperty
*
prop
)
{
...
...
Hybrid/vtkPolarAxesActor.h
View file @
f00d05b6
...
...
@@ -64,8 +64,8 @@ public:
// Description:
// Explicitly specify the coordinate of the pole.
// The default coordinates are (0,0,0).
v
tkSetVector3Macro
(
Po
le
,
double
);
virtual
void
SetPole
(
double
[
3
]
);
v
irtual
void
SetPole
(
double
,
doub
le
,
double
);
vtkGetVector3Macro
(
Pole
,
double
);
// Description:
...
...
@@ -288,6 +288,7 @@ protected:
// Description:
// Coordinates of the pole
// Default: (0,0,0).
double
Pole
[
3
];
// Description:
...
...
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