15 #ifndef vtkPVRenderView_h
16 #define vtkPVRenderView_h
22 #include "vtkRemotingViewsModule.h"
28 class vtkCameraOrientationWidget;
74 INTERACTION_MODE_UNINTIALIZED = -1,
75 INTERACTION_MODE_3D = 0,
79 INTERACTION_MODE_POLYGON
94 virtual void SetInteractionMode(
int mode);
95 vtkGetMacro(InteractionMode,
int);
103 void SetSize(
int,
int)
override;
113 vtkGetObjectMacro(NonCompositedRenderer,
vtkRenderer);
121 DEFAULT_RENDERER = 0,
122 NON_COMPOSITED_RENDERER = 1,
130 virtual vtkRenderer* GetRenderer(
int rendererType = DEFAULT_RENDERER);
138 virtual void SetActiveCamera(
vtkCamera*);
168 void ResetCamera(
double bounds[6]);
169 void ResetCameraScreenSpace(
double offsetRatio = 0.9);
170 void ResetCameraScreenSpace(
double* bounds,
double offsetRatio = 0.9);
182 double LastRepresentationVisibleBounds[6];
209 vtkSetMacro(SuppressRendering,
bool);
210 vtkGetMacro(SuppressRendering,
bool);
211 vtkBooleanMacro(SuppressRendering,
bool);
223 vtkSetClampMacro(StillRenderImageReductionFactor,
int, 1, 20);
224 vtkGetMacro(StillRenderImageReductionFactor,
int);
234 vtkSetClampMacro(InteractiveRenderImageReductionFactor,
int, 1, 20);
235 vtkGetMacro(InteractiveRenderImageReductionFactor,
int);
244 vtkSetMacro(RemoteRenderingThreshold,
double);
245 vtkGetMacro(RemoteRenderingThreshold,
double);
254 vtkSetMacro(LODRenderingThreshold,
double);
255 vtkGetMacro(LODRenderingThreshold,
double);
265 vtkSetClampMacro(LODResolution,
double, 0.0, 1.0);
266 vtkGetMacro(LODResolution,
double);
276 vtkSetMacro(UseOutlineForLODRendering,
bool);
277 vtkGetMacro(UseOutlineForLODRendering,
bool);
288 void ConfigureCompressor(
const char* configuration);
294 virtual void ResetCameraClippingRange();
301 void SetUseLightKit(
bool enable);
302 vtkGetMacro(UseLightKit,
bool);
303 vtkBooleanMacro(UseLightKit,
bool);
307 void StreamingUpdate(
const double view_planes[24]);
308 void DeliverStreamedPieces(
unsigned int size,
unsigned int* representation_ids);
365 void SelectCells(
int region[4],
const char* array =
nullptr);
366 void SelectCells(
int region0,
int region1,
int region2,
int region3,
const char* array =
nullptr)
368 int r[4] = { region0, region1, region2, region3 };
369 this->SelectCells(r, array);
371 void SelectPoints(
int region[4],
const char* array =
nullptr);
372 void SelectPoints(
int region0,
int region1,
int region2,
int region3,
const char* array =
nullptr)
374 int r[4] = { region0, region1, region2, region3 };
375 this->SelectPoints(r, array);
377 void Select(
int field_association,
int region[4],
const char* array =
nullptr);
391 void SelectPolygonPoints(
int* polygon2DArray,
vtkIdType arrayLen);
392 void SelectPolygonCells(
int* polygon2DArray,
vtkIdType arrayLen);
393 void SelectPolygon(
int field_association,
int* polygon2DArray,
vtkIdType arrayLen);
409 vtkSetMacro(UseInteractiveRenderingForScreenshots,
bool);
410 vtkBooleanMacro(UseInteractiveRenderingForScreenshots,
bool);
411 vtkGetMacro(UseInteractiveRenderingForScreenshots,
bool);
418 vtkGetMacro(RemoteRenderingAvailable,
bool);
426 void NVPipeAvailableOn();
427 void NVPipeAvailableOff();
434 vtkGetMacro(UsedLODForLastRender,
bool);
442 void InvalidateCachedSelection();
454 static void SetRedistributionMode(
456 static void SetRedistributionModeToSplitBoundaryCells(
458 static void SetRedistributionModeToDuplicateBoundaryCells(
460 static void SetRedistributionModeToUniquelyAssignBoundaryCells(
463 const double bounds[6],
vtkMatrix4x4* transform =
nullptr,
int port = 0);
465 static void SetNextStreamedPiece(
501 USE_BOUNDS_FOR_REDISTRIBUTION = 0x01,
502 DATA_IS_REDISTRIBUTABLE = 0x02,
503 USE_DATA_FOR_LOAD_BALANCING = 0x40,
505 static void SetOrderedCompositingConfiguration(
vtkInformation* info,
513 void SetMaxClipBounds(
double bds[6]);
520 void SetLockBounds(
bool nv);
521 vtkGetMacro(LockBounds,
bool);
529 static void SetDeliverToAllProcesses(
541 static void SetDeliverToClientAndRenderingProcesses(
vtkInformation* info,
554 static void SetRequiresDistributedRendering(
576 static void SetForceDataDistributionMode(
vtkInformation* info,
int flag);
595 void SetShowAnnotation(
bool val);
596 vtkSetMacro(UpdateAnnotation,
bool);
603 void SetAnnotationColor(
double r,
double g,
double b);
620 virtual void SetOrientationAxesInteractivity(
bool);
621 virtual void SetOrientationAxesVisibility(
bool);
623 void SetOrientationAxesLabelColor(
double r,
double g,
double b);
624 void SetOrientationAxesOutlineColor(
double r,
double g,
double b);
626 void SetOrientationAxesXColor(
double r,
double g,
double b);
627 void SetOrientationAxesYColor(
double r,
double g,
double b);
628 void SetOrientationAxesZColor(
double r,
double g,
double b);
630 void SetOrientationAxesXVisibility(
bool vis);
631 void SetOrientationAxesYVisibility(
bool vis);
632 void SetOrientationAxesZVisibility(
bool vis);
634 void SetOrientationAxesXLabelText(
const char* text);
635 void SetOrientationAxesYLabelText(
const char* text);
636 void SetOrientationAxesZLabelText(
const char* text);
643 void SetCameraOrientationWidgetVisibility(
bool visible);
644 void SetCameraOrientationWidgetSize(
int size);
645 void SetCameraOrientationWidgetPadding(
int padding[2]);
646 void SetCameraOrientationWidgetAnchor(
int anchor);
652 virtual void SetCenterAxesVisibility(
bool);
658 virtual void SetCenterOfRotation(
double x,
double y,
double z);
659 virtual void SetRotationFactor(
double factor);
666 void SetKeyLightWarmth(
double val);
667 void SetKeyLightIntensity(
double val);
668 void SetKeyLightElevation(
double val);
669 void SetKeyLightAzimuth(
double val);
670 void SetFillLightWarmth(
double val);
671 void SetKeyToFillRatio(
double val);
672 void SetFillLightElevation(
double val);
673 void SetFillLightAzimuth(
double val);
674 void SetBackLightWarmth(
double val);
675 void SetKeyToBackRatio(
double val);
676 void SetBackLightElevation(
double val);
677 void SetBackLightAzimuth(
double val);
678 void SetHeadLightWarmth(
double val);
679 void SetKeyToHeadRatio(
double val);
680 void SetMaintainLuminance(
int val);
687 vtkSetMacro(UseHiddenLineRemoval,
bool);
688 virtual void SetUseDepthPeeling(
int val);
689 virtual void SetUseDepthPeelingForVolumes(
bool val);
690 virtual void SetMaximumNumberOfPeels(
int val);
691 virtual void SetBackgroundTexture(
vtkTexture* val);
699 vtkSetMacro(UseRenderViewSettingsForBackground,
bool);
700 vtkGetMacro(UseRenderViewSettingsForBackground,
bool);
718 vtkSetClampMacro(BackgroundColorMode,
int, DEFAULT, STEREO_SKYBOX);
719 vtkSetVector3Macro(Background,
double);
720 vtkGetVector3Macro(Background,
double);
721 vtkSetVector3Macro(Background2,
double);
722 vtkGetVector3Macro(Background2,
double);
723 vtkSetMacro(UseEnvironmentLighting,
bool);
730 virtual void SetEnvironmentalBG(
double r,
double g,
double b);
731 virtual void SetEnvironmentalBG2(
double r,
double g,
double b);
732 virtual void SetEnvironmentalBGTexture(
vtkTexture* val);
733 virtual void SetGradientEnvironmentalBG(
int val);
734 virtual void SetTexturedEnvironmentalBG(
int val);
735 virtual void SetBackgroundMode(
int val);
750 void SetStereoCapableWindow(
int val);
751 void SetStereoRender(
int val);
752 vtkSetMacro(StereoType,
int);
753 vtkSetMacro(ServerStereoType,
int);
754 void SetMultiSamples(
int val);
755 void SetAlphaBitPlanes(
int val);
756 void SetStencilCapable(
int val);
762 void SetParallelProjection(
int mode);
768 virtual void SetCamera2DManipulators(
const int manipulators[9]);
769 virtual void SetCamera3DManipulators(
const int manipulators[9]);
771 virtual void SetReverseMouseWheelZoomDirection(
bool reverse);
772 virtual void SetMouseWheelZoomsToCursor(
bool value);
773 virtual void SetCamera2DMouseWheelMotionFactor(
double factor);
774 virtual void SetCamera3DMouseWheelMotionFactor(
double factor);
782 virtual void SynchronizeGeometryBounds();
796 virtual void UpdateLOD();
804 vtkGetMacro(UseLODForInteractiveRender,
bool);
813 vtkGetMacro(UseDistributedRenderingForRender,
bool);
822 vtkGetMacro(UseDistributedRenderingForLODRender,
bool);
831 vtkGetMacro(StillRenderProcesses, vtkTypeUInt32);
840 vtkGetMacro(InteractiveRenderProcesses, vtkTypeUInt32);
846 int GetDataDistributionMode(
bool low_res);
853 void Deliver(
int use_lod,
unsigned int size,
unsigned int* representation_ids)
override;
863 bool GetUseOrderedCompositing();
869 bool GetRenderEmptyImages();
875 vtkSetMacro(UseFXAA,
bool);
876 vtkGetMacro(UseFXAA,
bool);
883 void SetFXAARelativeContrastThreshold(
double val);
884 void SetFXAAHardContrastThreshold(
double val);
885 void SetFXAASubpixelBlendLimit(
double val);
886 void SetFXAASubpixelContrastThreshold(
double val);
887 void SetFXAAUseHighQualityEndpoints(
bool val);
888 void SetFXAAEndpointSearchIterations(
int val);
905 void SetUseToneMapping(
bool v);
906 vtkGetMacro(UseToneMapping,
bool);
907 void SetToneMappingType(
int);
908 void SetExposure(
double);
909 void SetContrast(
double);
910 void SetShoulder(
double);
911 void SetMidIn(
double);
912 void SetMidOut(
double);
913 void SetHdrMax(
double);
914 void SetUseACES(
bool);
915 void SetGenericFilmicPresets(
int t);
922 vtkSetMacro(UseSSAO,
bool);
923 vtkGetMacro(UseSSAO,
bool);
924 vtkSetMacro(UseSSAODefaultPresets,
bool);
925 vtkSetMacro(Radius,
double);
926 vtkSetMacro(KernelSize,
int);
927 vtkSetMacro(Bias,
double);
928 vtkSetMacro(Blur,
bool);
943 void AddPropToRenderer(
vtkProp* prop);
944 void RemovePropFromRenderer(
vtkProp* prop);
962 bool BeginValuePassForRendering(
int fieldAssociation,
const char* arrayName,
int component);
963 void EndValuePassForRendering();
971 void CaptureZBuffer();
979 void SetEnableOSPRay(
bool);
980 bool GetEnableOSPRay();
986 void SetShadows(
bool);
993 void SetAmbientOcclusionSamples(
int);
994 int GetAmbientOcclusionSamples();
1000 void SetRouletteDepth(
int);
1001 int GetRouletteDepth();
1008 void SetVolumeAnisotropy(
double);
1010 double GetVolumeAnisotropy();
1017 void SetSamplesPerPixel(
int);
1018 int GetSamplesPerPixel();
1024 void SetMaxFrames(
int);
1030 bool GetOSPRayContinueStreaming();
1035 void SetDenoise(
bool);
1043 void SetLightScale(
double);
1044 double GetLightScale();
1050 void SetOSPRayRendererType(std::
string);
1055 void SetBackgroundNorth(
double x,
double y,
double z);
1056 void SetBackgroundEast(
double x,
double y,
double z);
1062 void SetViewTime(
double value) override;
1067 void SetTimeCacheSize(
int);
1068 int GetTimeCacheSize();
1098 static
void SetDiscreteCameras(
1108 void ScaleRendererViewports(const
double viewport[4]) override;
1128 virtual
void Render(
bool interactive,
bool skip_rendering);
1134 virtual
void AboutToRenderOnLocalProcess(
bool interactive) { (void)interactive; }
1142 bool ShouldUseDistributedRendering(
double geometry_size,
bool using_lod);
1147 bool ShouldUseLODRendering(
double geometry);
1153 bool IsProcessRenderingGeometriesForCompositing(
bool using_distributed_rendering);
1164 virtual void UpdateCenterAxes();
1170 bool GetLocalProcessDoesRendering(
bool using_distributed_rendering);
1176 bool TestCollaborationCounter();
1182 void SynchronizeForCollaboration();
1188 virtual void BuildAnnotationText(ostream& str);
1195 vtkGetMacro(SynchronizationCounter,
unsigned int);
1202 vtkGetMacro(MakingSelection,
bool);
1209 virtual bool PrepareSelect(
int fieldAssociation,
const char* array =
nullptr);
1214 virtual void PostSelect(
vtkSelection* sel,
const char* array =
nullptr);
1220 virtual void UpdateBackground(
vtkRenderer* renderer =
nullptr);
1232 virtual void SetupAndSetRenderer(
vtkRenderer* ren);
1270 bool ReverseMouseWheelZoomDirection =
false;
1326 bool MakingSelection;
1327 int PreviousSwapBuffers;
1328 void OnSelectionChangedEvent();
1329 void OnPolygonSelectionEvent();
1334 bool RemoteRenderingAvailable;
1337 bool DistributedRenderingRequired;
1338 bool NonDistributedRenderingRequired;
1339 bool DistributedRenderingRequiredLOD;
1340 bool NonDistributedRenderingRequiredLOD;
1343 int ParallelProjection;
1346 bool UseHiddenLineRemoval;
1349 vtkInternals* Internals;
1352 void UpdateAnnotationText();
1357 int ServerStereoType;
1358 void UpdateStereoProperties();
1360 int BackgroundColorMode;
1361 bool UseEnvironmentLighting;
1362 bool UseRenderViewSettingsForBackground;
1364 double Background2[3];
1369 int ForceDataDistributionMode;
1370 int PreviousDiscreteCameraIndex;
1372 bool UseTexturedEnvironmentalBG;