#include <PerspectiveView.h>

Public Member Functions | |
| virtual void | zoomBy (double dPercent)=0 |
| virtual void | zoomTo (double dPercent)=0 |
| virtual void | zoomAboutPoint (const LocationType &worldCoord, double dPercent)=0 |
| virtual void | zoomToPoint (const LocationType &worldCoord, double dPercent)=0 |
| virtual void | zoomToCenter (double dPercent)=0 |
| virtual double | getZoomPercentage () const =0 |
| virtual void | rotateBy (double dDegrees)=0 |
| virtual void | rotateTo (double dDegrees)=0 |
| virtual double | getRotation () const =0 |
| virtual void | flipBy (double dDegrees)=0 |
| virtual void | flipTo (double dDegrees)=0 |
| virtual void | flipHorizontal ()=0 |
| virtual void | flipVertical ()=0 |
| virtual double | getPitch () const =0 |
| virtual void | resetZoom ()=0 |
| virtual void | resetOrientation ()=0 |
| virtual void | reset ()=0 |
| virtual void | toggleShowCoordinates ()=0 |
| virtual double | getPixelAspect () const =0 |
| virtual void | setPixelAspect (double aspect)=0 |
Static Public Member Functions | |
| static unsigned int | getSettingZoomPercentage () |
| static bool | hasSettingZoomPercentage () |
| static void | setSettingZoomPercentage (unsigned int newValue, bool setIfSame=false) |
| static std::string | getSettingZoomPercentageKey () |
| static const std::string & | signalZoomChanged () |
| static const std::string & | signalRotationChanged () |
| static const std::string & | signalPitchChanged () |
| static const std::string & | signalDisplayAreaChanged () |
Protected Member Functions | |
| virtual | ~PerspectiveView () |
The perspective view uses a perspective projection to draw its contents in three dimensions. The data can be zoomed, panned, and rotated in several different fashions. The reset() and resetOrientation() functions return the view to its original display state. The aspect ratio is preserved in all dimensions regardless of the display configuration.
This subclass of Subject will notify upon the following conditions:
Definition at line 33 of file PerspectiveView.h.
| virtual PerspectiveView::~PerspectiveView | ( | ) | [protected, virtual] |
This should be destroyed by calling DesktopServices::deleteView.
Definition at line 380 of file PerspectiveView.h.
| static unsigned int PerspectiveView::getSettingZoomPercentage | ( | ) | [static] |
Returns the current value for this setting.
If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.
Please see Settings Macros for more details
Definition at line 46 of file PerspectiveView.h.
| static bool PerspectiveView::hasSettingZoomPercentage | ( | ) | [static] |
Returns true if this setting exists and has a value in ConfigurationSettings.
Please see Settings Macros for more details
true if this setting exists, false otherwise. Definition at line 53 of file PerspectiveView.h.
| static void PerspectiveView::setSettingZoomPercentage | ( | unsigned int | newValue, | |
| bool | setIfSame = false | |||
| ) | [static] |
Changes the current value of this setting to the new value.
Please see Settings Macros for more details
| newValue | the new value for this setting. | |
| setIfSame | If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user. |
Definition at line 69 of file PerspectiveView.h.
| static std::string PerspectiveView::getSettingZoomPercentageKey | ( | ) | [static] |
Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().
Please see Settings Macros for more details
Definition at line 77 of file PerspectiveView.h.
| static const std::string& PerspectiveView::signalZoomChanged | ( | ) | [static] |
Emitted with any<double> when the zoom level changes.
Definition at line 82 of file PerspectiveView.h.
| static const std::string& PerspectiveView::signalRotationChanged | ( | ) | [static] |
Emitted with any<double> when the scene rotation changes.
Definition at line 86 of file PerspectiveView.h.
| static const std::string& PerspectiveView::signalPitchChanged | ( | ) | [static] |
Emitted with any<double> when the scene pitch angle changes.
Definition at line 90 of file PerspectiveView.h.
| static const std::string& PerspectiveView::signalDisplayAreaChanged | ( | ) | [static] |
| virtual void PerspectiveView::zoomBy | ( | double | dPercent | ) | [pure virtual] |
Adjusts the current zoom level by a given percentage.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dPercent | The percentage by which the zoom level is adjusted. |
| virtual void PerspectiveView::zoomTo | ( | double | dPercent | ) | [pure virtual] |
Sets the current zoom level to a given percentage.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dPercent | The percentage to which the zoom level is set. |
| virtual void PerspectiveView::zoomAboutPoint | ( | const LocationType & | worldCoord, | |
| double | dPercent | |||
| ) | [pure virtual] |
Sets the current zoom level to a given percentage centered on a given point.
This method sets the view zoom level based on a given point. The view is panned to center the point, the zoom level is set, and the view is panned back to the given point. To not pan back to the given point, call zoomToPoint() instead.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| worldCoord | The pixel coordinate about which zoom action is centered. | |
| dPercent | The percentage to which the zoom level is set. |
| virtual void PerspectiveView::zoomToPoint | ( | const LocationType & | worldCoord, | |
| double | dPercent | |||
| ) | [pure virtual] |
Sets the current zoom level and pans to a given point.
This method sets the view zoom level based on a given point. The view is panned to center the point and the zoom level is set.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| worldCoord | The pixel coordinate for the new view center. | |
| dPercent | The percentage to which the zoom level is set. |
| virtual void PerspectiveView::zoomToCenter | ( | double | dPercent | ) | [pure virtual] |
Sets the current zoom level and pans to the center of the image.
This method first centers the image in the view and then zooms to the given percentage. This is equivalent to calling panToCenter() and then zoomTo().
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dPercent | The percentage to which the zoom level is set. |
| virtual double PerspectiveView::getZoomPercentage | ( | ) | const [pure virtual] |
Returns the current zoom level as a percentage.
| virtual void PerspectiveView::rotateBy | ( | double | dDegrees | ) | [pure virtual] |
Rotates the image from its current position by a given angle.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dDegrees | The angle in degrees by which the view should be rotated. The value must be between -360.0 and 360.0 degrees. A positive value indicates a counterclockwise rotation. |
| virtual void PerspectiveView::rotateTo | ( | double | dDegrees | ) | [pure virtual] |
Rotates the image to a given angle.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dDegrees | The angle in degrees to which the view should be rotated. The value must be between 0.0 and 360.0 degrees. |
| virtual double PerspectiveView::getRotation | ( | ) | const [pure virtual] |
Returns the current rotation angle.
| virtual void PerspectiveView::flipBy | ( | double | dDegrees | ) | [pure virtual] |
Flips the image from its current position by a given angle.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dDegrees | The angle in degrees by which the view should be flipped. The value must be between -360.0 and 360.0 degrees. |
| virtual void PerspectiveView::flipTo | ( | double | dDegrees | ) | [pure virtual] |
Flips the image to a given angle.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| dDegrees | The angle in degrees to which the view should be flipped. The value must be between 0.0 and 360.0 degrees. |
| virtual void PerspectiveView::flipHorizontal | ( | ) | [pure virtual] |
Flips the image across the horizontal axis.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| virtual void PerspectiveView::flipVertical | ( | ) | [pure virtual] |
Flips the image across the vertical axis.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| virtual double PerspectiveView::getPitch | ( | ) | const [pure virtual] |
Returns the current pitch angle.
| virtual void PerspectiveView::resetZoom | ( | ) | [pure virtual] |
Resets the zoom level to the user-defined default value.
This method adjusts the zoom level based on the getSettingZoomPercentage() value. If the default zoom percentage is zero, zoomExtents() is called. Otherwise, zoomTo() is called and the data origin is aligned to the corner of the view.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| virtual void PerspectiveView::resetOrientation | ( | ) | [pure virtual] |
Resets the image rotatation and flip angles.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| virtual void PerspectiveView::reset | ( | ) | [pure virtual] |
Resets the image zoom and rotation.
This method zooms the image to the data extents and resets the rotation and flip angles to 0.0.
This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.
| virtual void PerspectiveView::toggleShowCoordinates | ( | ) | [pure virtual] |
Toggles whether to show pixel coordinates or pixel values when sufficiently zoomed.
| virtual double PerspectiveView::getPixelAspect | ( | ) | const [pure virtual] |
Gets the pixel aspect ratio.
Values greater than 1 will cause a stretch in the x direction, values less than 1 will cause a stretch in the y direction.
| virtual void PerspectiveView::setPixelAspect | ( | double | aspect | ) | [pure virtual] |
Sets the pixel aspect ratio.
Values greater than 1 will cause a stretch in the x direction, values less than 1 will cause a stretch in the y direction.
| aspect | The ratio of x as compared to y. |