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 =========================================================================*/
27 #ifndef vtkPistonMapper_h
28 #define vtkPistonMapper_h
29 
30 #include "vtkAcceleratorsPistonModule.h" // For export macro
31 #include "vtkMapper.h"
32 
33 class vtkActor;
34 class vtkRenderer;
37 class vtkRenderWindow;
38 class vtkWindow;
39 
40 class VTKACCELERATORSPISTON_EXPORT vtkPistonMapper : public vtkMapper
41 {
42 public:
43  static vtkPistonMapper *New();
44  vtkTypeMacro(vtkPistonMapper,vtkMapper);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
51  static void InitCudaGL(vtkRenderWindow *rw);
52 
56  inline static bool IsEnabledCudaGL()
57  {
58  return CudaGLInitted;
59  }
60 
65  vtkPistonDataObject *GetPistonDataObjectInput(int port);
66 
71 
76  virtual void Render(vtkRenderer *ren, vtkActor *a);
77 
84 
86 
90  virtual double *GetBounds();
91  virtual void GetBounds(double bounds[6])
92  {this->vtkAbstractMapper3D::GetBounds(bounds);};
94 
101  virtual bool GetSupportsSelection()
102  { return false; }
103 
105 
109  virtual void Update();
110  // Use the other overloads of Update.
111  using vtkAlgorithm::Update;
113 
115 
118  vtkSetMacro(Piece, int);
119  vtkGetMacro(Piece, int);
120  vtkSetMacro(NumberOfPieces, int);
121  vtkGetMacro(NumberOfPieces, int);
123 
125 
128  vtkSetMacro(GhostLevel, int);
129  vtkGetMacro(GhostLevel, int);
131 
132 protected:
133  vtkPistonMapper();
134  ~vtkPistonMapper();
135 
140 
142 
145  void RenderOnCPU();
146  void RenderOnGPU();
147  void RenderImageDataOutline();
149 
150  int Piece;
153 
154 private:
155  vtkPistonMapper(const vtkPistonMapper&) VTK_DELETE_FUNCTION;
156  void operator=(const vtkPistonMapper&) VTK_DELETE_FUNCTION;
157 
161  void PrepareDirectRenderBuffers(int nPoints);
162 
163  static bool CudaGLInitted;
164 
165  class InternalInfo;
166  InternalInfo *Internal;
167 };
168 
169 #endif
draws vtkPistonDataObjects to the screen
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Store vtkAlgorithm input/output information.
A GPU resident data set.
abstract specification for renderers
Definition: vtkRenderer.h:63
static bool IsEnabledCudaGL()
Return true if using cuda interop feature otherwise false.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void GetBounds(double bounds[6])
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
virtual void Update()
Bring this algorithm's outputs up-to-date.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:91
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
abstract class specifies interface to map data
create a window for renderers to draw into
Color Mapping for piston results.
virtual double * GetBounds()
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax, zmin,zmax).
static vtkAlgorithm * New()
virtual void Render(vtkRenderer *ren, vtkActor *a)=0
Method initiates the mapping process.