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
ec56c582
Commit
ec56c582
authored
Dec 01, 2011
by
Philippe Pébay
Browse files
Fixed bug where axes opposite to major one where drawn sometimes
Change-Id: I8273ff196d8dc722780f27a21d47cb970f979f88
parent
b35f5e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkCubeAxesActor.cxx
View file @
ec56c582
...
...
@@ -1787,7 +1787,7 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
this
->
RenderAxesX
[
0
]
=
0
;
this
->
RenderAxesY
[
0
]
=
0
;
this
->
RenderAxesZ
[
0
]
=
0
;
if
(
this
->
DrawXGridlines
||
this
->
DrawX
Inner
Gridlines
||
this
->
DrawXGridpolys
)
if
(
this
->
DrawXGridlines
)
{
this
->
RenderAxesX
[
1
]
=
2
;
this
->
NumberOfAxesX
=
2
;
...
...
@@ -1800,7 +1800,7 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
{
this
->
NumberOfAxesX
=
1
;
}
if
(
this
->
DrawYGridlines
||
this
->
DrawY
Inner
Gridlines
||
this
->
DrawYGridpolys
)
if
(
this
->
DrawYGridlines
)
{
this
->
RenderAxesY
[
1
]
=
2
;
this
->
NumberOfAxesY
=
2
;
...
...
@@ -1813,7 +1813,7 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
{
this
->
NumberOfAxesY
=
1
;
}
if
(
this
->
DrawZGridlines
||
this
->
DrawZ
Inner
Gridlines
||
this
->
DrawZGridpolys
)
if
(
this
->
DrawZGridlines
)
{
this
->
RenderAxesZ
[
1
]
=
2
;
this
->
NumberOfAxesZ
=
2
;
...
...
@@ -1984,22 +1984,23 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
break
;
}
}
//else boundary edges fly mode
}
//
else boundary edges fly mode
this
->
InertiaLocs
[
0
]
=
xloc
;
this
->
InertiaLocs
[
1
]
=
yloc
;
this
->
InertiaLocs
[
2
]
=
zloc
;
}
//inertia
}
//
inertia
else
{
//
don'
t change anything, use locations from last render
//
Do no
t change anything, use locations from last render
xloc
=
this
->
InertiaLocs
[
0
];
yloc
=
this
->
InertiaLocs
[
1
];
zloc
=
this
->
InertiaLocs
[
2
];
}
// Set axes to be rendered
this
->
RenderAxesX
[
0
]
=
xloc
%
NUMBER_OF_ALIGNED_AXIS
;
if
(
this
->
DrawXGridlines
||
this
->
DrawX
Inner
Gridlines
||
this
->
DrawXGridpolys
)
if
(
this
->
DrawXGridlines
)
{
this
->
RenderAxesX
[
1
]
=
(
xloc
+
2
)
%
NUMBER_OF_ALIGNED_AXIS
;
this
->
NumberOfAxesX
=
2
;
...
...
@@ -2014,7 +2015,7 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
}
this
->
RenderAxesY
[
0
]
=
yloc
%
NUMBER_OF_ALIGNED_AXIS
;
if
(
this
->
DrawYGridlines
||
this
->
DrawY
Inner
Gridlines
||
this
->
DrawYGridpolys
)
if
(
this
->
DrawYGridlines
)
{
this
->
RenderAxesY
[
1
]
=
(
yloc
+
2
)
%
NUMBER_OF_ALIGNED_AXIS
;
this
->
NumberOfAxesY
=
2
;
...
...
@@ -2029,7 +2030,7 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
}
this
->
RenderAxesZ
[
0
]
=
zloc
%
NUMBER_OF_ALIGNED_AXIS
;
if
(
this
->
DrawZGridlines
||
this
->
DrawZ
Inner
Gridlines
||
this
->
DrawZGridpolys
)
if
(
this
->
DrawZGridlines
)
{
this
->
RenderAxesZ
[
1
]
=
(
zloc
+
2
)
%
NUMBER_OF_ALIGNED_AXIS
;
this
->
NumberOfAxesZ
=
2
;
...
...
@@ -2042,9 +2043,8 @@ void vtkCubeAxesActor::DetermineRenderAxes(vtkViewport *viewport)
{
this
->
NumberOfAxesZ
=
1
;
}
//
// Make sure that the primary axis visibility flags are set correctly.
//
this
->
XAxes
[
RenderAxesX
[
0
]]
->
SetLabelVisibility
(
this
->
XAxisLabelVisibility
);
this
->
XAxes
[
RenderAxesX
[
0
]]
->
SetTitleVisibility
(
this
->
XAxisLabelVisibility
);
this
->
XAxes
[
RenderAxesX
[
0
]]
->
SetTickVisibility
(
this
->
XAxisTickVisibility
);
...
...
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