Commit b5c99b9b authored by hrchilds's avatar hrchilds
Browse files

Fix problem with 2D vector heads not showing up sometimes due to floating point precision.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@9631 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7e9a32f2
......@@ -96,6 +96,9 @@ vtkVectorGlyph::vtkVectorGlyph()
// width, to increase the number of polygons, and to cap the ends of
// the cone/cylinder.
//
// Hank Childs, Sun Jan 24 10:26:07 PST 2010
// Fix problem where glyph heads don't show up in 2D.
//
// ****************************************************************************
void vtkVectorGlyph::Execute(void)
......@@ -145,7 +148,11 @@ void vtkVectorGlyph::Execute(void)
float theta = 2*M_PI * float(i)/float(nSteps);
float x = OriginOffset + endOfHead;
float y = proportion * 0.5 * cos(theta);
float z = proportion * 0.5 * sin(theta);
float z;
if (ConeHead)
z = proportion * 0.5 * sin(theta);
else
z = 0;
pts->SetPoint(3 + i, x, y, z);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment