OrthographicView.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef ORTHOGRAPHICVIEW_H
00011 #define ORTHOGRAPHICVIEW_H
00012 
00013 #include "LocationType.h"
00014 #include "View.h"
00015 
00016 /**
00017  *  A two-dimensional orthogonal view.
00018  *
00019  *  The orthographic view uses an orthonogal projection to draw its contents in two
00020  *  dimensions.  The data can be stretched or skewed to fit a desired display area.
00021  *  The aspect ratio of the data is not preserved by default, but can be made to do
00022  *  so by calling lockAspectRatio().
00023  *
00024  *  This subclass of Subject will notify upon the following conditions:
00025  *  - The view is resized, panned, or zoomed.
00026  *  - Everything else documented in View.
00027  *
00028  *  @see     View, PerspectiveView
00029  */
00030 class OrthographicView : public View
00031 {
00032 public:
00033    using View::getPixelSize;
00034 
00035    /**
00036     *  Emitted when the viewable area changes.
00037     */
00038    SIGNAL_METHOD(OrthographicView, DisplayAreaChanged)
00039 
00040    /**
00041     *  Locks the aspect ratio of the view.
00042     *
00043     *  This method toggles a lock of the view aspect ratio.  When locked, the
00044     *  values in the X dimension are displayed equally to the values in the Y
00045     *  dimension.  No distortion will occur when the viewport is resized.
00046     *
00047     *  @param   bLock
00048     *           Set this value to TRUE to lock the aspect ratio.  Set this value
00049     *           to FALSE to allow the view extents adjust freely with the view
00050     *           size.
00051     */
00052    virtual void lockAspectRatio(bool bLock) = 0;
00053 
00054    /**
00055     *  Queries whether the aspect ratio of the view is locked.
00056     *
00057     *  @return  TRUE if the aspect ratio is locked, otherwise FALSE.
00058     *
00059     *  @see     lockAspectRatio()
00060     */
00061    virtual bool isAspectRatioLocked() const = 0;
00062 
00063    /**
00064     *  Returns the number of screen pixels that covers one data pixel.
00065     *
00066     *  @return  The number of screen pixels covering one data pixel.  The
00067     *           x-value of the LocationType represents the ratio of screen
00068     *           pixels to data pixels in the x-dimension, and the y-value of
00069     *           the LocationType represents the ratio of screen pixels to data
00070     *           pixels in the y-dimension.
00071     */
00072    virtual LocationType getPixelSize() const = 0;
00073 
00074 protected:
00075    /**
00076     * This should be destroyed by calling DesktopServices::deleteView.
00077     */
00078    virtual ~OrthographicView() {}
00079 };
00080 
00081 #endif

Software Development Kit - Opticks 4.9.0 Build 16218