15 #ifndef vtkPVRenderView_h 16 #define vtkPVRenderView_h 27 class vtkCameraOrientationWidget;
43 class vtkPolarAxesActor2D;
51 class vtkIndependentViewerCollection;
76 INTERACTION_MODE_UNINTIALIZED = -1,
77 INTERACTION_MODE_3D = 0,
81 INTERACTION_MODE_POLYGON
96 virtual void SetInteractionMode(
int mode);
97 vtkGetMacro(InteractionMode,
int);
105 void SetSize(
int,
int)
override;
115 vtkGetObjectMacro(NonCompositedRenderer,
vtkRenderer);
123 DEFAULT_RENDERER = 0,
124 NON_COMPOSITED_RENDERER = 1,
132 virtual vtkRenderer* GetRenderer(
int rendererType = DEFAULT_RENDERER);
140 virtual void SetActiveCamera(
vtkCamera*);
143 virtual void SetIndependentViewers(vtkIndependentViewerCollection* viewers);
172 void ResetCamera(
double bounds[6]);
173 void ResetCameraScreenSpace(
double offsetRatio = 0.9);
174 void ResetCameraScreenSpace(
double* bounds,
double offsetRatio = 0.9);
186 double LastRepresentationVisibleBounds[6];
213 vtkSetMacro(SuppressRendering,
bool);
214 vtkGetMacro(SuppressRendering,
bool);
215 vtkBooleanMacro(SuppressRendering,
bool);
227 vtkSetClampMacro(StillRenderImageReductionFactor,
int, 1, 20);
228 vtkGetMacro(StillRenderImageReductionFactor,
int);
238 vtkSetClampMacro(InteractiveRenderImageReductionFactor,
int, 1, 20);
239 vtkGetMacro(InteractiveRenderImageReductionFactor,
int);
248 vtkSetMacro(RemoteRenderingThreshold,
double);
249 vtkGetMacro(RemoteRenderingThreshold,
double);
258 vtkSetMacro(LODRenderingThreshold,
double);
259 vtkGetMacro(LODRenderingThreshold,
double);
269 vtkSetClampMacro(LODResolution,
double, 0.0, 1.0);
270 vtkGetMacro(LODResolution,
double);
280 vtkSetMacro(UseOutlineForLODRendering,
bool);
281 vtkGetMacro(UseOutlineForLODRendering,
bool);
292 void ConfigureCompressor(
const char* configuration);
298 virtual void ResetCameraClippingRange();
305 void SetUseLightKit(
bool enable);
306 vtkGetMacro(UseLightKit,
bool);
307 vtkBooleanMacro(UseLightKit,
bool);
311 void StreamingUpdate(
const double view_planes[24]);
312 void DeliverStreamedPieces(
unsigned int size,
unsigned int* representation_ids);
369 void SelectCells(
int region[4],
const char* array =
nullptr);
370 void SelectCells(
int region0,
int region1,
int region2,
int region3,
const char* array =
nullptr)
372 int r[4] = { region0, region1, region2, region3 };
373 this->SelectCells(r, array);
375 void SelectPoints(
int region[4],
const char* array =
nullptr);
376 void SelectPoints(
int region0,
int region1,
int region2,
int region3,
const char* array =
nullptr)
378 int r[4] = { region0, region1, region2, region3 };
379 this->SelectPoints(r, array);
381 void Select(
int field_association,
int region[4],
const char* array =
nullptr);
388 void SelectByArrayValue(
402 void SelectPolygonPoints(
int* polygon2DArray,
vtkIdType arrayLen);
403 void SelectPolygonCells(
int* polygon2DArray,
vtkIdType arrayLen);
404 void SelectPolygon(
int field_association,
int* polygon2DArray,
vtkIdType arrayLen);
420 vtkSetMacro(UseInteractiveRenderingForScreenshots,
bool);
421 vtkBooleanMacro(UseInteractiveRenderingForScreenshots,
bool);
422 vtkGetMacro(UseInteractiveRenderingForScreenshots,
bool);
429 vtkGetMacro(RemoteRenderingAvailable,
bool);
437 void NVPipeAvailableOn();
438 void NVPipeAvailableOff();
445 vtkGetMacro(UsedLODForLastRender,
bool);
453 void InvalidateCachedSelection();
465 static void SetRedistributionMode(
467 static void SetRedistributionModeToSplitBoundaryCells(
469 static void SetRedistributionModeToDuplicateBoundaryCells(
471 static void SetRedistributionModeToUniquelyAssignBoundaryCells(
476 static void SetNextStreamedPiece(
512 USE_BOUNDS_FOR_REDISTRIBUTION = 0x01,
513 DATA_IS_REDISTRIBUTABLE = 0x02,
514 USE_DATA_FOR_LOAD_BALANCING = 0x40,
516 static void SetOrderedCompositingConfiguration(
vtkInformation* info,
524 void SetMaxClipBounds(
double bds[6]);
531 void SetLockBounds(
bool nv);
532 vtkGetMacro(LockBounds,
bool);
540 static void SetDeliverToAllProcesses(
552 static void SetDeliverToClientAndRenderingProcesses(
vtkInformation* info,
565 static void SetRequiresDistributedRendering(
587 static void SetForceDataDistributionMode(
vtkInformation* info,
int flag);
606 void SetShowAnnotation(
bool val);
607 vtkSetMacro(UpdateAnnotation,
bool);
614 void SetAnnotationColor(
double r,
double g,
double b);
630 virtual void SetPolarGridActor(vtkPolarAxesActor2D*);
636 virtual void SetOrientationAxesInteractivity(
bool);
637 virtual void SetOrientationAxesVisibility(
bool);
639 void SetOrientationAxesLabelColor(
double r,
double g,
double b);
640 void SetOrientationAxesOutlineColor(
double r,
double g,
double b);
642 void SetOrientationAxesXColor(
double r,
double g,
double b);
643 void SetOrientationAxesYColor(
double r,
double g,
double b);
644 void SetOrientationAxesZColor(
double r,
double g,
double b);
646 void SetOrientationAxesXVisibility(
bool vis);
647 void SetOrientationAxesYVisibility(
bool vis);
648 void SetOrientationAxesZVisibility(
bool vis);
650 void SetOrientationAxesXLabelText(
const char* text);
651 void SetOrientationAxesYLabelText(
const char* text);
652 void SetOrientationAxesZLabelText(
const char* text);
659 void SetCameraOrientationWidgetVisibility(
bool visible);
660 void SetCameraOrientationWidgetSize(
int size);
661 void SetCameraOrientationWidgetPadding(
int padding[2]);
662 void SetCameraOrientationWidgetAnchor(
int anchor);
668 virtual void SetCenterAxesVisibility(
bool);
670 virtual void SetCenterAxesXColor(
double r,
double g,
double b);
671 virtual void SetCenterAxesYColor(
double r,
double g,
double b);
672 virtual void SetCenterAxesZColor(
double r,
double g,
double b);
678 virtual void SetCenterOfRotation(
double x,
double y,
double z);
679 virtual void SetRotationFactor(
double factor);
686 void SetKeyLightWarmth(
double val);
687 void SetKeyLightIntensity(
double val);
688 void SetKeyLightElevation(
double val);
689 void SetKeyLightAzimuth(
double val);
690 void SetFillLightWarmth(
double val);
691 void SetKeyToFillRatio(
double val);
692 void SetFillLightElevation(
double val);
693 void SetFillLightAzimuth(
double val);
694 void SetBackLightWarmth(
double val);
695 void SetKeyToBackRatio(
double val);
696 void SetBackLightElevation(
double val);
697 void SetBackLightAzimuth(
double val);
698 void SetHeadLightWarmth(
double val);
699 void SetKeyToHeadRatio(
double val);
700 void SetMaintainLuminance(
int val);
707 vtkSetMacro(UseHiddenLineRemoval,
bool);
708 virtual void SetUseDepthPeeling(
int val);
709 virtual void SetUseDepthPeelingForVolumes(
bool val);
710 virtual void SetMaximumNumberOfPeels(
int val);
711 virtual void SetBackgroundTexture(
vtkTexture* val);
719 vtkSetMacro(UseRenderViewSettingsForBackground,
bool);
720 vtkGetMacro(UseRenderViewSettingsForBackground,
bool);
738 vtkSetClampMacro(BackgroundColorMode,
int, DEFAULT, STEREO_SKYBOX);
739 vtkSetVector3Macro(Background,
double);
740 vtkGetVector3Macro(Background,
double);
741 vtkSetVector3Macro(Background2,
double);
742 vtkGetVector3Macro(Background2,
double);
743 vtkSetMacro(UseEnvironmentLighting,
bool);
748 virtual void SetSkyboxRotation(
double x,
double y,
double z);
749 vtkGetVector3Macro(SkyboxRotation,
double);
756 virtual void SetEnvironmentalBG(
double r,
double g,
double b);
757 virtual void SetEnvironmentalBG2(
double r,
double g,
double b);
758 virtual void SetEnvironmentalBGTexture(
vtkTexture* val);
759 virtual void SetGradientEnvironmentalBG(
int val);
760 virtual void SetTexturedEnvironmentalBG(
int val);
761 virtual void SetBackgroundMode(
int val);
778 static int GetNumberOfRendersPerFrame(
int stereoMode);
779 static int GetCompatibleStereoType(
int stereoMode);
780 static bool AreStereoTypesCompatible(
int mode1,
int mode2);
787 void SetStereoCapableWindow(
int val);
788 void SetStereoRender(
int val);
789 vtkSetMacro(StereoType,
int);
790 vtkSetMacro(ServerStereoType,
int);
791 void SetMultiSamples(
int val);
792 void SetAlphaBitPlanes(
int val);
793 void SetStencilCapable(
int val);
794 void SetPhysicalToWorldMatrix(
const double[16]);
800 void SetParallelProjection(
int mode);
806 virtual void SetCamera2DManipulators(
const int manipulators[9]);
807 virtual void SetCamera3DManipulators(
const int manipulators[9]);
809 virtual void SetReverseMouseWheelZoomDirection(
bool reverse);
810 virtual void SetMouseWheelZoomsToCursor(
bool value);
811 virtual void SetCamera2DMouseWheelMotionFactor(
double factor);
812 virtual void SetCamera3DMouseWheelMotionFactor(
double factor);
820 virtual void SynchronizeGeometryBounds();
834 virtual void UpdateLOD();
842 vtkGetMacro(UseLODForInteractiveRender,
bool);
851 vtkGetMacro(UseDistributedRenderingForRender,
bool);
860 vtkGetMacro(UseDistributedRenderingForLODRender,
bool);
869 vtkGetMacro(StillRenderProcesses, vtkTypeUInt32);
878 vtkGetMacro(InteractiveRenderProcesses, vtkTypeUInt32);
884 int GetDataDistributionMode(
bool low_res);
891 void Deliver(
int use_lod,
unsigned int size,
unsigned int* representation_ids)
override;
901 bool GetUseOrderedCompositing();
907 bool GetRenderEmptyImages();
913 vtkSetMacro(UseFXAA,
bool);
914 vtkGetMacro(UseFXAA,
bool);
921 void SetFXAARelativeContrastThreshold(
double val);
922 void SetFXAAHardContrastThreshold(
double val);
923 void SetFXAASubpixelBlendLimit(
double val);
924 void SetFXAASubpixelContrastThreshold(
double val);
925 void SetFXAAUseHighQualityEndpoints(
bool val);
926 void SetFXAAEndpointSearchIterations(
int val);
943 void SetUseToneMapping(
bool v);
944 vtkGetMacro(UseToneMapping,
bool);
945 void SetToneMappingType(
int);
946 void SetExposure(
double);
947 void SetContrast(
double);
948 void SetShoulder(
double);
949 void SetMidIn(
double);
950 void SetMidOut(
double);
951 void SetHdrMax(
double);
952 void SetUseACES(
bool);
953 void SetGenericFilmicPresets(
int t);
960 vtkSetMacro(UseSSAO,
bool);
961 vtkGetMacro(UseSSAO,
bool);
962 vtkSetMacro(UseSSAODefaultPresets,
bool);
963 vtkSetMacro(Radius,
double);
964 vtkSetMacro(KernelSize,
int);
965 vtkSetMacro(Bias,
double);
966 vtkSetMacro(Blur,
bool);
981 void AddPropToRenderer(
vtkProp* prop);
982 void RemovePropFromRenderer(
vtkProp* prop);
1000 bool BeginValuePassForRendering(
int fieldAssociation,
const char* arrayName,
int component);
1001 void EndValuePassForRendering();
1009 void CaptureZBuffer();
1019 void SetEnableSynchronizableActors(
bool);
1020 bool GetEnableSynchronizableActors();
1027 void SetEnableOSPRay(
bool);
1028 bool GetEnableOSPRay();
1035 void SetEnableANARI(
bool);
1036 bool GetEnableANARI();
1043 void SetANARILibrary(std::string);
1044 const char* GetANARILibrary();
1051 void SetANARIRenderer(std::string);
1052 const char* GetANARIRenderer();
1067 std::string GetANARIRendererParameters();
1072 void SetANARIRendererParameter(
const std::string& name,
int type,
const std::string& value);
1079 void SetShadows(
bool);
1086 void SetAmbientOcclusionSamples(
int);
1087 int GetAmbientOcclusionSamples();
1093 void SetRouletteDepth(
int);
1094 int GetRouletteDepth();
1101 void SetSamplesPerPixel(
int);
1102 int GetSamplesPerPixel();
1108 void SetMaxFrames(
int);
1114 bool GetOSPRayContinueStreaming();
1119 void SetDenoise(
bool);
1127 void SetLightScale(
double);
1128 double GetLightScale();
1134 void SetOSPRayRendererType(std::string);
1139 void SetBackgroundNorth(
double x,
double y,
double z);
1140 void SetBackgroundEast(
double x,
double y,
double z);
1151 void SetTimeCacheSize(
int);
1152 int GetTimeCacheSize();
1182 static void SetDiscreteCameras(
1212 virtual void Render(
bool interactive,
bool skip_rendering);
1226 bool ShouldUseDistributedRendering(
double geometry_size,
bool using_lod);
1231 bool ShouldUseLODRendering(
double geometry);
1237 bool IsProcessRenderingGeometriesForCompositing(
bool using_distributed_rendering);
1248 virtual void UpdateCenterAxes();
1254 bool GetLocalProcessDoesRendering(
bool using_distributed_rendering);
1260 bool TestCollaborationCounter();
1266 void SynchronizeForCollaboration();
1272 virtual void BuildAnnotationText(ostream& str);
1279 vtkGetMacro(SynchronizationCounter,
unsigned int);
1286 vtkGetMacro(MakingSelection,
bool);
1293 virtual bool PrepareSelect(
int fieldAssociation,
const char* array =
nullptr);
1298 virtual void PostSelect(
vtkSelection* sel,
const char* array =
nullptr);
1304 virtual void UpdateBackground(
vtkRenderer* renderer =
nullptr);
1316 virtual void SetupAndSetRenderer(
vtkRenderer* ren);
1356 bool ReverseMouseWheelZoomDirection =
false;
1412 bool MakingSelection;
1413 int PreviousSwapBuffers;
1414 void OnSelectionChangedEvent();
1415 void OnPolygonSelectionEvent();
1423 void AddAnnotationToView(
vtkProp*);
1424 void RemoveAnnotationFromView(
vtkProp*);
1429 bool RemoteRenderingAvailable;
1432 bool DistributedRenderingRequired;
1433 bool NonDistributedRenderingRequired;
1434 bool DistributedRenderingRequiredLOD;
1435 bool NonDistributedRenderingRequiredLOD;
1438 int ParallelProjection;
1441 bool UseHiddenLineRemoval;
1444 vtkInternals* Internals;
1447 void UpdateAnnotationText();
1452 int ServerStereoType;
1453 void UpdateStereoProperties();
1455 int BackgroundColorMode;
1456 bool UseEnvironmentLighting;
1457 bool UseRenderViewSettingsForBackground;
1459 double Background2[3];
1460 double SkyboxRotation[3];
1465 int ForceDataDistributionMode;
1466 int PreviousDiscreteCameraIndex;
1468 bool UseTexturedEnvironmentalBG;
static void SetRequiresDistributedRenderingLOD(vtkInformation *info, vtkPVDataRepresentation *repr, bool value)
Some representation only work when remote rendering or local rendering.
vtkSmartPointer< vtkPolarAxesActor2D > PolarAxesActor
vtkPVInteractorStyle * InteractorStyle
coordinates rendering between corresponding renderers across multiple processes
vtkPVInteractorStyle * TwoDInteractorStyle
vtkSelection * LastSelection
vtkSmartPointer< vtkPVHardwareSelector > Selector
bool UseOutlineForLODRendering
#define VTKREMOTINGVIEWS_EXPORT
virtual void SetViewTime(double value)
Get/Set the time this view is showing.
bool UseLODForInteractiveRender
manages visual material definitions
vtkPVDataRepresentation adds some ParaView specific API to data representations.
vtkRenderViewBase * RenderView
virtual void AboutToRenderOnLocalProcess(bool interactive)
Called just before the local process renders.
bool UseDistributedRenderingForLODRender
virtual void Deliver(int use_lod, unsigned int size, unsigned int *representation_ids)
Called on all processes to request data-delivery for the list of representations. ...
double RemoteRenderingThreshold
vtkPVSynchronizedRenderer * SynchronizedRenderers
void Update() override
Overridden to not call Update() directly on the input representations, instead use ProcessViewRequest...
virtual void ScaleRendererViewports(const double viewport[4])
vtkViewLayout calls this method to update the total viewport available for this view.
vtkHardwareSelector subclass with paraview specific logic to avoid recapturing buffers unless needed...
vtkSmartPointer< vtkPVGridAxes3DActor > GridAxes3DActor
int GetForceDataDistributionMode() const
This is an temporary/experimental option and may be removed without notice.
baseclass for all ParaView views.
int InteractiveRenderImageReductionFactor
void SelectCells(int region0, int region1, int region2, int region3, const char *array=nullptr)
Make a selection.
void RemoteRenderingAvailableOff()
Returns if remote-rendering is possible on the current group of processes.
vtkSmartPointer< vtkLegendScaleActor > LegendGridActor
virtual void SetSize(int, int)
Set the size of this view in the multiview configuration.
bool UseInteractiveRenderingForScreenshots
vtkSmartPointer< vtkIndependentViewerCollection > ViewerCollection
vtkNew< vtkFXAAOptions > FXAAOptions
bool UseSSAODefaultPresets
bool IsForceDataDistributionModeSet() const
This is an temporary/experimental option and may be removed without notice.
vtkTypeUInt32 StillRenderProcesses
vtkNew< vtkSkybox > Skybox
vtkInteractorStyleRubberBandZoom * RubberBandZoom
vtkPVAxesWidget * OrientationWidget
double LODRenderingThreshold
vtkNew< vtkCameraOrientationWidget > CameraOrientationWidget
static void SetRequiresDistributedRendering(vtkInformation *info, vtkPVDataRepresentation *repr, bool value, bool for_lod=false)
Some representation only work when remote rendering or local rendering.
unsigned int SynchronizationCounter
collection of cameras used by vtkPVRenderView for cases where one wants to limit interactions to a fi...
vtkInteractorStyleDrawPolygon * PolygonStyle
void SelectPoints(int region0, int region1, int region2, int region3, const char *array=nullptr)
Make a selection.
GenericFilmicPresets
Defines tone mapping generic filmic presets.
vtkTimeStamp PriorityQueueBuildTimeStamp
Keeps track of the time when the priority-queue for streaming was generated.
bool NeedsOrderedCompositing
vtkBoundingBox GeometryBounds
virtual void SetPosition(int, int)
Set the position on this view in the multiview configuration.
vtkRenderer * NonCompositedRenderer
vtkWeakPointer< vtkPVCameraCollection > DiscreteCameras
bool UseDistributedRenderingForRender
int StillRenderImageReductionFactor
bool UsedLODForLastRender
vtkPVCenterAxesActor * CenterAxes
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void StillRender()=0
Triggers a high-resolution render.
vtkPVCenterAxesActor is an actor for the center-axes used in ParaView.
Render View for ParaView.
interactive manipulation of the camera
virtual void InteractiveRender()=0
Triggers a interactive render.
vtkSmartPointer< vtkRenderWindowInteractor > Interactor
vtkInteractorStyleRubberBand3D * RubberBandStyle
vtkPVInteractorStyle * ThreeDInteractorStyle
ParaView extensions for vtkGridAxesActor3D.
helper to assist in determine process order when rendering
vtkTypeUInt32 InteractiveRenderProcesses