From: ouv Date: Wed, 14 Sep 2005 06:15:20 +0000 (+0000) Subject: PointSprite Mapper added X-Git-Tag: BR-D5-38-2003_D2005-12-10~201 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dd2c5ee6c272c89612dc9b174c17363e79b90346;p=modules%2Fvisu.git PointSprite Mapper added --- diff --git a/src/OBJECT/VISU_GaussPtsAct.cxx b/src/OBJECT/VISU_GaussPtsAct.cxx index 2b2393b9..138f8e77 100644 --- a/src/OBJECT/VISU_GaussPtsAct.cxx +++ b/src/OBJECT/VISU_GaussPtsAct.cxx @@ -28,6 +28,8 @@ #include "VISU_GaussPtsAct.h" #include "VISU_GaussPointsPL.hxx" +#include "VISU_OpenGLPointSpriteMapper.hxx" + #include "SVTK_Actor.h" #include @@ -224,6 +226,7 @@ vtkStandardNewMacro(VISU_GaussPtsAct); VISU_GaussPtsAct ::VISU_GaussPtsAct(): + myPSMapper(VISU_OpenGLPointSpriteMapper::New()), myGaussPointsPL(NULL), myTextMapper(vtkTextMapper::New()), myTextActor(VISU_GPTextActor::New()), @@ -260,7 +263,9 @@ VISU_GaussPtsAct VISU_GaussPtsAct ::~VISU_GaussPtsAct() -{} +{ + myPSMapper->Delete(); +} //---------------------------------------------------------------- @@ -291,7 +296,13 @@ VISU_GaussPtsAct ::SetPipeLine(VISU_PipeLine* thePipeLine) { myGaussPointsPL = dynamic_cast(thePipeLine); - Superclass::SetPipeLine(thePipeLine); + + //Superclass::SetPipeLine(thePipeLine); + + VISU_OpenGLPointSpriteMapper* aPSMapper = (VISU_OpenGLPointSpriteMapper*)myGaussPointsPL->GetMapper(); + + myPSMapper->SetInput( aPSMapper->GetInput() ); + SetMapper( myPSMapper ); } VISU_GaussPointsPL* diff --git a/src/OBJECT/VISU_GaussPtsAct.h b/src/OBJECT/VISU_GaussPtsAct.h index 3916fe8a..2a2e9ac4 100644 --- a/src/OBJECT/VISU_GaussPtsAct.h +++ b/src/OBJECT/VISU_GaussPtsAct.h @@ -33,6 +33,7 @@ #include class VISU_GaussPointsPL; +class VISU_OpenGLPointSpriteMapper; class vtkTextMapper; class vtkTextActor; @@ -87,6 +88,8 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct VISU_GaussPtsAct(); virtual ~VISU_GaussPtsAct(); + VISU_OpenGLPointSpriteMapper* myPSMapper; + vtkSmartPointer myGaussPointsPL; vtkSmartPointer myTextMapper;