OpenGL Point Sprites PolyData Mapper. More...
#include <VTKViewer_PolyDataMapper.h>
Classes | |
struct | Locations |
Public Types | |
enum | ExtensionsState { ES_None = 0 , ES_Error , ES_Ok } |
Public Member Functions | |
vtkTypeMacro (VTKViewer_PolyDataMapper, vtkOpenGLPolyDataMapper) void SetMarkerEnabled(bool) | |
Set point marker enabled. More... | |
void | SetBallEnabled (bool) |
Set point ball enabled. More... | |
bool | GetBallEnabled () |
void | SetBallScale (double) |
Set ball scale factor. More... | |
double | GetBallScale () |
void | SetMarkerStd (VTK::MarkerType, VTK::MarkerScale) |
Set standard point marker. More... | |
void | SetMarkerTexture (int, VTK::MarkerTexture) |
Set custom point marker. More... | |
VTK::MarkerType | GetMarkerType () |
Get type of the point marker. More... | |
VTK::MarkerScale | GetMarkerScale () |
Get scale of the point marker. More... | |
int | GetMarkerTexture () |
Get texture identifier of the point marker. More... | |
virtual void | RenderPiece (vtkRenderer *, vtkActor *) |
Implement superclass render method. More... | |
virtual int | Draw (vtkRenderer *, vtkActor *) |
Draw method for OpenGL. More... | |
Static Public Member Functions | |
static VTKViewer_PolyDataMapper * | New () |
Protected Member Functions | |
VTKViewer_PolyDataMapper () | |
~VTKViewer_PolyDataMapper () | |
int | InitExtensions () |
Initializing OpenGL extensions. More... | |
void | InitPointSprites () |
Activate Point Sprites. More... | |
void | CleanupPointSprites () |
Deactivate Point Sprites. More... | |
void | InitTextures () |
Initializing textures for Point Sprites. More... | |
int | InitShader () |
Initializing of the Vertex Shader. More... | |
void | InternalDraw (vtkRenderer *, vtkActor *) |
Private Types | |
typedef std::map< int, vtkSmartPointer< vtkImageData > > | ImageDataMap |
Private Attributes | |
int | ExtensionsInitialized |
GLuint | PointSpriteTexture |
vtkSmartPointer< vtkImageData > | ImageData |
VTKViewer_OpenGLHelper | OpenGLHelper |
GLhandleARB | PointProgram |
struct VTKViewer_PolyDataMapper::Locations | myLocations |
bool | MarkerEnabled |
bool | BallEnabled |
double | BallScale |
VTK::MarkerType | MarkerType |
VTK::MarkerScale | MarkerScale |
int | MarkerId |
ImageDataMap | StandardTextures |
ImageDataMap | CustomTextures |
ImageDataMap | SpecialTextures |
OpenGL Point Sprites PolyData Mapper.
VTKViewer_PolyDataMapper 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.
|
private |
|
protected |
|
protected |
References VTKViewer_OpenGLHelper::DestroyShaderProgram(), OpenGLHelper, PointProgram, and PointSpriteTexture.
|
protected |
Deactivate Point Sprites.
References GL_POINT_SPRITE_ARB, and GL_VERTEX_PROGRAM_POINT_SIZE_ARB.
|
virtual |
Draw method for OpenGL.
References ImageData, InternalDraw(), MarkerEnabled, MarkerType, and VTK::MT_NONE.
bool VTKViewer_PolyDataMapper::GetBallEnabled | ( | ) |
References BallEnabled.
double VTKViewer_PolyDataMapper::GetBallScale | ( | ) |
References BallScale.
VTK::MarkerScale VTKViewer_PolyDataMapper::GetMarkerScale | ( | ) |
Get scale of the point marker.
References MarkerScale.
int VTKViewer_PolyDataMapper::GetMarkerTexture | ( | ) |
Get texture identifier of the point marker.
References MarkerId.
VTK::MarkerType VTKViewer_PolyDataMapper::GetMarkerType | ( | ) |
Get type of the point marker.
References MarkerType.
|
protected |
Initializing OpenGL extensions.
References ES_Error, GL_NUM_EXTENSIONS, InitShader(), VTKViewer_OpenGLHelper::IsInitialized(), and OpenGLHelper.
|
protected |
Activate Point Sprites.
References BallEnabled, GL_POINT_SPRITE_ARB, and GL_VERTEX_PROGRAM_POINT_SIZE_ARB.
|
protected |
Initializing of the Vertex Shader.
References VTKViewer_OpenGLHelper::CreateShaderProgram(), ES_Ok, VTKViewer_PolyDataMapper::Locations::GeneralPointSize, GL_CURRENT_PROGRAM, GL_VERTEX_SHADER_ARB, VTKViewer_PolyDataMapper::Locations::ModelViewProjection, myLocations, OpenGLHelper, PointProgram, VTKViewer_PolyDataMapper::Locations::PointSprite, VTKViewer_PolyDataMapper::Locations::Projection, GUI_OPENGL::readFromFile(), VTKViewer_OpenGLHelper::vglAttachObjectARB, VTKViewer_OpenGLHelper::vglCompileShaderARB, VTKViewer_OpenGLHelper::vglCreateProgramObjectARB, VTKViewer_OpenGLHelper::vglCreateShaderObjectARB, VTKViewer_OpenGLHelper::vglLinkProgramARB, VTKViewer_OpenGLHelper::vglShaderSourceARB, and VTKViewer_OpenGLHelper::vglUseProgramObjectARB.
|
protected |
Initializing textures for Point Sprites.
References BallEnabled, GL_COORD_REPLACE_ARB, GL_POINT_SPRITE_ARB, GL_TEXTURE0, ImageData, myLocations, OpenGLHelper, VTKViewer_PolyDataMapper::Locations::PointSprite, and PointSpriteTexture.
|
protected |
References BallEnabled, ES_Ok, ExtensionsInitialized, VTKViewer_PolyDataMapper::Locations::GeneralPointSize, GetBallScale(), GL_ARRAY_BUFFER_ARB, GL_CURRENT_PROGRAM, GL_STATIC_DRAW_ARB, ImageData, VTKViewer_PolyDataMapper::Locations::ModelViewProjection, myLocations, OpenGLHelper, PointProgram, VTKViewer_PolyDataMapper::Locations::Projection, VTKViewer_OpenGLHelper::vglBindBufferARB, VTKViewer_OpenGLHelper::vglBufferDataARB, VTKViewer_OpenGLHelper::vglDeleteBuffersARB, VTKViewer_OpenGLHelper::vglDisableVertexAttribArrayARB, VTKViewer_OpenGLHelper::vglEnableVertexAttribArrayARB, VTKViewer_OpenGLHelper::vglGenBuffersARB, VTKViewer_OpenGLHelper::vglGetAttribLocationARB, VTKViewer_OpenGLHelper::vglUseProgramObjectARB, and VTKViewer_OpenGLHelper::vglVertexAttribPointerARB.
|
static |
|
virtual |
Implement superclass render method.
References BallEnabled, CleanupPointSprites(), Draw(), ES_Ok, ExtensionsInitialized, GL_CURRENT_PROGRAM, InitExtensions(), InitPointSprites(), InitTextures(), MarkerEnabled, MarkerType, VTK::MT_NONE, OpenGLHelper, PointProgram, and VTKViewer_OpenGLHelper::vglUseProgramObjectARB.
void VTKViewer_PolyDataMapper::SetBallEnabled | ( | bool | theBallEnabled | ) |
Set point ball enabled.
References BallEnabled, BallTextureId, ImageData, VTK::MakeTexture(), and SpecialTextures.
void VTKViewer_PolyDataMapper::SetBallScale | ( | double | theBallScale | ) |
Set ball scale factor.
References BallScale.
void VTKViewer_PolyDataMapper::SetMarkerStd | ( | VTK::MarkerType | theMarkerType, |
VTK::MarkerScale | theMarkerScale | ||
) |
Set standard point marker.
References ImageData, VTK::LoadTextureData(), VTK::MakeVTKImage(), MarkerScale, MarkerType, VTK::MS_70, VTK::MT_NONE, VTK::MT_USER, and StandardTextures.
void VTKViewer_PolyDataMapper::SetMarkerTexture | ( | int | theMarkerId, |
VTK::MarkerTexture | theMarkerTexture | ||
) |
Set custom point marker.
References CustomTextures, ImageData, VTK::MakeVTKImage(), MarkerId, MarkerType, and VTK::MT_USER.
VTKViewer_PolyDataMapper::vtkTypeMacro | ( | VTKViewer_PolyDataMapper | , |
vtkOpenGLPolyDataMapper | |||
) |
Set point marker enabled.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |