Commit af0aabd5 authored by Stéphane Albert's avatar Stéphane Albert
Browse files

WRG: Removed otb::GeoInterface convenience conversion methods to avoid overload masking.

parent c6a60da0
......@@ -49,11 +49,6 @@ public:
/**
* Double precision point-type.
*/
typedef itk::Point< float, 2 > Point2f;
/**
* Single precision point-type.
*/
typedef itk::Point< double, 2 > Point2d;
/**
......@@ -77,23 +72,6 @@ public:
const Point2d & in,
bool isPhysical = true ) const;
/**
* Transform given point from viewport coordinate-system to this
* actor coordinate-system.
*
* By default this method return false. It should be implemented in
* derived classes if needed.
*
* @param out The transformed point (in this actor coordinate-system).
* @param in The given point (in viewport coordinate-system).
* @param isPhysical Indicate physical coordates are desired.
*
* @return true if the operation has succeeded; false otherwise.
*/
virtual bool TransformFromViewport( Point2f & out,
const Point2f & in,
bool isPhysical = true ) const;
/**
* Transform given point from viewport coordinate-system to this
* actor coordinate-system.
......@@ -111,23 +89,6 @@ public:
const Point2d & in,
bool isPhysical = true ) const;
/**
* Transform given point from this actor coordinate-system to
* viewport coordinate-system.
*
* By default this method return false. It should be implemented in
* derived classes if needed.
*
* @param out The transformed point (in viewport coordinate-system).
* @param in The given point (in viewport coordinate-system).
* @param isPhysical Indicate physical coordates are desired.
*
* @return true if the operation has succeeded; false otherwise.
*/
virtual bool TransformToViewport( Point2f & out,
const Point2f & in,
bool isPhysical = true ) const;
/**
*/
virtual std::string GetWkt() const;
......
......@@ -181,18 +181,10 @@ public:
// otb::GlActor overloads.
//
virtual bool TransformFromViewport( Point2f & out,
const Point2f & in,
bool isPhysical = true ) const;
virtual bool TransformFromViewport( Point2d & out,
const Point2d & in,
bool isPhysical = true ) const;
virtual bool TransformToViewport( Point2f & out,
const Point2f & in,
bool isPhysical = true ) const;
virtual bool TransformToViewport( Point2d & out,
const Point2d & in,
bool isPhysical = true ) const;
......
......@@ -43,6 +43,7 @@ GeoInterface
return false;
}
#if 0
bool
GeoInterface
......@@ -63,6 +64,7 @@ GeoInterface
return true;
}
#endif
bool
GeoInterface
......@@ -74,6 +76,8 @@ GeoInterface
}
#if 0
bool
GeoInterface
::TransformToViewport( Point2f & out,
......@@ -93,6 +97,7 @@ GeoInterface
return true;
}
#endif
std::string
GeoInterface
......
......@@ -1139,41 +1139,11 @@ void GlImageActor::AutoColorAdjustment( double & minRed, double & maxRed,
}
bool
GlImageActor
::TransformFromViewport( Point2f & out,
const Point2f & in,
bool isPhysical ) const
{
out = ViewportToImageTransform( in, isPhysical );
return true;
}
bool
GlImageActor
::TransformFromViewport( Point2d & out,
const Point2d & in,
bool isPhysical ) const
{
Point2f p;
if( !TransformFromViewport( p, Point2f( in ), isPhysical ) )
return false;
out = p;
return true;
}
bool
GlImageActor
::TransformToViewport( Point2f & out,
const Point2f & in,
bool isPhysical ) const
{
out = ViewportToImageTransform( in, isPhysical );
......@@ -1187,12 +1157,7 @@ GlImageActor
const Point2d & in,
bool isPhysical ) const
{
Point2f p;
if( !TransformToViewport( p, Point2f( in ), isPhysical ) )
return false;
out = p;
out = ViewportToImageTransform( in, isPhysical );
return true;
}
......
Supports Markdown
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