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 
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:
135 
140 
142 
145  void RenderOnCPU();
146  void RenderOnGPU();
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
virtual double * GetBounds()=0
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
abstract class specifies interface to map data
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
virtual void Update()
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:92
A GPU resident data set.
draws vtkPistonDataObjects to the screen
void RenderImageDataOutline()
static void InitCudaGL(vtkRenderWindow *rw)
Manually call this before any cuda filters are created to use direct GPU rendering.
static bool IsEnabledCudaGL()
Return true if using cuda interop feature otherwise false.
virtual bool GetSupportsSelection()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual double * GetBounds()
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
void RenderOnCPU()
Internal render methods.
vtkPistonDataObject * GetPistonDataObjectInput(int port)
A convenience method to reduce code duplication that gets the input as the expected type or NULL.
void ShallowCopy(vtkAbstractMapper *m)
Make a shallow copy of this mapper.
virtual void GetBounds(double bounds[6])
Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
static vtkPistonMapper * New()
virtual void Update()
Bring this algorithm's outputs up-to-date.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Overridden to say that we take in vtkPistonDataObjects.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Render(vtkRenderer *ren, vtkActor *a)
Method initiates the mapping process.
virtual void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this mapper.
Color Mapping for piston results.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.