VTK
vtkPistonMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPistonMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkPistonMapper_h
27 #define vtkPistonMapper_h
28 
29 #include "vtkAcceleratorsPistonModule.h" // For export macro
30 #include "vtkMapper.h"
31 
32 class vtkActor;
33 class vtkRenderer;
36 class vtkRenderWindow;
37 class vtkWindow;
38 
39 class VTKACCELERATORSPISTON_EXPORT vtkPistonMapper : public vtkMapper
40 {
41 public:
42  static vtkPistonMapper *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
48  static void InitCudaGL(vtkRenderWindow *rw);
49 
51 
52  inline static bool IsEnabledCudaGL()
53  {
54  return CudaGLInitted;
55  }
57 
61 
64 
67  virtual void Render(vtkRenderer *ren, vtkActor *a);
68 
73 
75 
77  virtual double *GetBounds();
78  virtual void GetBounds(double bounds[6])
79  {this->vtkAbstractMapper3D::GetBounds(bounds);};
81 
83 
87  virtual bool GetSupportsSelection()
88  { return false; }
90 
92 
94  virtual void Update();
95  // Use the other overloads of Update.
98 
100 
101  vtkSetMacro(Piece, int);
102  vtkGetMacro(Piece, int);
103  vtkSetMacro(NumberOfPieces, int);
104  vtkGetMacro(NumberOfPieces, int);
106 
108 
109  vtkSetMacro(GhostLevel, int);
110  vtkGetMacro(GhostLevel, int);
112 
113 protected:
116 
119 
121 
122  void RenderOnCPU();
123  void RenderOnGPU();
126 
127  int Piece;
130 
131 private:
132  vtkPistonMapper(const vtkPistonMapper&); // Not implemented.
133  void operator=(const vtkPistonMapper&); // Not implemented.
134 
136  void PrepareDirectRenderBuffers(int nPoints);
137 
138  static bool CudaGLInitted;
139 
140  class InternalInfo;
141  InternalInfo *Internal;
142 };
143 
144 #endif
vtkAbstractMapper3D::GetBounds
virtual double * GetBounds()=0
vtkPistonDataObject
A GPU resident data set.
Definition: vtkPistonDataObject.h:42
vtkgl::m
const GLfloat * m
Definition: vtkgl.h:18169
vtkPistonMapper::~vtkPistonMapper
~vtkPistonMapper()
vtkPistonMapper::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkPistonMapper::Update
virtual void Update()
vtkPistonScalarsColors
Color Mapping for piston results.
Definition: vtkPistonScalarsColors.h:34
vtkPistonMapper::Render
virtual void Render(vtkRenderer *ren, vtkActor *a)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPistonMapper::GetPistonDataObjectInput
vtkPistonDataObject * GetPistonDataObjectInput(int port)
vtkPistonMapper::RenderImageDataOutline
void RenderImageDataOutline()
vtkPistonMapper::Piece
int Piece
Definition: vtkPistonMapper.h:127
vtkPistonMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkPistonMapper::vtkPistonMapper
vtkPistonMapper()
vtkMapper.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkMapper
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:90
vtkAlgorithm::Update
virtual void Update()
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkPistonMapper::ShallowCopy
void ShallowCopy(vtkAbstractMapper *m)
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkPistonMapper::GhostLevel
int GhostLevel
Definition: vtkPistonMapper.h:129
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkPistonMapper::GetBounds
virtual double * GetBounds()
vtkPistonMapper::RenderOnGPU
void RenderOnGPU()
vtkPistonMapper::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkPistonMapper.h:72
vtkPistonMapper::NumberOfPieces
int NumberOfPieces
Definition: vtkPistonMapper.h:128
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:89
vtkPistonMapper::IsEnabledCudaGL
static bool IsEnabledCudaGL()
Definition: vtkPistonMapper.h:52
vtkPistonMapper::New
static vtkPistonMapper * New()
vtkPistonMapper::GetSupportsSelection
virtual bool GetSupportsSelection()
Definition: vtkPistonMapper.h:87
vtkPistonMapper::InitCudaGL
static void InitCudaGL(vtkRenderWindow *rw)
vtkPistonMapper::RenderOnCPU
void RenderOnCPU()
vtkPistonMapper::GetBounds
virtual void GetBounds(double bounds[6])
Definition: vtkPistonMapper.h:78
vtkAbstractMapper
abstract class specifies interface to map data
Definition: vtkAbstractMapper.h:52
vtkPistonMapper
draws vtkPistonDataObjects to the screen
Definition: vtkPistonMapper.h:40