27 #ifndef vtkPVRenderView_h 28 #define vtkPVRenderView_h 30 #include "vtkBoundingBox.h" 32 #include "vtkPVClientServerCoreRenderingModule.h" 34 #include "vtkSmartPointer.h" 36 class vtkAlgorithmOutput;
39 class vtkExtentTranslator;
42 class vtkInformationDoubleKey;
43 class vtkInformationDoubleVectorKey;
44 class vtkInformationIntegerKey;
45 class vtkInteractorStyleDrawPolygon;
46 class vtkInteractorStyleRubberBand3D;
47 class vtkInteractorStyleRubberBandZoom;
61 class vtkRenderViewBase;
62 class vtkRenderWindow;
63 class vtkRenderWindowInteractor;
65 class vtkTextRepresentation;
68 class vtkWindowToImageFilter;
76 void PrintSelf(ostream& os, vtkIndent indent);
80 INTERACTION_MODE_UNINTIALIZED = -1,
81 INTERACTION_MODE_3D = 0,
85 INTERACTION_MODE_POLYGON
99 virtual void SetInteractionMode(
int mode);
100 vtkGetMacro(InteractionMode,
int);
115 virtual void SetSize(
int,
int);
125 vtkGetObjectMacro(NonCompositedRenderer, vtkRenderer);
133 DEFAULT_RENDERER = 0,
134 NON_COMPOSITED_RENDERER = 1,
142 virtual vtkRenderer* GetRenderer(
int rendererType = DEFAULT_RENDERER);
149 vtkCamera* GetActiveCamera();
150 virtual void SetActiveCamera(vtkCamera*);
156 vtkRenderWindow* GetRenderWindow();
161 vtkRenderWindowInteractor* GetInteractor();
168 virtual void SetupInteractor(vtkRenderWindowInteractor*);
183 void ResetCamera(
double bounds[6]);
208 vtkSetClampMacro(StillRenderImageReductionFactor,
int, 1, 20);
209 vtkGetMacro(StillRenderImageReductionFactor,
int);
219 vtkSetClampMacro(InteractiveRenderImageReductionFactor,
int, 1, 20);
220 vtkGetMacro(InteractiveRenderImageReductionFactor,
int);
229 vtkSetMacro(RemoteRenderingThreshold,
double);
230 vtkGetMacro(RemoteRenderingThreshold,
double);
239 vtkSetMacro(LODRenderingThreshold,
double);
240 vtkGetMacro(LODRenderingThreshold,
double);
250 vtkSetClampMacro(LODResolution,
double, 0.0, 1.0);
251 vtkGetMacro(LODResolution,
double);
261 vtkSetMacro(UseOutlineForLODRendering,
bool);
262 vtkGetMacro(UseOutlineForLODRendering,
bool);
273 void ConfigureCompressor(
const char* configuration);
279 virtual void ResetCameraClippingRange();
286 void SetUseLightKit(
bool enable);
287 vtkGetMacro(UseLightKit,
bool);
288 vtkBooleanMacro(UseLightKit,
bool);
292 void StreamingUpdate(
const double view_planes[24]);
293 void DeliverStreamedPieces(
unsigned int size,
unsigned int* representation_ids);
299 static vtkInformationIntegerKey* USE_LOD();
304 static vtkInformationDoubleKey* LOD_RESOLUTION();
310 static vtkInformationIntegerKey* USE_OUTLINE_FOR_LOD();
318 static vtkInformationIntegerKey* RENDER_EMPTY_IMAGES();
324 static vtkInformationIntegerKey* NEED_ORDERED_COMPOSITING();
330 static vtkInformationDoubleVectorKey* VIEW_PLANES();
335 static vtkInformationRequestKey* REQUEST_STREAMING_UPDATE();
340 static vtkInformationRequestKey* REQUEST_PROCESS_STREAMED_PIECE();
348 void SelectCells(
int region[4]);
349 void SelectCells(
int region0,
int region1,
int region2,
int region3)
351 int r[4] = { region0, region1, region2, region3 };
352 this->SelectCells(r);
354 void SelectPoints(
int region[4]);
357 int r[4] = { region0, region1, region2, region3 };
358 this->SelectPoints(r);
360 void Select(
int field_association,
int region[4]);
372 void SelectPolygonPoints(
int* polygon2DArray, vtkIdType arrayLen);
373 void SelectPolygonCells(
int* polygon2DArray, vtkIdType arrayLen);
374 void SelectPolygon(
int field_association,
int* polygon2DArray, vtkIdType arrayLen);
381 vtkGetObjectMacro(LastSelection, vtkSelection);
389 vtkSetMacro(UseInteractiveRenderingForScreenshots,
bool);
390 vtkBooleanMacro(UseInteractiveRenderingForScreenshots,
bool);
391 vtkGetMacro(UseInteractiveRenderingForScreenshots,
bool);
399 vtkSetMacro(UseOffscreenRenderingForScreenshots,
bool);
400 vtkBooleanMacro(UseOffscreenRenderingForScreenshots,
bool);
401 vtkGetMacro(UseOffscreenRenderingForScreenshots,
bool);
413 virtual void SetUseOffscreenRendering(
bool);
414 vtkBooleanMacro(UseOffscreenRendering,
bool);
415 vtkGetMacro(UseOffscreenRendering,
bool);
424 virtual void SetEGLDeviceIndex(
int);
425 vtkGetMacro(EGLDeviceIndex,
int);
432 vtkGetMacro(RemoteRenderingAvailable,
bool);
440 vtkGetMacro(UsedLODForLastRender,
bool);
448 void InvalidateCachedSelection();
454 double GetZbufferDataAtPoint(
int x,
int y);
463 unsigned long trueSize = 0);
466 static vtkAlgorithmOutput* GetPieceProducerLOD(
468 static void MarkAsRedistributable(
470 static void SetGeometryBounds(
471 vtkInformation* info,
double bounds[6], vtkMatrix4x4* transform = NULL);
473 static void SetNextStreamedPiece(
475 static vtkDataObject* GetCurrentStreamedPiece(
483 void SetMaxClipBounds(
double bds[6]);
490 void SetLockBounds(
bool nv);
491 vtkGetMacro(LockBounds,
bool);
499 static void SetDeliverToAllProcesses(
511 static void SetDeliverToClientAndRenderingProcesses(vtkInformation* info,
520 vtkExtentTranslator* translator,
const int whole_extents[6],
const double origin[3],
521 const double spacing[3]);
522 static void SetOrderedCompositingInformation(vtkInformation* info,
const double bounds[6]);
523 void ClearOrderedCompositingInformation();
535 static void SetRequiresDistributedRendering(
556 static void SetForceDataDistributionMode(vtkInformation* info,
int flag);
572 void SetLightSwitch(
bool enable);
573 bool GetLightSwitch();
574 vtkBooleanMacro(LightSwitch,
bool);
581 void SetShowAnnotation(
bool val);
582 vtkSetMacro(UpdateAnnotation,
bool);
589 void SetAnnotationColor(
double r,
double g,
double b);
599 virtual void SetOrientationAxesInteractivity(
bool);
600 virtual void SetOrientationAxesVisibility(
bool);
601 void SetOrientationAxesLabelColor(
double r,
double g,
double b);
602 void SetOrientationAxesOutlineColor(
double r,
double g,
double b);
606 virtual void SetCenterAxesVisibility(
bool);
610 virtual void SetCenterOfRotation(
double x,
double y,
double z);
611 virtual void SetRotationFactor(
double factor);
615 void SetKeyLightWarmth(
double val);
616 void SetKeyLightIntensity(
double val);
617 void SetKeyLightElevation(
double val);
618 void SetKeyLightAzimuth(
double val);
619 void SetFillLightWarmth(
double val);
620 void SetKeyToFillRatio(
double val);
621 void SetFillLightElevation(
double val);
622 void SetFillLightAzimuth(
double val);
623 void SetBackLightWarmth(
double val);
624 void SetKeyToBackRatio(
double val);
625 void SetBackLightElevation(
double val);
626 void SetBackLightAzimuth(
double val);
627 void SetHeadLightWarmth(
double val);
628 void SetKeyToHeadRatio(
double val);
629 void SetMaintainLuminance(
int val);
633 vtkSetMacro(UseHiddenLineRemoval,
bool)
virtual void SetUseDepthPeeling(
int val);
634 virtual void SetMaximumNumberOfPeels(
int val);
635 virtual void SetBackground(
double r,
double g,
double b);
636 virtual void SetBackground2(
double r,
double g,
double b);
637 virtual void SetBackgroundTexture(vtkTexture* val);
638 virtual void SetGradientBackground(
int val);
639 virtual void SetTexturedBackground(
int val);
643 void SetAmbientColor(
double r,
double g,
double b);
644 void SetSpecularColor(
double r,
double g,
double b);
645 void SetDiffuseColor(
double r,
double g,
double b);
646 void SetIntensity(
double val);
647 void SetLightType(
int val);
651 void SetStereoCapableWindow(
int val);
652 void SetStereoRender(
int val);
653 vtkSetMacro(StereoType,
int);
654 vtkSetMacro(ServerStereoType,
int);
655 void SetMultiSamples(
int val);
656 void SetAlphaBitPlanes(
int val);
657 void SetStencilCapable(
int val);
661 void SetParallelProjection(
int mode);
665 virtual void SetCamera2DManipulators(
const int manipulators[9]);
666 virtual void SetCamera3DManipulators(
const int manipulators[9]);
681 virtual void UpdateLOD();
689 vtkGetMacro(UseLODForInteractiveRender,
bool);
698 vtkGetMacro(UseDistributedRenderingForStillRender,
bool);
707 vtkGetMacro(UseDistributedRenderingForInteractiveRender,
bool);
716 vtkGetMacro(StillRenderProcesses, vtkTypeUInt32);
725 vtkGetMacro(InteractiveRenderProcesses, vtkTypeUInt32);
731 int GetDataDistributionMode(
bool use_remote_rendering);
743 void Deliver(
int use_lod,
unsigned int size,
unsigned int* representation_ids);
753 bool GetUseOrderedCompositing();
759 bool GetRenderEmptyImages();
765 vtkSetMacro(UseFXAA,
bool) vtkGetMacro(UseFXAA,
bool)
772 void SetFXAARelativeContrastThreshold(
double val);
773 void SetFXAAHardContrastThreshold(
double val);
774 void SetFXAASubpixelBlendLimit(
double val);
775 void SetFXAASubpixelContrastThreshold(
double val);
776 void SetFXAAUseHighQualityEndpoints(
bool val);
777 void SetFXAAEndpointSearchIterations(
int val);
797 void AddPropToRenderer(vtkProp* prop);
798 void RemovePropFromRenderer(vtkProp* prop);
807 void SetDrawCells(
bool choice);
808 void SetArrayNameToDraw(
const char* name);
809 void SetArrayNumberToDraw(
int fieldAttributeType);
810 void SetArrayComponentToDraw(
int comp);
811 void SetScalarRange(
double min,
double max);
812 void BeginValueCapture();
813 void EndValueCapture();
820 void SetValueRenderingModeCommand(
int mode);
821 int GetValueRenderingModeCommand();
833 void CaptureValuesFloat();
834 vtkFloatArray* GetCapturedValuesFloat();
842 void StartCaptureLuminance();
843 void StopCaptureLuminance();
850 void CaptureZBuffer();
851 vtkFloatArray* GetCapturedZBuffer();
858 void SetEnableOSPRay(
bool);
859 bool GetEnableOSPRay();
865 void SetShadows(
bool);
872 void SetAmbientOcclusionSamples(
int);
873 int GetAmbientOcclusionSamples();
879 void SetSamplesPerPixel(
int);
880 int GetSamplesPerPixel();
886 void SetMaxFrames(
int);
893 void SetLightScale(
double);
894 double GetLightScale();
911 virtual void RemoveRepresentationInternal(vtkDataRepresentation* rep);
917 virtual void Render(
bool interactive,
bool skip_rendering);
931 bool ShouldUseDistributedRendering(
double geometry_size,
bool using_lod);
936 bool ShouldUseLODRendering(
double geometry);
942 bool IsProcessRenderingGeometriesForCompositing(
bool using_distributed_rendering);
948 void SynchronizeGeometryBounds();
953 void SetLastSelection(vtkSelection*);
959 virtual void UpdateCenterAxes();
965 bool GetLocalProcessDoesRendering(
bool using_distributed_rendering);
971 bool TestCollaborationCounter();
977 void SynchronizeForCollaboration();
983 virtual void BuildAnnotationText(ostream& str);
990 vtkGetMacro(SynchronizationCounter,
unsigned int);
997 vtkGetMacro(MakingSelection,
bool);
1004 bool PrepareSelect(
int fieldAssociation);
1009 void PostSelect(vtkSelection* sel);
1087 bool MakingSelection;
1088 int PreviousSwapBuffers;
1089 void OnSelectionChangedEvent();
1090 void OnPolygonSelectionEvent();
1091 void FinishSelection(vtkSelection*);
1095 bool RemoteRenderingAvailable;
1098 bool DistributedRenderingRequired;
1099 bool NonDistributedRenderingRequired;
1100 bool DistributedRenderingRequiredLOD;
1101 bool NonDistributedRenderingRequiredLOD;
1104 int ParallelProjection;
1107 bool UseHiddenLineRemoval;
1110 vtkInternals* Internals;
1112 vtkNew<vtkTextRepresentation> Annotation;
1113 void UpdateAnnotationText();
1117 bool OrientationWidgetVisibility;
1120 int ServerStereoType;
1121 void UpdateStereoProperties();
1123 vtkSmartPointer<vtkCuller> Culler;
1124 vtkNew<vtkTimerLog> Timer;
1126 int ForceDataDistributionMode;
vtkPVHardwareSelector * Selector
bool UseOffscreenRendering
static void SetRequiresDistributedRenderingLOD(vtkInformation *info, vtkPVDataRepresentation *repr, bool value)
Some representation only work when remote rendering or local rendering.
manager for data-delivery.
vtkPVInteractorStyle * InteractorStyle
void PrintSelf(ostream &os, vtkIndent indent)
synchronizes and composites renderers among processes in ParaView configurations. ...
vtkPVInteractorStyle * TwoDInteractorStyle
vtkSelection * LastSelection
bool UseOutlineForLODRendering
bool UseLODForInteractiveRender
vtkPVDataRepresentation adds some ParaView specific API to data representations.
vtkRenderViewBase * RenderView
virtual void AboutToRenderOnLocalProcess(bool interactive)
Called just before the local process renders.
double RemoteRenderingThreshold
vtkPVSynchronizedRenderer * SynchronizedRenderers
bool UseOffscreenRenderingForScreenshots
vtkHardwareSelector subclass with paraview sepecific logic to avoid recapturing buffers unless needed...
vtkTimeStamp UpdateTimeStamp
Keeps track of the time when vtkPVRenderView::Update() was called.
vtkSmartPointer< vtkPVGridAxes3DActor > GridAxes3DActor
baseclass for all ParaView views.
int InteractiveRenderImageReductionFactor
void RemoteRenderingAvailableOff()
Returns if remote-rendering is possible on the current group of processes.
virtual void SetSize(int, int)
Set the size of this view in the multiview configuration.
bool UseInteractiveRenderingForScreenshots
vtkNew< vtkFXAAOptions > FXAAOptions
vtkTypeUInt32 StillRenderProcesses
vtkInteractorStyleRubberBandZoom * RubberBandZoom
vtkPVAxesWidget * OrientationWidget
double LODRenderingThreshold
static void SetRequiresDistributedRendering(vtkInformation *info, vtkPVDataRepresentation *repr, bool value, bool for_lod=false)
Some representation only work when remote rendering or local rendering.
virtual void AddRepresentationInternal(vtkDataRepresentation *rep)
Overridden to check that the representation has View setup properly.
unsigned int SynchronizationCounter
vtkInteractorStyleDrawPolygon * PolygonStyle
vtkTimeStamp PriorityQueueBuildTimeStamp
Keeps track of the time when the priority-queue for streaming was generated.
bool NeedsOrderedCompositing
void SelectCells(int region0, int region1, int region2, int region3)
Make a selection.
vtkBoundingBox GeometryBounds
Interface for ordering compositing.
virtual void SetPosition(int, int)
Set the position on this view in the multiview configuration.
virtual void Initialize(unsigned int id)
Initialize the view with an identifier.
vtkRenderer * NonCompositedRenderer
int StillRenderImageReductionFactor
bool UsedLODForLastRender
vtkPVCenterAxesActor * CenterAxes
virtual void StillRender()=0
Triggers a high-resolution render.
vtkPVCenterAxesActor is an actor for the center-axes used in ParaView.
void SelectPoints(int region0, int region1, int region2, int region3)
Make a selection.
bool UseDistributedRenderingForStillRender
Render View for ParaView.
interactive manipulation of the camera
bool UseDistributedRenderingForInteractiveRender
virtual void Update()
Overridden to not call Update() directly on the input representations, instead use ProcessViewRequest...
virtual void InteractiveRender()=0
Triggers a interactive render.
vtkSmartPointer< vtkRenderWindowInteractor > Interactor
unsigned long GetUpdateTimeStamp()
Provides access to the time when Update() was last called.
vtkInteractorStyleRubberBand3D * RubberBandStyle
vtkPVInteractorStyle * ThreeDInteractorStyle
ParaView extensions for vtkGridAxes3DActor.
vtkTypeUInt32 InteractiveRenderProcesses