138 #ifndef vtkRenderer_h
139 #define vtkRenderer_h
141 #include "vtkRenderingCoreModule.h"
150 VTK_ABI_NAMESPACE_BEGIN
374 vtkSetVector3Macro(Ambient,
double);
375 vtkGetVectorMacro(Ambient,
double, 3);
383 vtkSetMacro(AllocatedRenderTime,
double);
384 virtual
double GetAllocatedRenderTime();
393 virtual
double GetTimeFactor();
401 virtual
void Render();
406 virtual
void DeviceRender() {}
463 virtual
void ResetCameraClippingRange();
469 virtual
void ResetCameraClippingRange(const
double bounds[6]);
470 virtual
void ResetCameraClippingRange(
471 double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
480 vtkSetClampMacro(NearClippingPlaneTolerance,
double, 0, 0.99);
481 vtkGetMacro(NearClippingPlaneTolerance,
double);
490 vtkSetClampMacro(ClippingRangeExpansion,
double, 0, 0.99);
491 vtkGetMacro(ClippingRangeExpansion,
double);
500 virtual
void ResetCamera();
511 virtual
void ResetCamera(const
double bounds[6]);
516 virtual
void ResetCamera(
517 double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
526 virtual
void ResetCameraScreenSpace(
double offsetRatio = 0.9);
536 virtual
void ResetCameraScreenSpace(const
double bounds[6],
double offsetRatio = 0.9);
550 void ZoomToBoxUsingViewAngle(const
vtkRecti& box,
double offsetRatio = 1.0);
558 virtual
void ResetCameraScreenSpace(
double xmin,
double xmax,
double ymin,
double ymax,
559 double zmin,
double zmax,
double offsetRatio = 0.9);
608 vtkGetMacro(Layer,
int);
667 void ViewToPose(
double& wx,
double& wy,
double& wz)
override;
668 void PoseToView(
double& wx,
double& wy,
double& wz)
override;
686 vtkGetMacro(LastRenderTimeInSeconds,
double);
696 vtkGetMacro(NumberOfPropsRendered,
int);
709 return this->
PickProp(selectionX, selectionY, selectionX, selectionY);
712 double selectionX1,
double selectionY1,
double selectionX2,
double selectionY2)
override;
729 selectionX, selectionY, selectionX, selectionY, fieldAssociation, selection);
778 vtkSetMacro(UseDepthPeelingForVolumes,
bool);
779 vtkGetMacro(UseDepthPeelingForVolumes,
bool);
780 vtkBooleanMacro(UseDepthPeelingForVolumes,
bool);
792 vtkSetClampMacro(OcclusionRatio,
double, 0.0, 0.5);
793 vtkGetMacro(OcclusionRatio,
double);
802 vtkSetMacro(MaximumNumberOfPeels,
int);
803 vtkGetMacro(MaximumNumberOfPeels,
int);
820 vtkSetMacro(UseSSAO,
bool);
821 vtkGetMacro(UseSSAO,
bool);
822 vtkBooleanMacro(UseSSAO,
bool);
830 vtkSetMacro(SSAORadius,
double);
831 vtkGetMacro(SSAORadius,
double);
839 vtkSetMacro(SSAOBias,
double);
840 vtkGetMacro(SSAOBias,
double);
848 vtkSetMacro(SSAOKernelSize,
unsigned int);
849 vtkGetMacro(SSAOKernelSize,
unsigned int);
858 vtkSetMacro(SSAOBlur,
bool);
859 vtkGetMacro(SSAOBlur,
bool);
860 vtkBooleanMacro(SSAOBlur,
bool);
909 vtkSetMacro(TexturedBackground,
bool);
910 vtkGetMacro(TexturedBackground,
bool);
911 vtkBooleanMacro(TexturedBackground,
bool);
921 vtkSetMacro(UseFXAA,
bool);
922 vtkGetMacro(UseFXAA,
bool);
923 vtkBooleanMacro(UseFXAA,
bool);
976 vtkSetMacro(UseImageBasedLighting,
bool);
977 vtkGetMacro(UseImageBasedLighting,
bool);
978 vtkBooleanMacro(UseImageBasedLighting,
bool);
988 virtual
void SetEnvironmentTexture(
vtkTexture* texture,
bool isSRGB = false);
995 vtkGetVector3Macro(EnvironmentUp,
double);
996 vtkSetVector3Macro(EnvironmentUp,
double);
1003 vtkGetVector3Macro(EnvironmentRight,
double);
1004 vtkSetVector3Macro(EnvironmentRight,
double);
1027 double AllocatedRenderTime;
1032 unsigned char* BackingImage;
1033 int BackingStoreSize[2];
1036 double LastRenderTimeInSeconds;
1041 void AllocateTime();
1045 int NumberOfPropsRendered;
1064 double ComputedVisiblePropBounds[6];
1073 double NearClippingPlaneTolerance;
1079 double ClippingRangeExpansion;
1105 const
std::array<
double, 16>& GetCompositeProjectionTransformationMatrix();
1111 const
std::array<
double, 16>& GetProjectionTransformationMatrix();
1117 const
std::array<
double, 16>& GetViewTransformMatrix();
1133 virtual
int UpdateTranslucentPolygonalGeometry();
1140 virtual
int UpdateOpaquePolygonalGeometry();
1146 virtual
int UpdateCamera();
1159 virtual
int UpdateLights() {
return 0; }
1223 bool UseSSAO =
false;
1224 double SSAORadius = 0.5;
1225 double SSAOBias = 0.01;
1226 unsigned int SSAOKernelSize = 32;
1227 bool SSAOBlur =
false;
1244 this->Selector = selector;
1268 double EnvironmentUp[3];
1269 double EnvironmentRight[3];
1275 std::array<double, 16> CompositeProjectionTransformationMatrix;
1280 double LastCompositeProjectionTransformationMatrixTiledAspectRatio;
1285 vtkMTimeType LastCompositeProjectionTransformationMatrixCameraModified;
1290 std::array<double, 16> ProjectionTransformationMatrix;
1295 double LastProjectionTransformationMatrixTiledAspectRatio;
1300 vtkMTimeType LastProjectionTransformationMatrixCameraModified;
1305 std::array<double, 16> ViewTransformMatrix;
1329 VTK_ABI_NAMESPACE_END
a actor that draws 2D data
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
a list of nodes that form an assembly path
a virtual camera for 3D rendering
an ordered list of Cullers
a superclass for prop cullers
Configuration for FXAA implementations.
abstract interface to OpenGL FBOs
a simple class to control print indentation
an ordered list of lights
a virtual light for 3D rendering
represent and manipulate 4x4 transformation matrices
virtual void Modified()
Update the modification time for this object.
abstract superclass for all actors, volumes and annotations
Perform part of the rendering of a vtkRenderer.
create a window for renderers to draw into
Render the props of a vtkRenderer.
abstract specification for renderers
void RemoveVolume(vtkProp *p)
Add/Remove different types of props to the renderer.
virtual void SetLayer(int layer)
Set/Get the layer that this renderer belongs to.
void ViewToWorld(double &wx, double &wy, double &wz) override
Convert view point coordinates to world coordinates.
virtual void SetFXAAOptions(vtkFXAAOptions *)
The configuration object for FXAA antialiasing.
void SetPass(vtkRenderPass *p)
vtkTypeBool UseShadows
If this flag is on and the rendering engine supports it render shadows Initial value is off.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkRenderer * New()
Create a vtkRenderer with a black background, a white ambient light, two-sided lighting turned on,...
double GetTiledAspectRatio()
Compute the aspect ratio of this renderer for the current tile.
void CreateLight()
Create and add a light to renderer.
vtkCamera * GetActiveCameraAndResetIfCreated()
Get the current camera and reset it only if it gets created automatically (see GetActiveCamera).
void AddLight(vtkLight *)
Add a light to the list of lights.
vtkCullerCollection * GetCullers()
Return the collection of cullers.
virtual vtkLight * MakeLight()
Create a new Light sutible for use with this type of Renderer.
virtual void SetRightBackgroundTexture(vtkTexture *)
Set/Get the texture to be used for the right eye background.
vtkAssemblyPath * PickProp(double selectionX, double selectionY, int fieldAssociation, vtkSmartPointer< vtkSelection > selection) override
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x,...
vtkWindow * GetVTKWindow() override
Specify the rendering window in which to draw.
bool UseImageBasedLighting
int VisibleActorCount()
Returns the number of visible actors.
vtkTexture * EnvironmentTexture
void RemoveLight(vtkLight *)
Remove a light from the list of lights.
bool UseDepthPeelingForVolumes
This flag is on and the GPU supports it, depth-peel volumes along with the translucent geometry.
void RemoveActor(vtkProp *p)
Add/Remove different types of props to the renderer.
virtual void SetLeftBackgroundTexture(vtkTexture *)
Set/Get the texture to be used for the monocular or stereo left eye background.
void SetSelector(vtkHardwareSelector *selector)
Called by vtkHardwareSelector when it begins rendering for selection.
vtkMTimeType GetMTime() override
Return the MTime of the renderer also considering its ivars.
int MaximumNumberOfPeels
In case of depth peeling, define the maximum number of peeling layers.
vtkTypeBool LastRenderingUsedDepthPeeling
Tells if the last call to DeviceRenderTranslucentPolygonalGeometry() actually used depth peeling.
int VisibleVolumeCount()
Returns the number of visible volumes.
double * ComputeVisiblePropBounds()
Wrapper-friendly version of ComputeVisiblePropBounds.
virtual void StereoMidpoint()
Do anything necessary between rendering the left and right viewpoints in a stereo render.
vtkAssemblyPath * PickProp(double selectionX1, double selectionY1, double selectionX2, double selectionY2, int fieldAssociation, vtkSmartPointer< vtkSelection > selection) override
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x,...
double OcclusionRatio
In case of use of depth peeling technique for rendering translucent material, define the threshold un...
vtkAssemblyPath * PickProp(double selectionX, double selectionY) override
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x,...
void PoseToView(double &wx, double &wy, double &wz) override
Convert to from pose coordinates.
bool UseFXAA
If this flag is on and the rendering engine supports it, FXAA will be used to antialias the scene.
vtkTypeBool Transparent()
Returns a boolean indicating if this renderer is transparent.
vtkTypeBool IsActiveCameraCreated()
This method returns 1 if the ActiveCamera has already been set or automatically created by the render...
vtkRendererDelegate * Delegate
void SetLightCollection(vtkLightCollection *lights)
Set the collection of lights.
virtual void ReleaseGraphicsResources(vtkWindow *)
void PoseToWorld(double &wx, double &wy, double &wz) override
Convert to from pose coordinates.
void RemoveAllLights()
Remove all lights from the list of lights.
vtkTexture * BackgroundTexture
double GetZ(int x, int y)
Given a pixel location, return the Z value.
vtkCullerCollection * Cullers
void AddActor(vtkProp *p)
Add/Remove different types of props to the renderer.
vtkHardwareSelector * Selector
vtkTexture * RightBackgroundTexture
virtual vtkTypeBool UpdateLightsGeometryToFollowCamera()
Ask the lights in the scene that are not in world space (for instance, Headlights or CameraLights tha...
vtkTypeBool UseDepthPeeling
If this flag is on and the GPU supports it, depth peeling is used for rendering translucent materials...
vtkTypeBool UseHiddenLineRemoval
When this flag is on and the rendering engine supports it, wireframe polydata will be rendered using ...
void WorldToPose(double &wx, double &wy, double &wz) override
Convert to from pose coordinates.
vtkLightCollection * Lights
vtkTexture * GetLeftBackgroundTexture()
Set/Get the texture to be used for the monocular or stereo left eye background.
void ViewToWorld() override
Convert view point coordinates to world coordinates.
virtual void ClearLights()
Internal method temporarily removes lights before reloading them into graphics pipeline.
vtkLightCollection * GetLights()
Return the collection of lights.
vtkFXAAOptions * FXAAOptions
Holds the FXAA configuration.
void ViewToPose(double &wx, double &wy, double &wz) override
Convert to from pose coordinates.
void WorldToView() override
Convert world point coordinates to view coordinates.
virtual void DeviceRenderOpaqueGeometry(vtkFrameBufferObjectBase *fbo=nullptr)
Render opaque polygonal geometry.
vtkAssemblyPath * PickProp(double selectionX1, double selectionY1, double selectionX2, double selectionY2) override
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x,...
virtual void SetBackgroundTexture(vtkTexture *)
Set/Get the texture to be used for the monocular or stereo left eye background.
void AddVolume(vtkProp *p)
Add/Remove different types of props to the renderer.
void WorldToView(double &wx, double &wy, double &wz) override
Convert world point coordinates to view coordinates.
virtual void Clear()
Clear the image to the background color.
void ComputeVisiblePropBounds(double bounds[6])
Compute the bounding box of all the visible props Used in ResetCamera() and ResetCameraClippingRange(...
virtual void DeviceRenderTranslucentPolygonalGeometry(vtkFrameBufferObjectBase *fbo=nullptr)
Render translucent polygonal geometry.
void SetDelegate(vtkRendererDelegate *d)
Set/Get a custom Render call.
vtkInformation * Information
handles properties associated with a texture map
record modification and/or execution time
abstract specification for Viewports
virtual vtkAssemblyPath * PickProp(double selectionX, double selectionY)=0
Return the Prop that has the highest z value at the given x, y position in the viewport.
an ordered list of volumes
represents a volume (data & properties) in a rendered scene
window superclass for vtkRenderWindow
vtkTypeUInt32 vtkMTimeType
#define VTK_SIZEHINT(...)
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
#define VTK_MARSHALEXCLUDE(reason)