Permalink
Browse files

image: Have TransformBase methods be virtual

Thsi allows the child to write their own implementation of
reverse_bbox or forward_bbox.
  • Loading branch information...
1 parent 6f6e1af commit 032660c5e70f2322d22818a1ac8fdd514c725483 Zack Moratto committed May 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/vw/Image/Transform.h
@@ -135,7 +135,7 @@ namespace vw {
inline ImplT& impl() { return static_cast<ImplT&>(*this); }
inline ImplT const& impl() const { return static_cast<ImplT const&>(*this); }
- BBox2i forward_bbox( BBox2i const& bbox ) const {
+ virtual BBox2i forward_bbox( BBox2i const& bbox ) const {
ImplT const& txform = impl();
BBox2 transformed_bbox;
switch( txform.forward_type() ) {
@@ -164,7 +164,7 @@ namespace vw {
return grow_bbox_to_int( transformed_bbox );
}
- BBox2i reverse_bbox( BBox2i const& bbox ) const {
+ virtual BBox2i reverse_bbox( BBox2i const& bbox ) const {
ImplT const& txform = impl();
BBox2 transformed_bbox;
switch( txform.reverse_type() ) {

0 comments on commit 032660c

Please sign in to comment.