[vtkusers] error for vtkVolumeProperty
    David Doria 
    daviddoria at gmail.com
       
    Mon Oct 11 08:37:33 EDT 2010
    
    
  
On Mon, Oct 11, 2010 at 12:11 AM, Darshan Pai <darshanpai at gmail.com> wrote:
> When I use SmarPointer to initialize vtkVolumeProperty I get the following
> error
> C:\vtkcvs\VTK\Common\vtkSmartPointer.h(75) : error C2440: 'static_cast' :
> cannot convert from 'vtkObjectBase *const ' to 'vtkVolumeProperty *'
>
> Is it that I cannot make vtkVolumeProperty a SmartPointer?
>
> Regards
> Darshan
This compiles fine for me:
#include <vtkSmartPointer.h>
#include <vtkVolumeProperty.h>
int main(int, char *[])
{
  // Read in the data
  vtkSmartPointer<vtkVolumeProperty> reader =
    vtkSmartPointer<vtkVolumeProperty>::New();
  return EXIT_SUCCESS;
}
David
    
    
More information about the vtkusers
mailing list