|
Notes |
|
|
(0029600)
|
|
Sebastien Jourdain
|
|
2012-10-30 13:30
|
|
This issue is related to the bounds reported by CubeAxes which make IceT to crop labels...
commit 907a59e775a94c951c38785821167009ab440cfc
Author: Sebastien Jourdain <sebastien.jourdain@kitware.com>
Date: Tue Oct 30 08:55:54 2012 -0400
Make sure axis label are shown when looking at a 2D plane in 3D
Change-Id: Ie5e06e4f190ff5a354d863d1defd2b821059d04d
[...]
diff --git a/Rendering/Annotation/vtkCubeAxesActor.cxx b/Rendering/Annotation/vtkCubeAxesActor.cxx
index 770d15c..8554c22 100644
--- a/Rendering/Annotation/vtkCubeAxesActor.cxx
+++ b/Rendering/Annotation/vtkCubeAxesActor.cxx
@@ -17,6 +17,7 @@
[...]
+// --------------------------------------------------------------------------
+void vtkCubeAxesActor::GetRenderedBounds(double *b)
+{
+ vtkBoundingBox bbox(this->GetBounds()); // Data bounds
+
+ // Make a heuristic on the final bounds that embed test labels
+ // Just inflate the box based on its max length
+ bbox.Inflate(bbox.GetMaxLength());
+
+ bbox.GetBounds(b);
+}
+++++++++++++++++++
diff --git a/ParaViewCore/VTKExtensions/Rendering/vtkIceTCompositePass.cxx b/ParaViewCore/VTKExtensions/Rendering/vtkIceTCompositePass.cxx
index ed5a409..76016ae 100644
--- a/ParaViewCore/VTKExtensions/Rendering/vtkIceTCompositePass.cxx
+++ b/ParaViewCore/VTKExtensions/Rendering/vtkIceTCompositePass.cxx
@@ -59,11 +59,8 @@ namespace
void MergeCubeAxesBounds(double bounds[6], const vtkRenderState* rState)
{
vtkBoundingBox bbox(bounds);
- // scale the bounds a bit so that when showing a box we don't end up with
- // clipped edges e.g. when a Mandelbrot source was shown with parallel
- // rendering, the front edges would appear clipped in outline mode.
- bbox.Scale(1.1, 1.1, 1.1);
+ // Hande CubeAxes specifically has it wrongly implement the GetBounds()
for (int cc=0; cc < rState->GetPropArrayCount(); cc++)
{
vtkProp* prop = rState->GetPropArray()[cc];
@@ -71,13 +68,11 @@ namespace
if (cubeAxes != NULL && prop->GetVisibility() &&
prop->GetUseBounds())
{
- // cubeAxes has not clean API to give us the bounds it's using. So, we
- // use a heuristic instead. Simply scale the data bounds by 1.5 and we
- // call it 'even'.
- bbox.Scale(1.5, 1.5, 1.5);
- break;
+ // Use custom bounds API for cube axes to embed titles and labels
+ bbox.AddBounds(cubeAxes->GetRenderedBounds());
}
}
+
bbox.GetBounds(bounds);
}
}; |
|
|
|
(0029617)
|
|
Utkarsh Ayachit
|
|
2012-10-31 10:47
|
|
|
merged into master, if applicable. |
|
|
|
(0029636)
|
|
Alan Scott
|
|
2012-10-31 20:09
|
|
This has been fixed. Note that when the plane is very close to edge on that the text still disappears, but that probably makes sense. If this bug still exists, please try to replicate it with sources/ mandlebrot, add a note to this bug how to replicate it, and re-open this bug. See the related bug 13469.
Tested remote server, master, Linux. |
|