]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To clarify the VISU_OpenGLPointSpriteMapper interface WP1_2_3_26-12-2006_before_passing_node_coords
authorapo <apo@opencascade.com>
Mon, 25 Dec 2006 08:40:41 +0000 (08:40 +0000)
committerapo <apo@opencascade.com>
Mon, 25 Dec 2006 08:40:41 +0000 (08:40 +0000)
src/PIPELINE/VISU_OpenGLPointSpriteMapper.cxx
src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx

index 569c106c6e9eb352470f163a36bbb6e097319a36..5954c808f9b36a2513dfa14d6c7b4a1a36041573 100755 (executable)
 #include <vtkCellArray.h>
 #include <vtkCellData.h>
 #include <vtkCommand.h>
-#include <vtkDataArray.h>
-#include <vtkFloatArray.h>
 #include <vtkImageData.h>
 #include <vtkMatrix4x4.h>
 #include <vtkObjectFactory.h>
-#include <vtkOpenGLRenderer.h>
-#include <vtkOpenGLRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
 #include <vtkPointData.h>
 #include <vtkPolyData.h>
 #include <vtkPolygon.h>
@@ -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;
index 559f97f6100e2817497dd50748963cb8385061c7..981d40a623ff1366a1947efe391f16517bc4080d 100755 (executable)
 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();