Commit 00a7f397 authored by Ken Martin's avatar Ken Martin
Browse files

fixed scalar copying bug

parent c811711d
...@@ -181,20 +181,19 @@ void vtkGlyph3D::Execute() ...@@ -181,20 +181,19 @@ void vtkGlyph3D::Execute()
if ( inScalars != NULL ) if ( inScalars != NULL )
{ {
// Copy Input scalar // Copy Input scalar
for (i=0; i < numSourcePts; i++) scale = inScalars->GetScalar(inPtId);
newScalars->InsertScalar(ptIncr+i,scale);
if ( this->ScaleMode == SCALE_BY_SCALAR ) if ( this->ScaleMode == SCALE_BY_SCALAR )
{ {
if ( (den = this->Range[1] - this->Range[0]) == 0.0 ) den = 1.0; if ( (den = this->Range[1] - this->Range[0]) == 0.0 ) den = 1.0;
scale = inScalars->GetScalar(inPtId);
scale = (scale < this->Range[0] ? this->Range[0] : scale = (scale < this->Range[0] ? this->Range[0] :
(scale > this->Range[1] ? this->Range[1] : scale)); (scale > this->Range[1] ? this->Range[1] : scale));
scale = (scale - this->Range[0]) / den; scale = (scale - this->Range[0]) / den;
} }
for (i=0; i < numSourcePts; i++)
newScalars->InsertScalar(ptIncr+i,scale);
} }
// scale data if appropriate // scale data if appropriate
......
Supports Markdown
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