PerspectiveView Class Reference

A three-dimensional perspective view. More...

#include <PerspectiveView.h>

Inheritance diagram for PerspectiveView:

Inheritance graph

List of all members.

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 ()


Detailed Description

A three-dimensional perspective view.

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:

See also:
View, OrthographicView

Definition at line 33 of file PerspectiveView.h.


Constructor & Destructor Documentation

virtual PerspectiveView::~PerspectiveView (  )  [protected, virtual]

This should be destroyed by calling DesktopServices::deleteView.

Definition at line 380 of file PerspectiveView.h.


Member Function Documentation

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

Returns:
the current value for this setting.

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

Returns:
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

Parameters:
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

Returns:
the key used for this setting.

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]

Emitted when the viewable area changes.

Definition at line 94 of file PerspectiveView.h.

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.

Parameters:
dPercent The percentage by which the zoom level is adjusted.
See also:
zoomTo()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

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.

Parameters:
dPercent The percentage to which the zoom level is set.
See also:
zoomBy()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

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.

Parameters:
worldCoord The pixel coordinate about which zoom action is centered.
dPercent The percentage to which the zoom level is set.
See also:
zoomToPoint()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

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.

Parameters:
worldCoord The pixel coordinate for the new view center.
dPercent The percentage to which the zoom level is set.
See also:
zoomAboutPoint()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

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.

Parameters:
dPercent The percentage to which the zoom level is set.
See also:
zoomToPoint()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

virtual double PerspectiveView::getZoomPercentage (  )  const [pure virtual]

Returns the current zoom level as a percentage.

Returns:
The current zoom percentage. The percentage is the relationship between screen pixel and scene pixel. A 100% zoom indicates one scene pixel is displayed in one screen pixel.

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.

Parameters:
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.
See also:
rotateTo()
Subject Notifications:
This method will notify signalRotationChanged with any<double>.

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.

Parameters:
dDegrees The angle in degrees to which the view should be rotated. The value must be between 0.0 and 360.0 degrees.
See also:
rotateBy()
Subject Notifications:
This method will notify signalRotationChanged with any<double>.

virtual double PerspectiveView::getRotation (  )  const [pure virtual]

Returns the current rotation angle.

Returns:
The angle in degrees by which the view is rotated, ranging from 0.0 to 360.0 degrees.
See also:
rotateTo()

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.

Parameters:
dDegrees The angle in degrees by which the view should be flipped. The value must be between -360.0 and 360.0 degrees.
See also:
flipTo(), flipHorizontal(), flipVertical()
Subject Notifications:
This method will notify signalPitchChanged with any<double>.

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.

Parameters:
dDegrees The angle in degrees to which the view should be flipped. The value must be between 0.0 and 360.0 degrees.
Subject Notifications:
This method will notify signalPitchChanged with any<double>.
See also:
flipBy(), flipHorizontal(), flipVertical()

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.

See also:
flipVertical(), flipTo(), flipBy()
Subject Notifications:
This method will notify signalPitchChanged with any<double> and signalRotationChanged with any<double>.

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.

See also:
flipHorizontal(), flipTo(), flipBy()
Subject Notifications:
This method will notify signalPitchChanged with any<double>.

virtual double PerspectiveView::getPitch (  )  const [pure virtual]

Returns the current pitch angle.

Returns:
The angle in degrees by which the view is pitched, ranging from 0.0 to 360.0 degrees.
See also:
flipTo()

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.

See also:
reset()
Subject Notifications:
This method will notify signalZoomChanged with any<double>.

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.

See also:
reset()
Subject Notifications:
This method will notify Subject::signalModified.

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.

See also:
zoomExtents(), resetOrientation()
Subject Notifications:
This method will notify Subject::signalModified.

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.

Returns:
The ratio of x as compared to y.

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.

Parameters:
aspect The ratio of x as compared to y.


Software Development Kit - Opticks 4.9.0 Build 16218