<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">There seems to be something funny about this example:<br>
<a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/ProgrammableGlyphFilter</a><br>
I believe it should render a cone, a cube, and a sphere, but when I build and run it with VTK-5.10.1, I see only the cone. Strangely, the console output is:<br>
<br>
Calling CalcGlyph for point 0<br>
Point coords are: 0 0 0<br>
Calling CalcGlyph for point 1<br>
Point coords are: 5 0 0<br>
Calling CalcGlyph for point 2<br>
Point coords are: 10 0 0<br>
<br>
which makes it look as if it is creating the cube (point 1) and sphere (point 2).<br>
<br>
The comment in this code in main():<br>
<br>
glyphFilter->SetGlyphMethod(CalcGlyph, glyphFilter);<br>
//need a default glyph, but this should not be used<br>
vtkSmartPointer<vtkConeSource> coneSource = vtkSmartPointer<vtkConeSource>::New();<br>
#if VTK_MAJOR_VERSION <= 5<br>
glyphFilter->SetSource(coneSource->GetOutput());<br>
#else<br>
glyphFilter->SetSourceConnection(coneSource->GetOutputPort());<br>
#endif<br>
<br>
suggests that although coneSource is initially set as the source for glyphFilter, it is expected that this will be overridden by the code in CalcGlyph(), but in fact this is not happening. What is missing?<br>
</div>
</body>
</html>