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
33class vtkActor;
34class vtkRenderer;
37class vtkRenderWindow;
38class vtkWindow;
39
40class VTKACCELERATORSPISTON_EXPORT vtkPistonMapper : public vtkMapper
41{
42public:
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.
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
132protected:
135
140
142
149
150 int Piece;
153
154private:
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...
void RenderOnCPU()
Internal render methods.
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).
virtual void Update()
Bring this algorithm's outputs up-to-date.
virtual double * GetBounds()
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
virtual int FillInputPortInformation(int port, vtkInformation *info)
Overridden to say that we take in vtkPistonDataObjects.
static vtkPistonMapper * New()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPistonDataObject * GetPistonDataObjectInput(int port)
A convenience method to reduce code duplication that gets the input as the expected type or NULL.
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.