From a3bad4fb2d987631f587661c44fe243c4bc03b1a Mon Sep 17 00:00:00 2001 From: srn Date: Tue, 7 Aug 2007 07:06:32 +0000 Subject: [PATCH] Added a field myPrimitiveType to store a type of the current primitive used to display GaussPoints --- src/PIPELINE/VISU_GaussPointsPL.cxx | 10 +++++----- src/PIPELINE/VISU_GaussPointsPL.hxx | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index dc9bc137..12a895b6 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -71,6 +71,8 @@ VISU_GaussPointsPL for(int i = 0; i < 3; i++) myPassFilter.push_back(vtkPassThroughFilter::New()); + + myPrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere; } @@ -417,6 +419,8 @@ VISU_GaussPointsPL myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput()); GetPointSpriteMapper()->SetPrimitiveType( thePrimitiveType ); + + myPrimitiveType = thePrimitiveType; } @@ -425,11 +429,7 @@ int VISU_GaussPointsPL ::GetPrimitiveType() { - if( myPassFilter[2]->GetInput() == myPassFilter[1]->GetOutput() ) { - return VISU_OpenGLPointSpriteMapper::GeomSphere; - } - - return GetPointSpriteMapper()->GetPrimitiveType(); + return myPrimitiveType; } diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index d8cd2f59..d489362c 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -302,6 +302,8 @@ private: vtkSphereSource* mySphereSource; vtkFloatingPointType myMagnificationIncrement; + + int myPrimitiveType; }; #endif -- 2.39.2