@@ -235,36 +235,6 @@ GeometryHandle ShowFieldGlyphs::buildGeometryObject(
235235 return geom;
236236}
237237
238- double ShowFieldGlyphs::tool (double f)
239- {
240- // ///////////////////////////////////////////////
241- // TODO: this seemingly useless code fixes a nasty crash bug on Windows. Don't delete it until a proper fix is implemented!
242- static bool x = true ;
243- if (x)
244- {
245- std::cout << " " ;// this;// << " " << name_ << " " << resolution_ << " " << shift_ << " " << invert_ << std::endl;
246- x = false ;
247- }
248- // ///////////////////////////////////////////////
249-
250- const double rescaled01 = f;
251-
252- double v = std::min (std::max (0 ., rescaled01), 1 .);
253- double shift = .4 ;
254-
255- // apply the resolution
256- v = static_cast <double >((static_cast <int >(v *
257- static_cast <double >(12 )))) /
258- static_cast <double >(12 - 1 );
259- // the shift is a gamma.
260- double denom = std::tan (M_PI_2 * (0.5 - std::min (std::max (shift, -0.99 ), 0.99 ) * 0.5 ));
261- // make sure we don't hit divide by zero
262- if (std::isnan (denom)) denom = 0 .f ;
263- denom = std::max (denom, 0.001 );
264- v = std::pow (v, (1 . / denom));
265- return std::min (std::max (0 ., v), 1 .);
266- }
267-
268238void ShowFieldGlyphs::renderVectors (
269239 boost::shared_ptr<SCIRun::Field> field,
270240 boost::optional<boost::shared_ptr<SCIRun::Core::Datatypes::ColorMap>> colorMap,
@@ -329,17 +299,13 @@ void ShowFieldGlyphs::renderVectors(
329299 if (colorScheme == GeometryObject::COLOR_IN_SITU)
330300 {
331301 Vector colorVector = inputVector.normal ();
332- std::cout << inputVector << std::endl;
333- // node_color = ColorRGB(colorVector.x(), colorVector.y(), colorVector.z());
334- ColorRGB (tool (fabs (v.x ())), tool (fabs (v.y ())), tool (fabs (v.z ())));
302+ node_color = ColorRGB (colorVector.x (), colorVector.y (), colorVector.z ());
335303 }
336304 }
337305 else
338306 {
339307 node_color = state.defaultColor ;
340- node_color = ColorRGB (0.5 , 0.3 , 0 );
341308 }
342- std::cout << node_color << std::endl;
343309 switch (state.mGlyphType )
344310 {
345311 case RenderState::GlyphType::LINE_GLYPH:
0 commit comments