3 #ifndef SZA_UTIL_CONFIGPLOTTER_H
4 #define SZA_UTIL_CONFIGPLOTTER_H
26 FILL_CROSS_HATCHED = 4,
38 Circle(
double x,
double y,
double r) {
44 friend std::ostream& operator<<(std::ostream& os,
Circle& c);
57 Rectangle(
double xCenter,
double yCenter,
double xWidth,
double yWidth) {
64 friend std::ostream& operator<<(std::ostream& os,
Rectangle& r);
70 return x_ - xWidth_/2;
74 return x_ + xWidth_/2;
78 return y_ + yWidth_/2;
82 return y_ - yWidth_/2;
99 virtual ~ConfigPlotter();
101 void plotConfiguration(std::vector<CarmaConfig::PadLocation>& pads);
103 void openDevice(std::string device);
107 void setFixedLimits(
double xmin,
double xmax,
double ymin,
double ymax);
109 void useFixedLimits(
bool use);
111 CarmaConfig::PadLocation mark(std::vector<CarmaConfig::PadLocation>& pads,
116 void getLabelLocation(CarmaConfig::PadLocation& pad, std::vector<CarmaConfig::PadLocation>& pads, std::string label,
117 double& x,
double& y,
double& xNear,
double& yNear, std::vector<Rectangle>& labels,
double thetaDeg=400);
119 void getCoords(
double theta,
double xCurr,
double yCurr,
double antRadius,
double strHalfWidth,
double strHalfHeight,
120 double& xCenter,
double& yCenter,
double& xNear,
double& yNear);
122 void useLabels(
bool label);
123 void overplot(
bool doOverplot);
124 void useFillFlags(
bool use);
125 void setFillStyle(FillStyle style);
126 void setFillFlags(std::vector<bool> fillFlags);
127 void setAz(std::vector<Angle> az);
128 void setEl(std::vector<Angle> el);
132 FillStyle fillStyle_;
138 double fixXmin_, fixXmax_;
139 double fixYmin_, fixYmax_;
141 double currXmin_, currXmax_;
142 double currYmin_, currYmax_;
144 std::vector<double> xMarks_, yMarks_;
147 std::vector<bool> fillFlags_;
148 std::vector<Angle> az_;
149 std::vector<Angle> el_;
151 void getPlotLimits(std::vector<CarmaConfig::PadLocation>& pads,
152 double& xmin,
double& xmax,
double& ymin,
double& ymax,
155 int getColor(CarmaConfig::PadLocation& pad);
156 int getLineStyle(CarmaConfig::PadLocation& pad);
158 bool rectangleOverlapsCircle(
double xCenterRect,
double yCenterRect,
double rectWidth,
double rectHeight,
159 double xCenterCircle,
double yCenterCircle,
double circleRadius);
171 #endif // End #ifndef SZA_UTIL_CONFIGPLOTTER_H
Tagged: Thu Aug 28 15:18:31 PDT 2008.
......................................................................
......................................................................