OpenGL Point Sprites PolyData Mapper. More...
#include <VISU_OpenGLPointSpriteMapper.hxx>
Public Types | |
| enum | RenderModes { Accumulate = 0, Occlude } |
The Point Sprites rendering mode. More... | |
| enum | PrimitiveTypes { PointSprite = 0, OpenGLPoint, GeomSphere } |
Public Member Functions | |
| vtkTypeRevisionMacro (VISU_OpenGLPointSpriteMapper, MAPPER_SUPERCLASS) | |
| vtkGetMacro (DefaultPointSize, float) | |
| Set the initial point size to be used. | |
| void | SetAverageCellSize (float theSize) |
| Set Average Cell Size. | |
| vtkGetMacro (AverageCellSize, float) | |
| Get Average Cell Size. | |
| vtkSetMacro (RenderMode, int) | |
| Set the Render Mode for the mapper. | |
| vtkGetMacro (RenderMode, int) | |
| Get the Render Mode for the mapper. | |
| virtual void | RenderPiece (vtkRenderer *ren, vtkActor *a) |
| Implement superclass render method. | |
| void | ReleaseGraphicsResources (vtkWindow *) |
| Release any graphics resources that are being consumed by this mapper. | |
| virtual int | Draw (vtkRenderer *ren, vtkActor *a) |
| Draw method for OpenGL. | |
| vtkSetMacro (UseOpenGLMapper, bool) | |
| Set usage of #vtkOpenGLPolyDataMapper. | |
| vtkGetMacro (UseOpenGLMapper, bool) | |
| Get usage of #vtkOpenGLPolyDataMapper. | |
| vtkSetMacro (UsePointSprites, bool) | |
| Set usage of Point Sprites. | |
| vtkGetMacro (UsePointSprites, bool) | |
| Get usage of Point Sprites. | |
| vtkSetMacro (UseTextures, bool) | |
| Set usage of textures for Point Sprites. | |
| vtkGetMacro (UseTextures, bool) | |
| Get usage of textures for Point Sprites. | |
| vtkSetMacro (UseShader, bool) | |
| Set usage of vertex shader. | |
| vtkGetMacro (UseShader, bool) | |
| Get usage of vertex shader. | |
| vtkGetMacro (PointSpriteMode, int) | |
| Point Sprite drawing mode. | |
| void | SetPointSpriteMode (int) |
| vtkGetMacro (PrimitiveType, int) | |
| Get the Primitive type. | |
| void | SetPrimitiveType (int) |
| Set the Primitive type. | |
| void | SetPointSpriteClamp (float) |
| Set Point Sprite Clamp. | |
| vtkGetMacro (PointSpriteClamp, float) | |
| Get Point Sprite Clamp. | |
| void | SetPointSpriteSize (float) |
| Set Point Sprite Const Size. | |
| vtkGetMacro (PointSpriteSize, float) | |
| Get Point Sprite Const Size. | |
| void | SetPointSpriteMinSize (float) |
| Set Point Sprite Minimum Size. | |
| vtkGetMacro (PointSpriteMinSize, float) | |
| Get Point Sprite Minimum Size. | |
| void | SetPointSpriteMaxSize (float) |
| Set Point Sprite Maximum Size. | |
| vtkGetMacro (PointSpriteMaxSize, float) | |
| Get Point Sprite Maximum Size. | |
| void | SetPointSpriteMagnification (float) |
| Set Point Sprite Magnification. | |
| vtkGetMacro (PointSpriteMagnification, float) | |
| Get Point Sprite Magnification. | |
| void | SetPointSpriteAlphaThreshold (float) |
| Set Point Sprite AlphaThreshold. | |
| vtkGetMacro (PointSpriteAlphaThreshold, float) | |
| Get Point Sprite AlphaThreshold. | |
| vtkSetMacro (PointSpriteOpacity, float) | |
| Set Point Sprite Opacity. | |
| vtkGetMacro (PointSpriteOpacity, float) | |
| Get Point Sprite Opacity. | |
| void | SetImageData (vtkImageData *theImageData) |
| Set ImageData for Point Sprite Texture. | |
| vtkImageData * | GetImageData () |
| Get ImageData for Point Sprite Texture. | |
Static Public Member Functions | |
| static VISU_OpenGLPointSpriteMapper * | New () |
| static float | GetMaximumSupportedSize () |
| Return the maximum point size supported by the graphics hardware. | |
Protected Member Functions | |
| VISU_OpenGLPointSpriteMapper () | |
| ~VISU_OpenGLPointSpriteMapper () | |
| bool | InitExtensions () |
| Initializing OpenGL extensions. | |
| void | InitPointSprites () |
| Activate Point Sprites. | |
| void | CleanupPointSprites () |
| Deactivate Point Sprites. | |
| void | InitTextures () |
| Initializing textures for Point Sprites. | |
| void | InitShader () |
| Initializing of the Vertex Shader. | |
| void | SetShaderVariable (const char *variable, float value) |
| Set Vertex Shader variable. | |
| void | PrintInfoLog (GLhandleARB) |
| Getting information about Vertex Shader compiling and linking. | |
Private Attributes | |
| bool | UseOpenGLMapper |
| bool | UsePointSprites |
| bool | UseTextures |
| bool | UseShader |
| int | RenderMode |
| int | ListId |
| vtkIdType | TotalCells |
| int | ExtensionsInitialized |
| float | DefaultPointSize |
| GLhandleARB | VertexProgram |
| int | PrimitiveType |
| int | PointSpriteMode |
| float | PointSpriteClamp |
| float | PointSpriteSize |
| float | PointSpriteMinSize |
| float | PointSpriteMaxSize |
| float | PointSpriteMagnification |
| GLuint | PointSpriteTexture |
| float | PointSpriteAlphaThreshold |
| float | PointSpriteOpacity |
| float | AverageCellSize |
| vtkSmartPointer< vtkImageData > | ImageData |
VISU_OpenGLPointSpriteMapper is a class that maps polygonal data (i.e., vtkPolyData) to graphics primitives. It is performing the mapping to the rendering/graphics hardware/software. It is now possible to set a memory limit for the pipeline in the mapper. If the total estimated memory usage of the pipeline is larger than this limit, the mapper will divide the data into pieces and render each in a for loop.
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.
| VISU_OpenGLPointSpriteMapper::VISU_OpenGLPointSpriteMapper | ( | ) | [protected] |
References AverageCellSize, DefaultPointSize, ExtensionsInitialized, ListId, Occlude, PointSprite, PointSpriteAlphaThreshold, PointSpriteClamp, PointSpriteMagnification, PointSpriteMaxSize, PointSpriteMinSize, PointSpriteMode, PointSpriteOpacity, PointSpriteSize, PointSpriteTexture, PrimitiveType, RenderMode, TotalCells, UseOpenGLMapper, UsePointSprites, UseShader, and UseTextures.
| VISU_OpenGLPointSpriteMapper::~VISU_OpenGLPointSpriteMapper | ( | ) | [protected] |
References PointSpriteTexture, and ReleaseGraphicsResources().
| static VISU_OpenGLPointSpriteMapper* VISU_OpenGLPointSpriteMapper.New | ( | ) | [static] |
| VISU_OpenGLPointSpriteMapper.vtkTypeRevisionMacro | ( | VISU_OpenGLPointSpriteMapper | , |
| MAPPER_SUPERCLASS | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | DefaultPointSize | , |
| float | |||
| ) |
This value forms the base upon which the distance attenuation acts. Usually the pointsize is set to the maximum supported by the graphics card for sprite display, then the quadratic factors are adjusted to bring the size down. Get the initial point size to be used.
| void VISU_OpenGLPointSpriteMapper::SetAverageCellSize | ( | float | theSize | ) |
References AverageCellSize, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | AverageCellSize | , |
| float | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | RenderMode | , |
| int | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | RenderMode | , |
| int | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::RenderPiece | ( | vtkRenderer * | ren, |
| vtkActor * | a | ||
| ) | [virtual] |
References AverageCellSize, CleanupPointSprites(), Draw(), GeomSphere, VISU.GetInput(), InitExtensions(), InitPointSprites(), InitTextures(), ListId, MESSAGE, PointSprite, PointSpriteClamp, PointSpriteMagnification, PointSpriteMaxSize, PointSpriteMinSize, PointSpriteMode, PointSpriteSize, PrimitiveType, ReleaseGraphicsResources(), SetShaderVariable(), UsePointSprites, UseTextures, VertexProgram, vglUseProgramObjectARB, and ViewToDisplay().
| void VISU_OpenGLPointSpriteMapper::ReleaseGraphicsResources | ( | vtkWindow * | win | ) |
References ListId.
| int VISU_OpenGLPointSpriteMapper::Draw | ( | vtkRenderer * | ren, |
| vtkActor * | a | ||
| ) | [virtual] |
| float VISU_OpenGLPointSpriteMapper::GetMaximumSupportedSize | ( | ) | [static] |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | UseOpenGLMapper | , |
| bool | |||
| ) |
This flags prevents using of the VISU_OpenGLPointSpriteMapper (#vtkOpenGLPolyDataMapper is using instead).
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | UseOpenGLMapper | , |
| bool | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | UsePointSprites | , |
| bool | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | UsePointSprites | , |
| bool | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | UseTextures | , |
| bool | |||
| ) |
Works only if usage of Point Sprites is turned on.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | UseTextures | , |
| bool | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | UseShader | , |
| bool | |||
| ) |
Works only if usage of Point Sprites is turned on.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | UseShader | , |
| bool | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteMode | , |
| int | |||
| ) |
0 - Results - different colors, different sizes. 1 - Geometry - fixed color, fixed size. 2 - Outside - different colors, fixed size.
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteMode | ( | int | theMode | ) |
References PointSpriteMode.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PrimitiveType | , |
| int | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPrimitiveType | ( | int | thePrimitiveType | ) |
References PrimitiveType.
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteClamp | ( | float | theClamp | ) |
References PointSpriteClamp, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteClamp | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteSize | ( | float | theSize | ) |
References PointSpriteSize, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteSize | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize | ( | float | theMinSize | ) |
References PointSpriteMinSize, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteMinSize | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteMaxSize | ( | float | theMaxSize | ) |
References PointSpriteMaxSize, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteMaxSize | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteMagnification | ( | float | theMagnification | ) |
References PointSpriteMagnification, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteMagnification | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetPointSpriteAlphaThreshold | ( | float | theAlphaThreshold | ) |
References PointSpriteAlphaThreshold, and Tolerance.
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteAlphaThreshold | , |
| float | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkSetMacro | ( | PointSpriteOpacity | , |
| float | |||
| ) |
| VISU_OpenGLPointSpriteMapper.vtkGetMacro | ( | PointSpriteOpacity | , |
| float | |||
| ) |
| void VISU_OpenGLPointSpriteMapper::SetImageData | ( | vtkImageData * | theImageData | ) |
| vtkImageData * VISU_OpenGLPointSpriteMapper::GetImageData | ( | ) |
| bool VISU_OpenGLPointSpriteMapper::InitExtensions | ( | ) | [protected] |
References ExtensionsInitialized, InitializeARB(), InitShader(), IsARBInitialized, UseOpenGLMapper, and UseShader.
| void VISU_OpenGLPointSpriteMapper::InitPointSprites | ( | ) | [protected] |
| void VISU_OpenGLPointSpriteMapper::CleanupPointSprites | ( | ) | [protected] |
References GL_POINT_SPRITE_ARB, and GL_VERTEX_PROGRAM_POINT_SIZE_ARB.
| void VISU_OpenGLPointSpriteMapper::InitTextures | ( | ) | [protected] |
References GetImageData(), GL_COORD_REPLACE_ARB, GL_POINT_SPRITE_ARB, and PointSpriteTexture.
| void VISU_OpenGLPointSpriteMapper::InitShader | ( | ) | [protected] |
| void VISU_OpenGLPointSpriteMapper::SetShaderVariable | ( | const char * | variable, |
| float | value | ||
| ) | [protected] |
References VertexProgram, vglGetAttribLocationARB, and vglVertexAttrib1fARB.
| void VISU_OpenGLPointSpriteMapper::PrintInfoLog | ( | GLhandleARB | obj | ) | [protected] |
References GL_OBJECT_INFO_LOG_LENGTH_ARB, vglGetInfoLogARB, and vglGetObjectParameterivARB.
bool VISU_OpenGLPointSpriteMapper.UseOpenGLMapper [private] |
bool VISU_OpenGLPointSpriteMapper.UsePointSprites [private] |
bool VISU_OpenGLPointSpriteMapper.UseTextures [private] |
bool VISU_OpenGLPointSpriteMapper.UseShader [private] |
int VISU_OpenGLPointSpriteMapper.RenderMode [private] |
int VISU_OpenGLPointSpriteMapper.ListId [private] |
vtkIdType VISU_OpenGLPointSpriteMapper.TotalCells [private] |
int VISU_OpenGLPointSpriteMapper.ExtensionsInitialized [private] |
float VISU_OpenGLPointSpriteMapper.DefaultPointSize [private] |
int VISU_OpenGLPointSpriteMapper.PrimitiveType [private] |
int VISU_OpenGLPointSpriteMapper.PointSpriteMode [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteClamp [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteSize [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteMinSize [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteMaxSize [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteMagnification [private] |
GLuint VISU_OpenGLPointSpriteMapper.PointSpriteTexture [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteAlphaThreshold [private] |
float VISU_OpenGLPointSpriteMapper.PointSpriteOpacity [private] |
float VISU_OpenGLPointSpriteMapper.AverageCellSize [private] |
vtkSmartPointer<vtkImageData> VISU_OpenGLPointSpriteMapper.ImageData [private] |