VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
63  void ShallowCopy(vtkAbstractMapper *m);
64 
67  virtual void Render(vtkRenderer *ren, vtkActor *a);
68 
72  virtual void ReleaseGraphicsResources(vtkWindow *) {};
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 
93  virtual void Update();
94 
96 
97  vtkSetMacro(Piece, int);
98  vtkGetMacro(Piece, int);
99  vtkSetMacro(NumberOfPieces, int);
100  vtkGetMacro(NumberOfPieces, int);
102 
104 
105  vtkSetMacro(GhostLevel, int);
106  vtkGetMacro(GhostLevel, int);
108 
109 protected:
110  vtkPistonMapper();
111  ~vtkPistonMapper();
112 
114  virtual int FillInputPortInformation(int port, vtkInformation* info);
115 
117 
118  void RenderOnCPU();
119  void RenderOnGPU();
120  void RenderImageDataOutline();
122 
123  int Piece;
126 
127 private:
128  vtkPistonMapper(const vtkPistonMapper&); // Not implemented.
129  void operator=(const vtkPistonMapper&); // Not implemented.
130 
132  void PrepareDirectRenderBuffers(int nPoints);
133 
134  static bool CudaGLInitted;
135 
136  class InternalInfo;
137  InternalInfo *Internal;
138 };
139 
140 #endif
draws vtkPistonDataObjects to the screen
virtual bool GetSupportsSelection()
Store vtkAlgorithm input/output information.
A GPU resident data set.
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])
Color Mapping for piston results.