VTK
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
vtkOpenGLPolyDataMapper Class Reference

a PolyDataMapper for the OpenGL library More...

#include <vtkOpenGLPolyDataMapper.h>

Inheritance diagram for vtkOpenGLPolyDataMapper:
Inheritance graph
[legend]
Collaboration diagram for vtkOpenGLPolyDataMapper:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkPolyDataMapper Superclass
typedef vtkPolyDataMapper Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkOpenGLPolyDataMapperNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void RenderPiece (vtkRenderer *ren, vtkActor *a)
void ReleaseGraphicsResources (vtkWindow *)
virtual int Draw (vtkRenderer *ren, vtkActor *a)
virtual int IsA (const char *type)
vtkOpenGLPolyDataMapperNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void RenderPiece (vtkRenderer *ren, vtkActor *act)
void ReleaseGraphicsResources (vtkWindow *)
virtual int GetPopulateSelectionSettings ()
void SetPopulateSelectionSettings (int v)
virtual bool GetSupportsSelection ()
virtual bool GetIsOpaque ()
virtual vtkIdType GetConvertedPickValue (vtkIdType idIn, int fieldassociation, vtkActor *act)
virtual void RenderPieceStart (vtkRenderer *ren, vtkActor *act)
virtual void RenderPieceDraw (vtkRenderer *ren, vtkActor *act)
virtual void RenderPieceFinish (vtkRenderer *ren, vtkActor *act)
virtual void RenderEdges (vtkRenderer *ren, vtkActor *act)

Static Public Member Functions

static vtkOpenGLPolyDataMapperNew ()
static int IsTypeOf (const char *type)
static vtkOpenGLPolyDataMapperSafeDownCast (vtkObjectBase *o)
static vtkOpenGLPolyDataMapperNew ()
static int IsTypeOf (const char *type)
static vtkOpenGLPolyDataMapperSafeDownCast (vtkObjectBase *o)

Public Attributes

vtkPolyDataCurrentInput

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkOpenGLPolyDataMapper ()
 ~vtkOpenGLPolyDataMapper ()
void DrawPoints (int idx, vtkPoints *p, vtkDataArray *n, vtkUnsignedCharArray *c, vtkDataArray *t, vtkIdType &cellNum, int &noAbort, vtkCellArray *ca, vtkRenderer *ren)
void DrawLines (int idx, vtkPoints *p, vtkDataArray *n, vtkUnsignedCharArray *c, vtkDataArray *t, vtkIdType &cellNum, int &noAbort, vtkCellArray *ca, vtkRenderer *ren)
void DrawPolygons (int idx, vtkPoints *p, vtkDataArray *n, vtkUnsignedCharArray *c, vtkDataArray *t, vtkIdType &cellNum, int &noAbort, GLenum rep, vtkCellArray *ca, vtkRenderer *ren)
void DrawTStrips (int idx, vtkPoints *p, vtkDataArray *n, vtkUnsignedCharArray *c, vtkDataArray *t, vtkIdType &cellNum, int &noAbort, GLenum rep, vtkCellArray *ca, vtkRenderer *ren)
virtual vtkObjectBaseNewInstanceInternal () const
 vtkOpenGLPolyDataMapper ()
 ~vtkOpenGLPolyDataMapper ()
