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
VTK
VTK
Commits
b4046e84
Commit
b4046e84
authored
Jul 13, 1995
by
Ken Martin
Browse files
fixed error in Print method and GetBounds when mapper not set
parent
86e29e05
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Actor.cc
View file @
b4046e84
...
...
@@ -283,9 +283,14 @@ float *vtkActor::GetBounds()
float
*
result
;
vtkMatrix4x4
matrix
;
// get the bounds of the Mapper
// get the bounds of the Mapper if we have one
if
(
!
this
->
Mapper
)
{
return
this
->
Bounds
;
}
bounds
=
this
->
Mapper
->
GetBounds
();
// fill out vertices of a bounding box
bbox
[
0
]
=
bounds
[
1
];
bbox
[
1
]
=
bounds
[
3
];
bbox
[
2
]
=
bounds
[
5
];
bbox
[
3
]
=
bounds
[
1
];
bbox
[
4
]
=
bounds
[
2
];
bbox
[
5
]
=
bounds
[
5
];
...
...
@@ -362,11 +367,18 @@ void vtkActor::PrintSelf(ostream& os, vtkIndent indent)
vtkObject
::
PrintSelf
(
os
,
indent
);
// make sure our bounds are up to date
this
->
GetBounds
();
os
<<
indent
<<
"Bounds:
\n
"
;
os
<<
indent
<<
" Xmin,Xmax: ("
<<
this
->
Bounds
[
0
]
<<
", "
<<
this
->
Bounds
[
1
]
<<
")
\n
"
;
os
<<
indent
<<
" Ymin,Ymax: ("
<<
this
->
Bounds
[
2
]
<<
", "
<<
this
->
Bounds
[
3
]
<<
")
\n
"
;
os
<<
indent
<<
" Zmin,Zmax: ("
<<
this
->
Bounds
[
4
]
<<
", "
<<
this
->
Bounds
[
5
]
<<
")
\n
"
;
if
(
this
->
Mapper
)
{
this
->
GetBounds
();
os
<<
indent
<<
"Bounds:
\n
"
;
os
<<
indent
<<
" Xmin,Xmax: ("
<<
this
->
Bounds
[
0
]
<<
", "
<<
this
->
Bounds
[
1
]
<<
")
\n
"
;
os
<<
indent
<<
" Ymin,Ymax: ("
<<
this
->
Bounds
[
2
]
<<
", "
<<
this
->
Bounds
[
3
]
<<
")
\n
"
;
os
<<
indent
<<
" Zmin,Zmax: ("
<<
this
->
Bounds
[
4
]
<<
", "
<<
this
->
Bounds
[
5
]
<<
")
\n
"
;
}
else
{
os
<<
indent
<<
"Bounds: (not defined)
\n
"
;
}
os
<<
indent
<<
"Dragable: "
<<
(
this
->
Dragable
?
"On
\n
"
:
"Off
\n
"
);
if
(
this
->
Mapper
)
...
...
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