00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #ifndef LTI_SCENE_H
00014 #define LTI_SCENE_H
00015
00016
00017 #include "lti_types.h"
00018 #include "lti_geometry.h"
00019
00020 LT_BEGIN_NAMESPACE(LizardTech)
00021
00022
00023
00064 class LTIScene
00065 {
00066 public:
00078 LTIScene(double ulX, double ulY,
00079 double width, double height,
00080 double magnification);
00081
00085 LTIScene(const LTIScene& copy);
00086
00093 LTIScene(void);
00094
00095 LTIScene(const LTIGeomIntRect &rect, double magnification);
00096 LTIGeomIntRect getRect(void) const;
00097
00101 LTIScene& operator=(const LTIScene&);
00102
00106 bool operator==(const LTIScene&) const;
00107
00111 bool operator!=(const LTIScene&) const;
00112
00113
00121 double getMag() const;
00122
00123
00128
00136 double getUpperLeftX() const;
00137
00145 double getUpperLeftY() const;
00146
00154 double getLowerRightX() const;
00155
00163 double getLowerRightY() const;
00164
00172 double getUpperRightX() const;
00173
00181 double getUpperRightY() const;
00182
00190 double getLowerLeftX() const;
00191
00199 double getLowerLeftY() const;
00200
00208 double getCenterX() const;
00209
00217 double getCenterY() const;
00218
00230
00238 lt_int32 getUpperLeftCol() const;
00239
00247 lt_int32 getUpperLeftRow() const;
00248
00256 lt_int32 getLowerRightCol() const;
00257
00265 lt_int32 getLowerRightRow() const;
00266
00274 lt_int32 getUpperRightCol() const;
00275
00283 lt_int32 getUpperRightRow() const;
00284
00292 lt_int32 getLowerLeftCol() const;
00293
00301 lt_int32 getLowerLeftRow() const;
00302
00310 lt_int32 getCenterCol() const;
00311
00319 lt_int32 getCenterRow() const;
00320
00329
00337 double getWidth() const;
00338
00346 double getHeight() const;
00347
00355 lt_int32 getNumCols() const;
00356
00364 lt_int32 getNumRows() const;
00365
00374
00383 double getX() const;
00384
00393 double getY() const;
00394
00406 void getPoints(double& ulX, double& ulY,
00407 double& lrX, double& lrY) const;
00408
00426 void getPoints(double& ulX, double& ulY,
00427 double& urX, double& urY,
00428 double& llX, double& llY,
00429 double& lrX, double& lrY,
00430 double& cX, double& cY) const;
00431
00443 void getPoints(lt_int32& ulX, lt_int32& ulY,
00444 lt_int32& lrX, lt_int32& lrY) const;
00445
00463 void getPoints(lt_int32& ulX, lt_int32& ulY,
00464 lt_int32& urX, lt_int32& urY,
00465 lt_int32& llX, lt_int32& llY,
00466 lt_int32& lrX, lt_int32& lrY,
00467 lt_int32& cX, lt_int32& cY) const;
00476 LTIScene clip(double width, double height) const;
00477
00478
00479
00480
00481
00482 protected:
00483 double m_ulX, m_ulY;
00484 double m_width, m_height;
00485 double m_magnification;
00486
00487 private:
00488 lt_int32 getHalfWidth_i() const;
00489 lt_int32 getHalfHeight_i() const;
00490 };
00491
00492
00493 LT_END_NAMESPACE(LizardTech)
00494
00495
00496 #endif // LTI_SCENE_H