X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPIPELINE%2FVISU_OpenGLPointSpriteMapper.hxx;h=1b029c58c909beb39aff69179959301d37a852e1;hb=1f9d5836e71aac9c59192e955e63465940ef7a6f;hp=7af9a27a3f821950455809abe2b1088729a46617;hpb=e967b0415406f4f86ca2c9489abc8554b4c15dae;p=modules%2Fvisu.git diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx index 7af9a27a..1b029c58 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx @@ -1,30 +1,30 @@ -// VISU OBJECT : interactive object for VISU entities implementation +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// VISU OBJECT : interactive object for VISU entities implementation // File: VISU_OpenGLPointSpriteMapper.hxx // Author: // Module : VISU - +// #ifndef VISU_OpenGLPointSpriteMapper_HeaderFile #define VISU_OpenGLPointSpriteMapper_HeaderFile @@ -32,6 +32,10 @@ # pragma warning ( disable : 4275 ) #endif +#ifdef WIN32 +#include +#endif + #include #include @@ -42,12 +46,7 @@ class vtkCellArray; class vtkPoints; class vtkProperty; -class vtkRenderWindow; -class vtkOpenGLRenderer; -class vtkOpenGLTexture; -class vtkBMPReader; class vtkImageData; -class vtkFloatArray; class vtkXMLImageDataReader; #ifndef VTK_IMPLEMENT_MESA_CXX @@ -62,6 +61,8 @@ class vtkXMLImageDataReader; typedef GLuint GLhandleARB; #endif +#include "VISUPipeline.hxx" + //---------------------------------------------------------------------------- //! OpenGL Point Sprites PolyData Mapper. /*! @@ -72,7 +73,7 @@ typedef GLuint GLhandleARB; * usage of the pipeline is larger than this limit, the mapper will divide * the data into pieces and render each in a for loop. */ -class VISU_OpenGLPointSpriteMapper : public MAPPER_SUPERCLASS +class VISU_PIPELINE_EXPORT VISU_OpenGLPointSpriteMapper : public MAPPER_SUPERCLASS { public: //! The Point Sprites rendering mode. @@ -90,8 +91,6 @@ public: static VISU_OpenGLPointSpriteMapper *New(); vtkTypeRevisionMacro(VISU_OpenGLPointSpriteMapper,MAPPER_SUPERCLASS); - void ShallowCopy(vtkAbstractMapper*); - //! Set the initial point size to be used. /*! * This value forms the base upon which the distance attenuation acts. @@ -99,13 +98,12 @@ public: * card for sprite display, then the quadratic factors are adjusted to * bring the size down. */ - vtkSetMacro(DefaultPointSize, float); - //! Get the initial point size to be used. vtkGetMacro(DefaultPointSize, float); //! Set Average Cell Size. - vtkSetMacro(AverageCellSize, float); + void + SetAverageCellSize(float theSize); //! Get Average Cell Size. vtkGetMacro(AverageCellSize, float); @@ -209,6 +207,12 @@ public: //! Get Point Sprite AlphaThreshold. vtkGetMacro(PointSpriteAlphaThreshold, float); + //! Set Point Sprite Opacity + vtkSetMacro(PointSpriteOpacity, float); + + //! Get Point Sprite Opacity + vtkGetMacro(PointSpriteOpacity, float); + //! Set ImageData for Point Sprite Texture. void SetImageData(vtkImageData* theImageData); @@ -219,16 +223,6 @@ protected: VISU_OpenGLPointSpriteMapper(); ~VISU_OpenGLPointSpriteMapper(); - //! Internal method of the Point Sprites drawing. - void DrawPoints(vtkPoints *p, - vtkUnsignedCharArray *c, - vtkFloatArray *alpha, - vtkIdType &cellNum, - int &noAbort, - vtkCellArray *ca, - vtkRenderer *ren, - vtkActor *act); - //! Initializing OpenGL extensions. bool InitExtensions(); @@ -277,11 +271,11 @@ private: GLuint PointSpriteTexture; float PointSpriteAlphaThreshold; + float PointSpriteOpacity; float AverageCellSize; vtkSmartPointer ImageData; - vtkPolyDataMapper* TempMapper; }; #endif