[vtkusers] Access style class member variables in a callback?
    Jeff Baumes 
    jeff.baumes at kitware.com
       
    Thu Oct 22 10:44:09 EDT 2009
    
    
  
> Since this callback is not a member function of the style class, the
> variable is not accessible. This should be very easy - as I'd imagine
> the whole idea of this style is to get the StartPosition and
> EndPosition of the selection?
This is what the callData is for. This is how you get the rectangle bounds:
  unsigned int* rect = reinterpret_cast<unsigned int*>(callData);
  unsigned int pos1X = rect[0];
  unsigned int pos1Y = rect[1];
  unsigned int pos2X = rect[2];
  unsigned int pos2Y = rect[3];
Jeff
-- 
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 881-4932
jeff.baumes at kitware.com
    
    
More information about the vtkusers
mailing list