forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkOSPRayActorNode.h
105 lines (86 loc) · 3.12 KB
/
vtkOSPRayActorNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*=========================================================================
Program: Visualization Toolkit
Module: vtkOSPRayActorNode.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkOSPRayActorNode
* @brief links vtkActor and vtkMapper to OSPRay
*
* Translates vtkActor/Mapper state into OSPRay rendering calls
*/
#ifndef vtkOSPRayActorNode_h
#define vtkOSPRayActorNode_h
#include "vtkRenderingOSPRayModule.h" // For export macro
#include "vtkActorNode.h"
#include "vtkTimeStamp.h" //for mapper changed time
#include "vtkWeakPointer.h" //also for mapper changed time
class vtkActor;
class vtkCompositeDataDisplayAttributes;
class vtkDataArray;
class vtkInformationIntegerKey;
class vtkInformationObjectBaseKey;
class vtkInformationStringKey;
class vtkMapper;
class vtkPiecewiseFunction;
class vtkPolyData;
class vtkTimeStamp;
class VTKRENDERINGOSPRAY_EXPORT vtkOSPRayActorNode :
public vtkActorNode
{
public:
static vtkOSPRayActorNode* New();
vtkTypeMacro(vtkOSPRayActorNode, vtkActorNode);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Overridden to take into account my renderables time, including
* mapper and data into mapper inclusive of composite input
*/
virtual vtkMTimeType GetMTime() VTK_OVERRIDE;
/**
* When added to the mapper, enables scale array and scale function.
*/
static vtkInformationIntegerKey* ENABLE_SCALING();
//@{
/**
* Convenience method to set enabled scaling on my renderable.
*/
static void SetEnableScaling(int value, vtkActor *);
static int GetEnableScaling(vtkActor *);
//@}
/**
* Name of a point aligned, single component wide, double valued array that,
* when added to the mapper, will be used to scale each element in the
* sphere and cylinder representations individually.
* When not supplied the radius is constant across all elements and
* is a function of the Mapper's PointSize and LineWidth.
*/
static vtkInformationStringKey* SCALE_ARRAY_NAME();
/**
* Convenience method to set a scale array on my renderable.
*/
static void SetScaleArrayName(const char *scaleArrayName, vtkActor *);
/**
* A piecewise function for values from the scale array that alters the resulting
* radii arbitrarily
*/
static vtkInformationObjectBaseKey* SCALE_FUNCTION();
/**
* Convenience method to set a scale function on my renderable.
*/
static void SetScaleFunction(vtkPiecewiseFunction *scaleFunction, vtkActor *);
protected:
vtkOSPRayActorNode();
~vtkOSPRayActorNode();
private:
vtkOSPRayActorNode(const vtkOSPRayActorNode&) VTK_DELETE_FUNCTION;
void operator=(const vtkOSPRayActorNode&) VTK_DELETE_FUNCTION;
vtkWeakPointer<vtkMapper> LastMapper;
vtkTimeStamp MapperChangedTime;
};
#endif