Commit 48444ee7 authored by Stéphane Albert's avatar Stéphane Albert

BUG: MANTIS-1244: Added otb::ViewSettings::Reset() function.

parent 4613fb7c
......@@ -53,6 +53,8 @@ public:
itkSetMacro(ViewportSize,SizeType);
itkGetConstReferenceMacro(ViewportSize,SizeType);
void Reset();
void SetRotationCenter(const PointType & center)
{
m_RotationCenter = center;
......
......@@ -37,6 +37,26 @@ ViewSettings::ViewSettings()
ViewSettings::~ViewSettings()
{}
void
ViewSettings
::Reset()
{
m_Origin.Fill( 0 );
m_Spacing.Fill( 1 );
m_ViewportSize.Fill( 0 );
m_Wkt = "";
m_KeywordList = KeywordListType();
m_UseProjection = true;
m_GeometryChanged = false;
m_RotationCenter.Fill( 0 );
m_RotationAngle = 0.0;
}
void ViewSettings::GetViewportExtent(double & ulx, double & uly, double & lrx, double & lry) const
{
ulx = m_Origin[0];
......@@ -177,6 +197,9 @@ ViewSettings
{
SpacingType spacing;
assert( m_ViewportSize[ 0 ]!=0 );
assert( m_ViewportSize[ 1 ]!=0 );
spacing[ 0 ] = ( extent[ 0 ] - origin[ 0 ] ) / m_ViewportSize[ 0 ];
spacing[ 1 ] = ( extent[ 1 ] - origin[ 1 ] ) / m_ViewportSize[ 1 ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment