00001 #ifndef FCAM_LENS_H
00002 #define FCAM_LENS_H
00003
00006
00007 #include "Device.h"
00008 #include "Action.h"
00009
00010 namespace FCam {
00011
00014 class Lens : public Device {
00015 public:
00016
00037 virtual void setFocus(float, float speed = -1) = 0;
00038
00040 virtual float getFocus() = 0;
00041
00043 virtual float farFocus() = 0;
00044
00046 virtual float nearFocus() = 0;
00047
00049 virtual bool focusChanging() = 0;
00050
00053 virtual int focusLatency() = 0;
00054
00056 virtual float minFocusSpeed() = 0;
00057
00059 virtual float maxFocusSpeed() = 0;
00061
00072 virtual void setZoom(float, float speed = -1) = 0;
00073
00075 virtual float getZoom() = 0;
00076
00078 virtual float minZoom() = 0;
00079
00081 virtual float maxZoom() = 0;
00082
00084 virtual bool zoomChanging() = 0;
00085
00088 virtual int zoomLatency() = 0;
00089
00091 virtual float minZoomSpeed() = 0;
00092
00094 virtual float maxZoomSpeed() = 0;
00095
00111 virtual void setAperture(float, float speed = -1) = 0;
00112
00114 virtual float getAperture() = 0;
00115
00119 virtual float wideAperture(float zoom) = 0;
00120
00124 virtual float narrowAperture(float zoom) = 0;
00125
00127 virtual bool apertureChanging() = 0;
00128
00130 virtual int apertureLatency() = 0;
00131
00135 virtual float minApertureSpeed() = 0;
00136
00140 virtual float maxApertureSpeed() = 0;
00142
00145 class FocusAction : public CopyableAction<FocusAction> {
00146 public:
00148 FocusAction(Lens *);
00149
00153 FocusAction(Lens *, int, float);
00154
00159 FocusAction(Lens *, int, float, float);
00160
00162 float focus;
00163
00165 float speed;
00166
00167 void doAction();
00168 private:
00169 Lens *lens;
00170 };
00171
00174 class ZoomAction : public CopyableAction<ZoomAction> {
00176 ZoomAction(Lens *);
00177
00181 ZoomAction(Lens *, int, float);
00182
00187 ZoomAction(Lens *, int, float, float);
00188
00190 float zoom;
00191
00193 float speed;
00194
00195 void doAction();
00196 private:
00197 Lens *lens;
00198 };
00199
00202 class ApertureAction : public CopyableAction<ApertureAction> {
00204 ApertureAction(Lens *);
00205
00209 ApertureAction(Lens *, int, float);
00210
00215 ApertureAction(Lens *, int, float, float);
00216
00218 float aperture;
00219
00221 float speed;
00222
00223 void doAction();
00224 private:
00225 Lens *lens;
00226 };
00227
00228 virtual void tagFrame(Frame *) = 0;
00229
00231 class Tags : public Device::Tags {
00232 public:
00233 ~Tags();
00234
00235 float focus;
00236 float focusSpeed;
00237 float initialFocus;
00238 float finalFocus;
00239
00240 float zoom;
00241 float zoomSpeed;
00242 float initialZoom;
00243 float finalZoom;
00244
00245 float aperture;
00246 float apertureSpeed;
00247 float initialAperture;
00248 float finalAperture;
00249 };
00250 };
00251
00252 }
00253
00254 #endif
00255