-// 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
# pragma warning ( disable : 4275 )
#endif
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include <GL/gl.h>
#include <vtkSmartPointer.h>
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
typedef GLuint GLhandleARB;
#endif
+#include "VISUPipeline.hxx"
+
//----------------------------------------------------------------------------
//! OpenGL Point Sprites PolyData Mapper.
/*!
* 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.
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.
* 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);
//! 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);
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();
GLuint PointSpriteTexture;
float PointSpriteAlphaThreshold;
+ float PointSpriteOpacity;
float AverageCellSize;
vtkSmartPointer<vtkImageData> ImageData;
- vtkPolyDataMapper* TempMapper;
};
#endif