-#include <cpExtensions/Visualization/ImageInteractorStyle.h>
+#include <cpExtensions/Interaction/ImageInteractorStyle.h>
#include <vtkImageActor.h>
#include <vtkRenderWindowInteractor.h>
// -------------------------------------------------------------------------
-cpExtensions::Visualization::ImageInteractorStyle::
-Self* cpExtensions::Visualization::ImageInteractorStyle::
+cpExtensions::Interaction::ImageInteractorStyle::
+Self* cpExtensions::Interaction::ImageInteractorStyle::
New( )
{
return( new Self );
}
// -------------------------------------------------------------------------
-void cpExtensions::Visualization::ImageInteractorStyle::
+void cpExtensions::Interaction::ImageInteractorStyle::
AssociateImageActor( vtkImageActor* actor )
{
if( actor != NULL )
}
// -------------------------------------------------------------------------
-cpExtensions::Visualization::ImageInteractorStyle::
+cpExtensions::Interaction::ImageInteractorStyle::
ImageInteractorStyle( )
: Superclass( )
{
}
// -------------------------------------------------------------------------
-cpExtensions::Visualization::ImageInteractorStyle::
+cpExtensions::Interaction::ImageInteractorStyle::
~ImageInteractorStyle( )
{
}
// -------------------------------------------------------------------------
-bool cpExtensions::Visualization::ImageInteractorStyle::
-_PickPosition( double pos[ 3 ] )
+bool cpExtensions::Interaction::ImageInteractorStyle::
+_PickPosition( int idx[ 2 ], double pos[ 3 ] )
{
- static const double _0 = double( 0 );
vtkRenderWindowInteractor* rwi = this->GetInteractor( );
if( rwi == NULL )
return( false );
// Find the renderer where the event has been raised
- double x = double( rwi->GetEventPosition( )[ 0 ] );
- double y = double( rwi->GetEventPosition( )[ 1 ] );
- this->FindPokedRenderer( x, y );
+ idx[ 0 ] = rwi->GetEventPosition( )[ 0 ];
+ idx[ 1 ] = rwi->GetEventPosition( )[ 1 ];
+ this->FindPokedRenderer( double( idx[ 0 ] ), double( idx[ 1 ] ) );
// Pick a 3D position
- int r = this->m_PropPicker->Pick( x, y, _0, this->CurrentRenderer );
+ int r = this->m_PropPicker->Pick(
+ double( idx[ 0 ] ), double( idx[ 1 ] ), double( 0 ),
+ this->CurrentRenderer
+ );
if( r == 0 )
return( false );
this->m_PropPicker->GetPickPosition( pos );