[vtkusers] vtkGlyph3D

John Biddiscombe biddisco at cscs.ch
Mon Jul 18 14:34:07 EDT 2005


> One of them is missing.

for this error, it'd be #include "vtkPolyData.h"

>
>
> HTH,
> David
>
>
> Peter Schmitt wrote:
>
>> vtkusers,
>> I am having some goofy problems with vtkGlyph3D::SetInput(vtkDataSet*).
>>
>> When I call  vtkGlyph3D::SetInput(mask->GetOutput()), I get the
>> following error on compile:
>> ////////////////
>> // start snip
>> main.C: In function `int main(int, char**)':
>> main.C:208: no matching function for call to 
>> `vtkGlyph3D::SetInput(vtkPolyData*
>>   )'
>> /software/linux-sles8-ia32/vtk-nvgl-4.4.2-gcc-r1/include/vtk/vtkDataSetToPolyDataFilter.h:41: 
>>
>> candidates
>>   are: virtual void vtkDataSetToPolyDataFilter::SetInput(vtkDataSet*)
>> make: *** [main.o] Error 1
>> // stop snip
>> ///////////////
>>
>> However, I can compile & execute properly if I run the following
>> command instead:
>> vtkGlyph3D::SetInput((vtkDataSet*) mask->GetOutput())
>>
>> Why do I have to manually set my mask as a vtkDataSet?  Is this a bug
>> in my program or vtk?  The vtkMaskPoints examples do not manually
>> declare a point mask as (vtkDataSet*)  I have included a small code
>> fragment at the end of this email.
>>
>> Thanks,
>> Pete
>>
>>
>> // code snip follows:
>>
>>    vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
>>    //... set data
>>
>>    /* Set up arrow source that will be used with glyph*/
>>    vtkArrowSource *arrow = vtkArrowSource::New();
>>
>>    /* transform base vector */
>>    vtkTransform *scale = vtkTransform::New();
>>
>>    /* apply the scaling */
>>    vtkTransformPolyDataFilter *trans = 
>> vtkTransformPolyDataFilter::New();
>>    trans->SetTransform(scale);
>>    trans->SetInput(arrow->GetOutput());
>>
>>    /* limit number of vectors to be drawn via a mask */
>>    vtkMaskPoints *mask = vtkMaskPoints::New();
>>    mask->SetInput(ugrid);
>>    mask->SetOnRatio(75);
>>    mask->RandomModeOn();
>>
>>    /* set the glyph using the objects we just set up */
>>    vtkGlyph3D *arrows = vtkGlyph3D::New();
>>    arrows->SetInput((vtkDataSet*) mask->GetOutput());    // <<<-----
>> runs properly
>>    //arrows->SetInput(mask->GetOutput());          //   <<< ----
>> gives me compile error
>>    arrows->SetSource(trans->GetOutput());
>>    arrows->SetScaleModeToDataScalingOff();
>>    arrows->SetColorModeToColorByVector();
>>
>> -- 
>> Pete
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages 
>> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>  
>>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages 
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82





More information about the vtkusers mailing list