33 #ifndef vtkParallelRenderManager_h
34 #define vtkParallelRenderManager_h
37 #include "vtkRenderingParallelModule.h"
39 VTK_ABI_NAMESPACE_BEGIN
94 virtual void InitializePieces();
103 virtual void InitializeOffScreen();
111 virtual void StartInteractor();
117 virtual void StartServices();
122 virtual void StopServices();
128 virtual void StartRender();
129 virtual void EndRender();
130 virtual void SatelliteStartRender();
131 virtual void SatelliteEndRender();
132 virtual void RenderRMI();
134 virtual void ResetCameraClippingRange(
vtkRenderer* ren);
135 virtual void ComputeVisiblePropBoundsRMI(
int renderId);
138 virtual void InitializeRMIs();
145 virtual void ResetAllCameras();
150 virtual void ComputeVisiblePropBounds(
vtkRenderer* ren,
double bounds[6]);
159 vtkSetMacro(ParallelRendering,
int);
160 vtkGetMacro(ParallelRendering,
int);
161 vtkBooleanMacro(ParallelRendering,
int);
171 vtkSetMacro(RenderEventPropagation,
int);
172 vtkGetMacro(RenderEventPropagation,
int);
173 vtkBooleanMacro(RenderEventPropagation,
int);
196 vtkSetMacro(UseCompositing,
int);
197 vtkGetMacro(UseCompositing,
int);
198 vtkBooleanMacro(UseCompositing,
int);
215 virtual void SetImageReductionFactor(
double factor);
216 vtkGetMacro(ImageReductionFactor,
double);
219 vtkSetMacro(MaxImageReductionFactor,
double);
220 vtkGetMacro(MaxImageReductionFactor,
double);
228 virtual void SetImageReductionFactorForUpdateRate(
double DesiredUpdateRate);
236 vtkSetMacro(AutoImageReductionFactor,
int);
237 vtkGetMacro(AutoImageReductionFactor,
int);
238 vtkBooleanMacro(AutoImageReductionFactor,
int);
245 vtkGetMacro(RenderTime,
double);
246 vtkGetMacro(ImageProcessingTime,
double);
259 vtkGetMacro(SyncRenderWindowRenderers,
int);
260 vtkSetMacro(SyncRenderWindowRenderers,
int);
261 vtkBooleanMacro(SyncRenderWindowRenderers,
int);
264 virtual void RemoveAllRenderers();
277 vtkSetMacro(WriteBackImages,
int);
278 vtkGetMacro(WriteBackImages,
int);
279 vtkBooleanMacro(WriteBackImages,
int);
288 vtkSetMacro(MagnifyImages,
int);
289 vtkGetMacro(MagnifyImages,
int);
290 vtkBooleanMacro(MagnifyImages,
int);
305 virtual void SetMagnifyImageMethod(
int method);
306 vtkGetMacro(MagnifyImageMethod,
int);
317 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
320 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
323 const int fullImageViewport[4] =
nullptr,
const int reducedImageViewport[4] =
nullptr);
354 vtkGetVector2Macro(FullImageSize,
int);
360 vtkGetVector2Macro(ReducedImageSize,
int);
367 void TileWindows(
int xsize,
int ysize,
int nColumns);
374 vtkSetMacro(UseRGBA,
int);
375 vtkGetMacro(UseRGBA,
int);
383 vtkSetMacro(ForceRenderWindowSize,
int);
384 vtkGetMacro(ForceRenderWindowSize,
int);
392 vtkSetVector2Macro(ForcedRenderWindowSize,
int);
393 vtkGetVector2Macro(ForcedRenderWindowSize,
int);
398 RENDER_RMI_TAG = 34532,
399 COMPUTE_VISIBLE_PROP_BOUNDS_RMI_TAG = 54636,
400 WIN_INFO_TAG = 87834,
401 REN_INFO_TAG = 87836,
402 LIGHT_INFO_TAG = 87838,
417 vtkSetMacro(UseBackBuffer,
int);
418 vtkGetMacro(UseBackBuffer,
int);
419 vtkBooleanMacro(UseBackBuffer,
int);
428 vtkSetMacro(SynchronizeTileProperties,
int);
429 vtkGetMacro(SynchronizeTileProperties,
int);
430 vtkBooleanMacro(SynchronizeTileProperties,
int);
439 virtual void GenericStartRenderCallback();
440 virtual void GenericEndRenderCallback();
451 void AddRenderWindowEventHandlers();
452 void RemoveRenderWindowEventHandlers();
462 int ForcedRenderWindowSize[2];
493 int FullImageSize[2];
494 int ReducedImageSize[2];
551 virtual void PreRenderProcessing() = 0;
552 virtual void PostRenderProcessing() = 0;
559 virtual void SetRenderWindowSize();
566 virtual void LocalComputeVisiblePropBounds(
vtkRenderer* ren,
double bounds[6]);
571 virtual void MagnifyReducedImage();
576 virtual void WriteFullImage();
581 virtual void ReadReducedImage();
587 virtual int LastRenderInFrontBuffer();
592 virtual int ChooseBuffer();
597 virtual void SetRenderWindowPixelData(
vtkUnsignedCharArray* pixels,
const int pixelDimensions[2]);
616 double TileViewport[4];
629 int NumberOfLights = 0;
630 double Viewport[4] = { 0., 0., 0., 0. };
631 double CameraPosition[3] = { 0., 0., 0. };
632 double CameraFocalPoint[3] = { 0., 0., 0. };
633 double CameraViewUp[3] = { 0., 0., 0. };
634 double WindowCenter[2] = { 0., 0. };
635 double CameraClippingRange[2] = { 0., 0. };
636 double CameraViewAngle = 0.;
638 double Background2[3] = { 0., 0., 0. };
639 bool GradientBackground =
false;
641 double ParallelScale = 0.;
654 double FocalPoint[3];
677 VTK_ABI_NAMESPACE_END
678 #endif // vtkParalleRenderManager_h
vtkUnsignedCharArray * FullImage
virtual bool ProcessWindowInformation(vtkMultiProcessStream &)
vtkMultiProcessController * Controller
virtual bool ProcessRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
abstract base class for most VTK objects
virtual int CheckForAbortComposite()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
stream used to pass data across processes using vtkMultiProcessController.
vtkUnsignedCharArray * ReducedImage
An object to control parallel rendering.
struct Position_t Position
int RenderWindowImageUpToDate
unsigned long EndRenderTag
unsigned long BoundsRMIId
int SyncRenderWindowRenderers
unsigned long StartRenderTag
double AverageTimePerPixel
Used by SetImageReductionFactorForUpdateRate to smooth transitions transitions between image reductio...
abstract specification for renderers
virtual void SendRendererInformation(vtkRenderer *)
static void SetDefaultRenderEventPropagation(bool val)
Get/Set the default value used for RenderEventPropagation when a new instance of vtkParallelRenderMan...
void SetMagnifyImageMethodToNearest()
Sets the method used to magnify images.
unsigned long AbortRenderCheckTag
double ImageReductionFactor
vtkDoubleArray * Viewports
dynamic, self-adjusting array of double
Timer support and logging.
int ObservingRenderWindow
an ordered list of renderers
virtual void CollectWindowInformation(vtkMultiProcessStream &)
Subclass should override these methods (instead of SendWindowInformation/ReceiveWindowInformation or ...
a simple class to control print indentation
double ImageProcessingTime
int ForceRenderWindowSize
vtkRenderWindow * RenderWindow
virtual void ReceiveRendererInformation(vtkRenderer *)
virtual void CheckForAbortRender()
virtual void ReceiveWindowInformation()
dynamic, self-adjusting array of unsigned char
static bool GetDefaultRenderEventPropagation()
create a window for renderers to draw into
virtual void SendWindowInformation()
Used to synchronize rendering information per frame.
int RootProcessId
The "root" node's process id.
unsigned long RenderRMIId
int AutoImageReductionFactor
unsigned long ResetCameraClippingRangeTag
double MaxImageReductionFactor
void SetMagnifyImageMethodToLinear()
Sets the method used to magnify images.
unsigned long ResetCameraTag
static bool DefaultRenderEventPropagation
int SynchronizeTileProperties
vtkRendererCollection * Renderers
int RenderEventPropagation
virtual void CollectRendererInformation(vtkRenderer *, vtkMultiProcessStream &)
virtual int ImageReduceRenderer(vtkRenderer *)
Returns true if the image for the given renderer should be rendered at a reduced size to be magnified...
Multiprocessing communication superclass.
double ImageReductionFactor