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();
43  vtkTypeMacro(vtkPistonMapper,vtkMapper);
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 
60  vtkPistonDataObject *GetPistonDataObjectInput(int port);
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:
114  vtkPistonMapper();
115  ~vtkPistonMapper();
116 
119 
121 
122  void RenderOnCPU();
123  void RenderOnGPU();
124  void RenderImageDataOutline();
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
draws vtkPistonDataObjects to the screen
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
void ShallowCopy(vtkAbstractMapper *m)
virtual bool GetSupportsSelection()
Store vtkAlgorithm input/output information.
A GPU resident data set.
abstract specification for renderers
Definition: vtkRenderer.h:62
static bool IsEnabledCudaGL()
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
virtual void ReleaseGraphicsResources(vtkWindow *)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void GetBounds(double bounds[6])
void PrintSelf(ostream &os, vtkIndent indent)
virtual double * GetBounds()=0
virtual void Update()
virtual int FillInputPortInformation(int port, vtkInformation *info)
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:89
abstract class specifies interface to map data
create a window for renderers to draw into
Color Mapping for piston results.
virtual double * GetBounds()
static vtkAlgorithm * New()
virtual void Render(vtkRenderer *ren, vtkActor *a)=0