vtkPVServerOptionsInternals.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVServerOptionsInternals.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef vtkPVServerOptionsInternals_h
17 #define vtkPVServerOptionsInternals_h
18 
19 #include <string>
20 #include <vector>
21 
23 {
24 public:
25  // The MachineInformation struct is used
26  // to store information about each machine.
27  // These are stored in a vector one for each node in the process.
29  {
30  public:
32  {
33  for (int i = 0; i < 3; ++i)
34  {
35  this->LowerLeft[i] = 0.0;
36  this->LowerRight[i] = 0.0;
37  this->UpperRight[i] = 0.0;
38  }
39  this->Geometry[0] = 0;
40  this->Geometry[1] = 0;
41  this->Geometry[2] = 0;
42  this->Geometry[3] = 0;
43  this->FullScreen = false;
44  this->ShowBorders = false;
45  this->CaveBoundsSet = 0;
46  this->StereoType = -1;
47  }
48 
49  std::string Name; // what is the name of the machine
50  std::string Environment; // what environment variables should be set
51  int Geometry[4]; // x, y, width, height
52  bool FullScreen; // Start fullscreen, ignoring Geometry.
53  bool ShowBorders; // Show window decorations
54 
55  // if StereoType is specified, it overrides the settings provided on the
56  // command line. -1 is not defined. 0 is no stereo. Values are in
57  // vtkRenderWindow.h (VTK_STEREO_*).
59 
60  int CaveBoundsSet; // have the cave bounds been set
61  // store the cave bounds all 0.0 if not set
62  double LowerLeft[3];
63  double LowerRight[3];
64  double UpperRight[3];
65  };
66 
67  void PrintSelf(ostream& os, vtkIndent indent)
68  {
69  os << indent << "Eye Separation: " << this->EyeSeparation << "\n";
70  os << indent << "Machine Information :\n";
71  vtkIndent ind = indent.GetNextIndent();
72  for (unsigned int i = 0; i < this->MachineInformationVector.size(); ++i)
73  {
75  os << ind << "Node: " << i << "\n";
76  vtkIndent ind2 = ind.GetNextIndent();
77  os << ind2 << "Name: " << minfo.Name.c_str() << "\n";
78  os << ind2 << "Environment: " << minfo.Environment.c_str() << "\n";
79  os << ind2 << "Geometry: ";
80  for (int j = 0; j < 4; ++j)
81  {
82  os << minfo.Geometry[j] << (j < 4 ? " " : "\n");
83  }
84  os << ind2 << "FullScreen: " << minfo.FullScreen << "\n";
85  os << ind2 << "ShowBorders: " << minfo.ShowBorders << "\n";
86  os << ind2 << "StereoType: " << minfo.StereoType << "\n";
87  if (minfo.CaveBoundsSet)
88  {
89  int j;
90  os << ind2 << "LowerLeft: ";
91  for (j = 0; j < 3; ++j)
92  {
93  os << minfo.LowerLeft[j] << " ";
94  }
95  os << "\n" << ind2 << "LowerRight: ";
96  for (j = 0; j < 3; ++j)
97  {
98  os << minfo.LowerRight[j] << " ";
99  }
100  os << "\n" << ind2 << "UpperRight: ";
101  for (j = 0; j < 3; ++j)
102  {
103  os << minfo.UpperRight[j] << " ";
104  }
105  os << "\n";
106  }
107  else
108  {
109  os << ind2 << "No Cave Options\n";
110  }
111  }
112  }
113 
114  std::vector<MachineInformation> MachineInformationVector; // store the vector of machines
115  double EyeSeparation; // Store Eye Separation information required for VR module
116 
118  : EyeSeparation(0.06)
119  {
120  }
121 };
122 
123 #endif
124 
125 // VTK-HeaderTest-Exclude: vtkPVServerOptionsInternals.h
std::vector< MachineInformation > MachineInformationVector
void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent GetNextIndent()