virtual void ComputeBounds ()
virtual void UpdateShader (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual bool GetNeedToRebuildShader (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual void SetMapperShaderParameters (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual void SetLightingShaderParameters (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual void SetCameraShaderParameters (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual void SetPropertyShaderParameters (vtkgl::CellBO &cellBO, vtkRenderer *ren, vtkActor *act)
virtual void UpdateBufferObjects (vtkRenderer *ren, vtkActor *act)
virtual bool GetNeedToRebuildBufferObjects (vtkRenderer *ren, vtkActor *act)
virtual void BuildBufferObjects (vtkRenderer *ren, vtkActor *act)
bool IsShaderVariableUsed (const char *)
virtual void BuildShader (std::string &VertexCode, std::string &fragmentCode, std::string &geometryCode, int lightComplexity, vtkRenderer *ren, vtkActor *act)
virtual void GetShaderTemplate (std::string &VertexCode, std::string &fragmentCode, std::string &geometryCode, int lightComplexity, vtkRenderer *ren, vtkActor *act)
virtual void ReplaceShaderValues (std::string &VertexCode, std::string &fragmentCode, std::string &geometryCode, int lightComplexity, vtkRenderer *ren, vtkActor *act)
virtual void ReplaceShaderColorMaterialValues (std::string &VertexCode, std::string &fragmentCode, std::string &geometryCode, int lightComplexity, vtkRenderer *ren, vtkActor *act)

Protected Attributes

vtkIdType TotalCells
int ListId
vtkOpenGLTextureInternalColorTexture
vtkgl::BufferObject VBO
vtkgl::VBOLayout Layout
vtkgl::CellBO Points
vtkgl::CellBO Lines
vtkgl::CellBO Tris
vtkgl::CellBO TriStrips
vtkgl::CellBO TrisEdges
vtkgl::CellBO TriStripsEdges
vtkgl::CellBOLastBoundBO
bool DrawingEdges
int LastLightComplexity
vtkTimeStamp LightComplexityChanged
bool LastSelectionState
vtkTimeStamp SelectionStateChanged
int LastDepthPeeling
vtkTimeStamp DepthPeelingChanged
bool UsingScalarColoring
vtkTimeStamp VBOBuildTime
int PopulateSelectionSettings
int pickingAttributeIDOffset
vtkMatrix4x4TempMatrix4
vtkMatrix3x3TempMatrix3
std::vector< std::string > ShaderVariablesUsed

Detailed Description

a PolyDataMapper for the OpenGL library

PolyDataMapper using OpenGL to render.

vtkOpenGLPolyDataMapper is a subclass of vtkPolyDataMapper. vtkOpenGLPolyDataMapper is a geometric PolyDataMapper for the OpenGL rendering library.

Deprecated:
Replaced by vtkPainterPolyDataMapper as of VTK 6.2.
@par      Events:
          vtkCommand::StartEvent vtkCommand::EndEvent

PolyDataMapper that uses a OpenGL to do the actual rendering.

Events:
vtkCommand::StartEvent vtkCommand::EndEvent

Definition at line 42 of file vtkOpenGLPolyDataMapper.h.


Member Typedef Documentation


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

static int vtkOpenGLPolyDataMapper::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual int vtkOpenGLPolyDataMapper::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual vtkObjectBase* vtkOpenGLPolyDataMapper::NewInstanceInternal ( ) const [protected, virtual]
virtual void vtkOpenGLPolyDataMapper::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual void vtkOpenGLPolyDataMapper::RenderPiece ( vtkRenderer ren,
vtkActor a 
) [virtual]

Implement superclass render method.

Implements vtkPolyDataMapper.

Reimplemented in vtkCompositePolyDataMapper2.

Release any graphics resources that are being consumed by this mapper. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkMapper.

virtual int vtkOpenGLPolyDataMapper::Draw ( vtkRenderer ren,
vtkActor a 
) [virtual]

Draw method for OpenGL.

void vtkOpenGLPolyDataMapper::DrawPoints ( int  idx,
vtkPoints p,
vtkDataArray n,
vtkUnsignedCharArray c,
vtkDataArray t,
vtkIdType cellNum,
int noAbort,
vtkCellArray ca,
vtkRenderer ren 
) [protected]
void vtkOpenGLPolyDataMapper::DrawLines ( int  idx,
vtkPoints p,
vtkDataArray n,
vtkUnsignedCharArray c,
vtkDataArray t,
vtkIdType cellNum,
int noAbort,
vtkCellArray ca,
vtkRenderer ren 
) [protected]
void vtkOpenGLPolyDataMapper::DrawPolygons ( int  idx,
vtkPoints p,
vtkDataArray n,
vtkUnsignedCharArray c,
vtkDataArray t,
vtkIdType cellNum,
int noAbort,
GLenum  rep,
vtkCellArray ca,
vtkRenderer ren 
) [protected]
void vtkOpenGLPolyDataMapper::DrawTStrips ( int  idx,
vtkPoints p,
vtkDataArray n,
vtkUnsignedCharArray c,
vtkDataArray t,
vtkIdType cellNum,
int noAbort,
GLenum  rep,
vtkCellArray ca,
vtkRenderer ren 
) [protected]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

static int vtkOpenGLPolyDataMapper::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual int vtkOpenGLPolyDataMapper::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual vtkObjectBase* vtkOpenGLPolyDataMapper::NewInstanceInternal ( ) const [protected, virtual]
void vtkOpenGLPolyDataMapper::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkCompositePolyDataMapper2, vtkOpenGLGlyph3DHelper, vtkOpenGLSphereMapper, and vtkOpenGLStickMapper.

virtual void vtkOpenGLPolyDataMapper::RenderPiece ( vtkRenderer ren,
vtkActor act 
) [virtual]

Implemented by sub classes. Actual rendering is done here.

Implements vtkPolyDataMapper.

Reimplemented in vtkCompositePolyDataMapper2.

virtual void vtkOpenGLPolyDataMapper::RenderPieceStart ( vtkRenderer ren,
vtkActor act 
) [virtual]

Implemented by sub classes. Actual rendering is done here.

virtual void vtkOpenGLPolyDataMapper::RenderPieceDraw ( vtkRenderer ren,
vtkActor act 
) [virtual]

Implemented by sub classes. Actual rendering is done here.

Reimplemented in vtkOpenGLStickMapper, vtkOpenGLSphereMapper, and vtkCompositePolyDataMapper2.

virtual void vtkOpenGLPolyDataMapper::RenderPieceFinish ( vtkRenderer ren,
vtkActor act 
) [virtual]

Implemented by sub classes. Actual rendering is done here.

virtual void vtkOpenGLPolyDataMapper::RenderEdges ( vtkRenderer ren,
vtkActor act 
) [virtual]

Implemented by sub classes. Actual rendering is done here.

Reimplemented in vtkCompositePolyDataMapper2.

Release any graphics resources that are being consumed by this mapper. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkMapper.

Definition at line 58 of file vtkOpenGLPolyDataMapper.h.

virtual bool vtkOpenGLPolyDataMapper::GetSupportsSelection ( ) [inline, virtual]

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Used by vtkHardwareSelector to determine if the prop supports hardware selection.

Reimplemented from vtkMapper.

Definition at line 64 of file vtkOpenGLPolyDataMapper.h.

virtual bool vtkOpenGLPolyDataMapper::GetIsOpaque ( ) [virtual]

Returns if the mapper does not expect to have translucent geometry. This may happen when using ScalarMode is set to not map scalars i.e. render the scalar array directly as colors and the scalar array has opacity i.e. alpha component. Note that even if this method returns true, an actor may treat the geometry as translucent since a constant translucency is set on the property, for example. Overridden to use the actual data and ScalarMode to determine if we have opaque geometry.

Reimplemented from vtkMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, and vtkCompositePolyDataMapper2.

virtual vtkIdType vtkOpenGLPolyDataMapper::GetConvertedPickValue ( vtkIdType  idIn,
int  fieldassociation,
vtkActor act 
) [virtual]

Props may provide a mapping from picked value to actual value This is useful for hardware based pickers where there is a mapping between the color in the buffer and the actual pick value

virtual void vtkOpenGLPolyDataMapper::ComputeBounds ( ) [protected, virtual]

Called in GetBounds(). When this method is called, the consider the input to be updated depending on whether this->Static is set or not. This method simply obtains the bounds from the data-object and returns it.

Reimplemented from vtkPolyDataMapper.

Reimplemented in vtkGenericCompositePolyDataMapper2, and vtkCompositePolyDataMapper2.

virtual void vtkOpenGLPolyDataMapper::UpdateShader ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Make sure an appropriate shader is defined, compiled and bound. This method orchistrates the process, much of the work is done in other methods

virtual bool vtkOpenGLPolyDataMapper::GetNeedToRebuildShader ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Does the shader source need to be recomputed

virtual void vtkOpenGLPolyDataMapper::BuildShader ( std::string &  VertexCode,
std::string &  fragmentCode,
std::string &  geometryCode,
int  lightComplexity,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Build the shader source code, called by UpdateShader

virtual void vtkOpenGLPolyDataMapper::GetShaderTemplate ( std::string &  VertexCode,
std::string &  fragmentCode,
std::string &  geometryCode,
int  lightComplexity,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Create the basic shaders before replacement

Reimplemented in vtkOpenGLGlyph3DHelper, vtkOpenGLStickMapper, and vtkOpenGLSphereMapper.

virtual void vtkOpenGLPolyDataMapper::ReplaceShaderValues ( std::string &  VertexCode,
std::string &  fragmentCode,
std::string &  geometryCode,
int  lightComplexity,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Perform string replacments on the shader templates

Reimplemented in vtkOpenGLGlyph3DHelper, vtkOpenGLStickMapper, and vtkOpenGLSphereMapper.

virtual void vtkOpenGLPolyDataMapper::ReplaceShaderColorMaterialValues ( std::string &  VertexCode,
std::string &  fragmentCode,
std::string &  geometryCode,
int  lightComplexity,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Perform string replacments on the shader templates, called from ReplaceShaderValues

virtual void vtkOpenGLPolyDataMapper::SetMapperShaderParameters ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Set the shader parameteres related to the mapper/input data, called by UpdateShader

Reimplemented in vtkOpenGLGlyph3DHelper, vtkOpenGLStickMapper, and vtkOpenGLSphereMapper.

virtual void vtkOpenGLPolyDataMapper::SetLightingShaderParameters ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Set the shader parameteres related to lighting, called by UpdateShader

virtual void vtkOpenGLPolyDataMapper::SetCameraShaderParameters ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Set the shader parameteres related to the Camera, called by UpdateShader

Reimplemented in vtkOpenGLGlyph3DHelper, vtkOpenGLStickMapper, and vtkOpenGLSphereMapper.

virtual void vtkOpenGLPolyDataMapper::SetPropertyShaderParameters ( vtkgl::CellBO cellBO,
vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Set the shader parameteres related to the property, called by UpdateShader

Reimplemented in vtkOpenGLGlyph3DHelper.

virtual void vtkOpenGLPolyDataMapper::UpdateBufferObjects ( vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Update the VBO/IBO to be current

virtual bool vtkOpenGLPolyDataMapper::GetNeedToRebuildBufferObjects ( vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Does the VBO/IBO need to be rebuilt

Reimplemented in vtkOpenGLStickMapper, and vtkOpenGLSphereMapper.

virtual void vtkOpenGLPolyDataMapper::BuildBufferObjects ( vtkRenderer ren,
vtkActor act 
) [protected, virtual]

Build the VBO/IBO, called by UpdateBufferObjects

Reimplemented in vtkOpenGLStickMapper, vtkOpenGLSphereMapper, and vtkCompositePolyDataMapper2.

bool vtkOpenGLPolyDataMapper::IsShaderVariableUsed ( const char *  ) [protected]

Member Data Documentation

Definition at line 106 of file vtkOpenGLPolyDataMapper.h.

Definition at line 107 of file vtkOpenGLPolyDataMapper.h.

Definition at line 108 of file vtkOpenGLPolyDataMapper.h.

Definition at line 79 of file vtkOpenGLPolyDataMapper.h.

Definition at line 167 of file vtkOpenGLPolyDataMapper.h.

Definition at line 168 of file vtkOpenGLPolyDataMapper.h.

Definition at line 171 of file vtkOpenGLPolyDataMapper.h.

Definition at line 172 of file vtkOpenGLPolyDataMapper.h.

Definition at line 173 of file vtkOpenGLPolyDataMapper.h.

Definition at line 174 of file vtkOpenGLPolyDataMapper.h.

Definition at line 175 of file vtkOpenGLPolyDataMapper.h.

Definition at line 176 of file vtkOpenGLPolyDataMapper.h.

Definition at line 177 of file vtkOpenGLPolyDataMapper.h.

Definition at line 178 of file vtkOpenGLPolyDataMapper.h.

Definition at line 181 of file vtkOpenGLPolyDataMapper.h.

Definition at line 182 of file vtkOpenGLPolyDataMapper.h.

Definition at line 184 of file vtkOpenGLPolyDataMapper.h.

Definition at line 185 of file vtkOpenGLPolyDataMapper.h.

Definition at line 187 of file vtkOpenGLPolyDataMapper.h.

Definition at line 188 of file vtkOpenGLPolyDataMapper.h.

Definition at line 190 of file vtkOpenGLPolyDataMapper.h.

Definition at line 191 of file vtkOpenGLPolyDataMapper.h.

Definition at line 194 of file vtkOpenGLPolyDataMapper.h.

Definition at line 195 of file vtkOpenGLPolyDataMapper.h.

Definition at line 197 of file vtkOpenGLPolyDataMapper.h.

Definition at line 198 of file vtkOpenGLPolyDataMapper.h.

std::vector<std::string> vtkOpenGLPolyDataMapper::ShaderVariablesUsed [protected]

Definition at line 206 of file vtkOpenGLPolyDataMapper.h.


The documentation for this class was generated from the following files: