From cbe3c7b300d787ebd45b71ffd6594c0fc3cb4d78 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 11 Nov 2005 11:59:48 +0000 Subject: [PATCH] Documentation. --- src/PIPELINE/VISU_GaussPointsPL.hxx | 50 ++++++++++++++++++- src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx | 23 +++++---- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index dd8f4ea8..fac4c2c7 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -37,6 +37,11 @@ class vtkGeometryFilter; class vtkDataArray; class vtkImageData; +//! Pipeline for the Gauss Points presentation. +/*! + * This class uses the special mapper (VISU_OpenGLPointSpriteMapper) + * for rendering the Gauss Points as Point Sprites. + */ class VISU_GaussPointsPL : public VISU_ScalarMapPL { protected: @@ -55,17 +60,21 @@ public: void ShallowCopy(VISU_PipeLine *thePipeLine); + //! Get the native mapper. virtual TMapper* GetMapper(); + //! Get the internal #VISU_OpenGLPointSpriteMapper. VISU_OpenGLPointSpriteMapper* GetPSMapper(); + //! Redefined method for building the pipeline. virtual void Build(); + //! Redefined method for updating the pipeline. virtual void Update(); @@ -80,74 +89,113 @@ public: const VISU::PGaussPtsIDMapper& GetGaussPtsIDMapper() const; + //! Set the Bicolor mode. + /*! + * When the Bicolor parameter is set to true, scalar bars are + * drawing with two colors : red color correspoonds to positive + * scalar values, blue color - to negative values. + */ void SetBicolor(bool theBicolor); + //! Get the Bicolor mode. bool GetBicolor(); - void SetIsColored(bool theIsColored); + //! Set the Multicolored mode. + /*! + * This parameter is using to switch between Results and Geometry + * modes. Multiple colors are using when the presentation is + * drawing in the Results mode, one color - in the Geometry mode. + */ + void + SetIsColored(bool theIsColored); + //! Get the maximum Point Sprite size, which is supported by hardware. float GetMaximumSupportedSize(); + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteClamp. void SetClamp(float theClamp); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, float). float GetClamp() { return myClamp; } + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteSize. void SetSize(float theSize); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, float). float GetSize() { return mySize; } + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize. void SetMinSize(float theMinSize); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, float). float GetMinSize() { return myMinSize; } + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize. void SetMaxSize(float theMaxSize); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, float). float GetMaxSize() { return myMaxSize; } + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMagnification. void SetMagnification(float theMagnification); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, float). float GetMagnification() { return myMagnification; } + //! Set the increment of changing Magnification parameter. void SetMagnificationIncrement(float theIncrement); + //! Get the increment of changing Magnification parameter. float GetMagnificationIncrement() { return myMagnificationIncrement; } + //! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteAlphaThreshold. void SetAlphaThreshold(float theAlphaThreshold); + //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, float). float GetAlphaThreshold() { return myAlphaThreshold; } + //! Method for changing the Magnification parameter. void ChangeMagnification( bool up ); + //! Get the maximum size of Point Sprites in the presentation. float GetMaxPointSize(); + //! Get point size by element's Id. float GetPointSize(vtkIdType theID); + //! Get point size by element's Id using the specified scalar array. float GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray); + //! Set image data for the Point Sprite texture. void SetImageData(vtkImageData* theImageData); + //! Make the image data for Point Sprite texture. + /*! + * First parameter - texture for shape. + * Second parameter - texture for alpha mask. + */ static vtkImageData* MakeTexture( const char* theMainTexture, diff --git a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx index 2ed38921..dd8b967e 100755 --- a/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx +++ b/src/PIPELINE/VISU_OpenGLPointSpriteMapper.hxx @@ -73,6 +73,14 @@ typedef GLuint GLhandleARB; class VISU_OpenGLPointSpriteMapper : public MAPPER_SUPERCLASS { public: + //! The Point Sprites rendering mode. + /*! + * Accumulate : Uses glBlendFunc(GL_SRC_ALPHA, GL_ONE), and no depth testing + * so that points are accumulated. Suitable for Galaxy plots. + * Occlude : No blending. Particles are solid spheres and depth testing is + * used as usual. Suitable for most particle simulations without the need + * for opacity. + */ enum RenderModes { Accumulate = 0, Occlude }; static VISU_OpenGLPointSpriteMapper *New(); @@ -92,17 +100,10 @@ public: //! Get the initial point size to be used. vtkGetMacro(DefaultPointSize, float); - //! Set the RenderMode for the mapper. - /*! - * Accumulate : Uses glBlendFunc(GL_SRC_ALPHA, GL_ONE), and no depth testing - * so that points are accumulated. Suitable for Galaxy plots. - * Occlude : No blending. Particles are solid spheres and depth testing is - * used as usual. Suitable for most particle simulations without the need - * for opacity. - */ + //! Set the Render Mode for the mapper. vtkSetMacro(RenderMode, int); - //! Get the RenderMode for the mapper. + //! Get the Render Mode for the mapper. vtkGetMacro(RenderMode, int); //! Implement superclass render method. @@ -140,11 +141,11 @@ public: //! Get usage of textures for Point Sprites. vtkGetMacro(UseTextures, bool); - // Set usage of vertex shader. + //! Set usage of vertex shader. /*! Works only if usage of Point Sprites is turned on. */ vtkSetMacro(UseShader, bool); - // Get usage of vertex shader. + //! Get usage of vertex shader. vtkGetMacro(UseShader, bool); //! Set Point Sprite drawing mode. -- 2.39.2