Commit 0e39eefc authored by Aashish Chaudhary's avatar Aashish Chaudhary
Browse files

Test improvements, exposed screen size option

Change-Id: Iafc70740edfa891473fb6a83e49b69ca6f59c005
parent 7da09a42
......@@ -55,6 +55,7 @@ int TestCubeAxes3( int argc, char * argv [] )
vtkNew<vtkLODActor> foheActor;
foheActor->SetMapper(foheMapper.GetPointer());
foheActor->GetProperty()->SetDiffuseColor(0.7, 0.3, 0.0);
vtkNew<vtkOutlineFilter> outline;
outline->SetInputConnection(normals->GetOutputPort());
......@@ -67,10 +68,9 @@ int TestCubeAxes3( int argc, char * argv [] )
outlineActor->GetProperty()->SetColor(0.0 ,0.0 ,0.0);
vtkNew<vtkCamera> camera;
camera->SetClippingRange(1.60187, 20.0842);
camera->SetFocalPoint(0.21406, 1.5, 0.0);
camera->SetPosition(11.63, 6.32, 5.77);
camera->SetViewUp(0.180325, 0.549245, -0.815974);
camera->SetClippingRange(1.0, 100.0);
camera->SetFocalPoint(0.9, 1.0, 0.0);
camera->SetPosition(11.63, 6.0, 10.77);
vtkNew<vtkLight> light;
light->SetFocalPoint(0.21406, 1.5, 0.0);
......@@ -104,10 +104,7 @@ int TestCubeAxes3( int argc, char * argv [] )
axes2->SetYLabelFormat("%6.1f");
axes2->SetZLabelFormat("%6.1f");
axes2->SetFlyModeToClosestTriad();
axes2->DrawXGridlinesOn();
axes2->DrawYGridlinesOn();
axes2->DrawZGridlinesOn();
axes2->SetScreenSize(15.0);
ren2->AddViewProp(axes2.GetPointer());
renWin->Render();
......
......@@ -618,6 +618,8 @@ void vtkCubeAxesActor::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "ZAxisRange: [" << this->ZAxisRange[0] << ", "
<< this->ZAxisRange[1] << "] " << endl;
os << indent << "ScreenSize: (" << this->ScreenSize << ")\n";
if (this->Camera)
{
os << indent << "Camera:\n";
......
......@@ -105,6 +105,13 @@ public:
vtkGetVector2Macro( YAxisRange, double );
vtkGetVector2Macro( ZAxisRange, double );
// Description:
// Explicitly specify the screen size of title and label text.
// ScreenSize detemines the size of the text in terms of screen
// pixels. Default is 10.0.
vtkSetMacro(ScreenSize, double);
vtkGetMacro(ScreenSize, double);
// Description:
// Set/Get the camera to perform scaling and translation of the
// vtkCubeAxesActor.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment