From: apo Date: Mon, 25 Dec 2006 08:40:41 +0000 (+0000) Subject: To clarify the VISU_OpenGLPointSpriteMapper interface X-Git-Tag: WP1_2_3_26-12-2006_before_passing_node_coords X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=661a2a7b7c193ba0f614dd43218459fd33656d2c;p=modules%2Fvisu.git To clarify the VISU_OpenGLPointSpriteMapper interface --- diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx index 569c106c..5954c808 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx @@ -31,13 +31,11 @@ #include #include #include -#include -#include #include #include #include -#include -#include +#include +#include #include #include #include @@ -787,11 +785,7 @@ struct TVertex //----------------------------------------------------------------------------- void VISU_OpenGLPointSpriteMapper::DrawPoints(vtkPoints *thePoints, vtkUnsignedCharArray *theColors, - vtkFloatArray *theAlpha, - vtkIdType &theCellNum, - int &theNoAbort, vtkCellArray *theCells, - vtkRenderer *theRenderer, vtkActor* theActor) { //cout << "VISU_OpenGLPointSpriteMapper::DrawPoints" << endl; @@ -867,25 +861,22 @@ void VISU_OpenGLPointSpriteMapper::DrawPoints(vtkPoints *thePoints, } //----------------------------------------------------------------------------- -int VISU_OpenGLPointSpriteMapper::Draw(vtkRenderer *aren, vtkActor *act) +int VISU_OpenGLPointSpriteMapper::Draw(vtkRenderer *theRenderer, vtkActor *theActor) { if( this->UseOpenGLMapper || this->PrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere ) - return MAPPER_SUPERCLASS::Draw( aren, act ); + return MAPPER_SUPERCLASS::Draw( theRenderer, theActor ); - vtkOpenGLRenderer *ren = (vtkOpenGLRenderer *)aren; vtkUnsignedCharArray *colors = NULL; - vtkFloatArray *alpha = NULL; vtkPolyData *input = this->GetInput(); vtkPoints *points; int noAbort = 1; int cellScalars = 0; - vtkIdType cellNum = 0; float tran; // get the transparency - tran = act->GetProperty()->GetOpacity(); + tran = theActor->GetProperty()->GetOpacity(); // if the primitives are invisable then get out of here if (tran <= 0.0) @@ -912,7 +903,7 @@ int VISU_OpenGLPointSpriteMapper::Draw(vtkRenderer *aren, vtkActor *act) // we need to know the total number of cells so that we can report progress this->TotalCells = input->GetVerts()->GetNumberOfCells(); - this->DrawPoints(points, colors, alpha, cellNum, noAbort, input->GetVerts(), ren, act); + this->DrawPoints(points, colors, input->GetVerts(), theActor); this->UpdateProgress(1.0); return noAbort; diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx index 559f97f6..981d40a6 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx @@ -42,12 +42,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 @@ -217,14 +212,10 @@ protected: ~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); + void DrawPoints(vtkPoints *thePoints, + vtkUnsignedCharArray *theColors, + vtkCellArray *theCells, + vtkActor* theActor); //! Initializing OpenGL extensions. bool InitExtensions();