VTK  9.3.20240425
vtkRenderer.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
138#ifndef vtkRenderer_h
139#define vtkRenderer_h
140
141#include "vtkRenderingCoreModule.h" // For export macro
142#include "vtkViewport.h"
143#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
144
145#include "vtkActorCollection.h" // Needed for access in inline members
146#include "vtkVolumeCollection.h" // Needed for access in inline members
147
148#include <array> // To store matrices
149
150VTK_ABI_NAMESPACE_BEGIN
151class vtkFXAAOptions;
152class vtkRenderWindow;
153class vtkVolume;
154class vtkCuller;
155class vtkActor;
156class vtkActor2D;
157class vtkCamera;
159class vtkInformation;
162class vtkLight;
165class vtkRenderPass;
166class vtkTexture;
167
168class vtkRecti;
169class vtkVector3d;
170
171class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkRenderer : public vtkViewport
172{
173public:
174 vtkTypeMacro(vtkRenderer, vtkViewport);
175 void PrintSelf(ostream& os, vtkIndent indent) override;
176
182 static vtkRenderer* New();
183
185
195
200
205
210
214 vtkLightCollection* GetLights();
215
223
228
234 virtual vtkLight* MakeLight();
235
237
243 vtkGetMacro(TwoSidedLighting, vtkTypeBool);
244 vtkSetMacro(TwoSidedLighting, vtkTypeBool);
245 vtkBooleanMacro(TwoSidedLighting, vtkTypeBool);
247
249
262 vtkSetMacro(LightFollowCamera, vtkTypeBool);
263 vtkGetMacro(LightFollowCamera, vtkTypeBool);
264 vtkBooleanMacro(LightFollowCamera, vtkTypeBool);
266
268
276 vtkGetMacro(AutomaticLightCreation, vtkTypeBool);
277 vtkSetMacro(AutomaticLightCreation, vtkTypeBool);
278 vtkBooleanMacro(AutomaticLightCreation, vtkTypeBool);
280
287
292 vtkVolumeCollection* GetVolumes();
293
298 vtkActorCollection* GetActors();
299
303 void SetActiveCamera(vtkCamera*);
304
310 vtkCamera* GetActiveCamera();
311
317 virtual vtkCamera* MakeCamera();
318
320
326 vtkSetMacro(Erase, vtkTypeBool);
327 vtkGetMacro(Erase, vtkTypeBool);
328 vtkBooleanMacro(Erase, vtkTypeBool);
330
332
337 vtkSetMacro(Draw, vtkTypeBool);
338 vtkGetMacro(Draw, vtkTypeBool);
339 vtkBooleanMacro(Draw, vtkTypeBool);
341
346 int CaptureGL2PSSpecialProp(vtkProp*);
347
353 void SetGL2PSSpecialPropCollection(vtkPropCollection*);
354
358 void AddCuller(vtkCuller*);
359
363 void RemoveCuller(vtkCuller*);
364
368 vtkCullerCollection* GetCullers();
369
371
374 vtkSetVector3Macro(Ambient, double);
375 vtkGetVectorMacro(Ambient, double, 3);
377
379
383 vtkSetMacro(AllocatedRenderTime, double);
384 virtual double GetAllocatedRenderTime();
386
393 virtual double GetTimeFactor();
394
401 virtual void Render();
402
406 virtual void DeviceRender() {}
407
415
426
431 virtual void ClearLights() {}
432
436 virtual void Clear() {}
437
442
447
452 void ComputeVisiblePropBounds(double bounds[6]);
453
458
463 virtual void ResetCameraClippingRange();
464
466
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);
473
475
480 vtkSetClampMacro(NearClippingPlaneTolerance, double, 0, 0.99);
481 vtkGetMacro(NearClippingPlaneTolerance, double);
483
485
490 vtkSetClampMacro(ClippingRangeExpansion, double, 0, 0.99);
491 vtkGetMacro(ClippingRangeExpansion, double);
493
500 virtual void ResetCamera();
501
511 virtual void ResetCamera(const double bounds[6]);
512
516 virtual void ResetCamera(
517 double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
518
526 virtual void ResetCameraScreenSpace(double offsetRatio = 0.9);
527
536 virtual void ResetCameraScreenSpace(const double bounds[6], double offsetRatio = 0.9);
537
538 using vtkViewport::DisplayToWorld;
539
543 vtkVector3d DisplayToWorld(const vtkVector3d& display);
544
550 void ZoomToBoxUsingViewAngle(const vtkRecti& box, double offsetRatio = 1.0);
551
558 virtual void ResetCameraScreenSpace(double xmin, double xmax, double ymin, double ymax,
559 double zmin, double zmax, double offsetRatio = 0.9);
560
562
567 void SetRenderWindow(vtkRenderWindow*);
568 vtkRenderWindow* GetRenderWindow() { return this->RenderWindow; }
571
573
579 vtkSetMacro(BackingStore, vtkTypeBool);
580 vtkGetMacro(BackingStore, vtkTypeBool);
581 vtkBooleanMacro(BackingStore, vtkTypeBool);
583
585
590 vtkSetMacro(Interactive, vtkTypeBool);
591 vtkGetMacro(Interactive, vtkTypeBool);
592 vtkBooleanMacro(Interactive, vtkTypeBool);
594
596
607 virtual void SetLayer(int layer);
608 vtkGetMacro(Layer, int);
610
612
622 vtkGetMacro(PreserveColorBuffer, vtkTypeBool);
623 vtkSetMacro(PreserveColorBuffer, vtkTypeBool);
624 vtkBooleanMacro(PreserveColorBuffer, vtkTypeBool);
626
628
632 vtkSetMacro(PreserveDepthBuffer, vtkTypeBool);
633 vtkGetMacro(PreserveDepthBuffer, vtkTypeBool);
634 vtkBooleanMacro(PreserveDepthBuffer, vtkTypeBool);
636
642
646 void WorldToView() override;
647
649
652 void ViewToWorld() override;
653 void ViewToWorld(double& wx, double& wy, double& wz) override;
655
659 void WorldToView(double& wx, double& wy, double& wz) override;
660
662
665 void WorldToPose(double& wx, double& wy, double& wz) override;
666 void PoseToWorld(double& wx, double& wy, double& wz) override;
667 void ViewToPose(double& wx, double& wy, double& wz) override;
668 void PoseToView(double& wx, double& wy, double& wz) override;
670
675 double GetZ(int x, int y);
676
681
683
686 vtkGetMacro(LastRenderTimeInSeconds, double);
688
690
696 vtkGetMacro(NumberOfPropsRendered, int);
698
700
707 vtkAssemblyPath* PickProp(double selectionX, double selectionY) override
708 {
709 return this->PickProp(selectionX, selectionY, selectionX, selectionY);
710 }
712 double selectionX1, double selectionY1, double selectionX2, double selectionY2) override;
714
716
725 vtkAssemblyPath* PickProp(double selectionX, double selectionY, int fieldAssociation,
726 vtkSmartPointer<vtkSelection> selection) override
727 {
728 return this->PickProp(
729 selectionX, selectionY, selectionX, selectionY, fieldAssociation, selection);
730 }
731 vtkAssemblyPath* PickProp(double selectionX1, double selectionY1, double selectionX2,
732 double selectionY2, int fieldAssociation, vtkSmartPointer<vtkSelection> selection) override;
734
740 virtual void StereoMidpoint() {}
741
749
755 vtkTypeBool IsActiveCameraCreated() { return (this->ActiveCamera != nullptr); }
756
758
768 vtkSetMacro(UseDepthPeeling, vtkTypeBool);
769 vtkGetMacro(UseDepthPeeling, vtkTypeBool);
770 vtkBooleanMacro(UseDepthPeeling, vtkTypeBool);
772
778 vtkSetMacro(UseDepthPeelingForVolumes, bool);
779 vtkGetMacro(UseDepthPeelingForVolumes, bool);
780 vtkBooleanMacro(UseDepthPeelingForVolumes, bool);
781
783
792 vtkSetClampMacro(OcclusionRatio, double, 0.0, 0.5);
793 vtkGetMacro(OcclusionRatio, double);
795
797
802 vtkSetMacro(MaximumNumberOfPeels, int);
803 vtkGetMacro(MaximumNumberOfPeels, int);
805
807
812 vtkGetMacro(LastRenderingUsedDepthPeeling, vtkTypeBool);
814
816
820 vtkSetMacro(UseSSAO, bool);
821 vtkGetMacro(UseSSAO, bool);
822 vtkBooleanMacro(UseSSAO, bool);
824
826
830 vtkSetMacro(SSAORadius, double);
831 vtkGetMacro(SSAORadius, double);
833
835
839 vtkSetMacro(SSAOBias, double);
840 vtkGetMacro(SSAOBias, double);
842
844
848 vtkSetMacro(SSAOKernelSize, unsigned int);
849 vtkGetMacro(SSAOKernelSize, unsigned int);
851
853
858 vtkSetMacro(SSAOBlur, bool);
859 vtkGetMacro(SSAOBlur, bool);
860 vtkBooleanMacro(SSAOBlur, bool);
862
864
871 vtkGetObjectMacro(Delegate, vtkRendererDelegate);
873
875
880 vtkGetObjectMacro(Selector, vtkHardwareSelector);
882
884
892 vtkGetObjectMacro(BackgroundTexture, vtkTexture);
894
896
901 vtkGetObjectMacro(RightBackgroundTexture, vtkTexture);
903
905
909 vtkSetMacro(TexturedBackground, bool);
910 vtkGetMacro(TexturedBackground, bool);
911 vtkBooleanMacro(TexturedBackground, bool);
913
914 // method to release graphics resources in any derived renderers.
916
918
921 vtkSetMacro(UseFXAA, bool);
922 vtkGetMacro(UseFXAA, bool);
923 vtkBooleanMacro(UseFXAA, bool);
925
927
930 vtkGetObjectMacro(FXAAOptions, vtkFXAAOptions);
933
935
939 vtkSetMacro(UseShadows, vtkTypeBool);
940 vtkGetMacro(UseShadows, vtkTypeBool);
941 vtkBooleanMacro(UseShadows, vtkTypeBool);
943
945
949 vtkSetMacro(UseHiddenLineRemoval, vtkTypeBool);
950 vtkGetMacro(UseHiddenLineRemoval, vtkTypeBool);
951 vtkBooleanMacro(UseHiddenLineRemoval, vtkTypeBool);
953
954 // Set/Get a custom render pass.
955 // Initial value is NULL.
957 vtkGetObjectMacro(Pass, vtkRenderPass);
958
960
964 vtkGetObjectMacro(Information, vtkInformation);
966 virtual void SetInformation(vtkInformation*);
968
970
976 vtkSetMacro(UseImageBasedLighting, bool);
977 vtkGetMacro(UseImageBasedLighting, bool);
978 vtkBooleanMacro(UseImageBasedLighting, bool);
980
982
987 vtkGetObjectMacro(EnvironmentTexture, vtkTexture);
988 virtual void SetEnvironmentTexture(vtkTexture* texture, bool isSRGB = false);
990
992
995 vtkGetVector3Macro(EnvironmentUp, double);
996 vtkSetVector3Macro(EnvironmentUp, double);
998
1000
1003 vtkGetVector3Macro(EnvironmentRight, double);
1004 vtkSetVector3Macro(EnvironmentRight, double);
1006
1007protected:
1009 ~vtkRenderer() override;
1010
1011 // internal method to expand bounding box to consider model transform
1012 // matrix or model view transform matrix based on whether or not deering
1013 // frustum is used. 'bounds' buffer is mutated to the expanded box.
1014 virtual void ExpandBounds(double bounds[6], vtkMatrix4x4* matrix);
1015
1016 vtkCamera* ActiveCamera;
1017 vtkLight* CreatedLight;
1018
1021
1024
1025 double Ambient[3];
1026 vtkRenderWindow* RenderWindow;
1027 double AllocatedRenderTime;
1028 double TimeFactor;
1029 vtkTypeBool TwoSidedLighting;
1030 vtkTypeBool AutomaticLightCreation;
1031 vtkTypeBool BackingStore;
1032 unsigned char* BackingImage;
1033 int BackingStoreSize[2];
1034 vtkTimeStamp RenderTime;
1035
1036 double LastRenderTimeInSeconds;
1037
1038 vtkTypeBool LightFollowCamera;
1039
1040 // Allocate the time for each prop
1041 void AllocateTime();
1042
1043 // Internal variables indicating the number of props
1044 // that have been or will be rendered in each category.
1045 int NumberOfPropsRendered;
1046
1047 // A temporary list of props used for culling, and traversal
1048 // of all props when rendering
1049 vtkProp** PropArray;
1050 int PropArrayCount;
1051
1052 // Indicates if the renderer should receive events from an interactor.
1053 // Typically only used in conjunction with transparent renderers.
1054 vtkTypeBool Interactive;
1055
1056 // Shows what layer this renderer belongs to. Only of interested when
1057 // there are layered renderers.
1058 int Layer;
1059 vtkTypeBool PreserveColorBuffer;
1060 vtkTypeBool PreserveDepthBuffer;
1061
1062 // Holds the result of ComputeVisiblePropBounds so that it is visible from
1063 // wrapped languages
1064 double ComputedVisiblePropBounds[6];
1065
1073 double NearClippingPlaneTolerance;
1074
1079 double ClippingRangeExpansion;
1080
1088
1095
1099 vtkPropCollection* GL2PSSpecialPropCollection;
1100
1105 const std::array<double, 16>& GetCompositeProjectionTransformationMatrix();
1106
1111 const std::array<double, 16>& GetProjectionTransformationMatrix();
1112
1117 const std::array<double, 16>& GetViewTransformMatrix();
1118
1124 virtual int UpdateGeometry(vtkFrameBufferObjectBase* fbo = nullptr);
1125
1133 virtual int UpdateTranslucentPolygonalGeometry();
1134
1140 virtual int UpdateOpaquePolygonalGeometry();
1141
1146 virtual int UpdateCamera();
1147
1153 virtual vtkTypeBool UpdateLightGeometry();
1154
1159 virtual int UpdateLights() { return 0; }
1160
1167
1173
1178
1184
1190
1198
1204
1215
1222
1223 bool UseSSAO = false;
1224 double SSAORadius = 0.5;
1225 double SSAOBias = 0.01;
1226 unsigned int SSAOKernelSize = 32;
1227 bool SSAOBlur = false;
1228
1235
1236 // HARDWARE SELECTION ----------------------------------------
1238
1243 {
1244 this->Selector = selector;
1245 this->Modified();
1246 }
1247
1248 // End Ivars for visible cell selecting.
1250
1251 //---------------------------------------------------------------
1254
1258
1259 friend class vtkRenderPass;
1261
1262 // Arbitrary extra information associated with this renderer
1264
1267
1268 double EnvironmentUp[3];
1269 double EnvironmentRight[3];
1270
1271private:
1275 std::array<double, 16> CompositeProjectionTransformationMatrix;
1276
1280 double LastCompositeProjectionTransformationMatrixTiledAspectRatio;
1281
1285 vtkMTimeType LastCompositeProjectionTransformationMatrixCameraModified;
1286
1290 std::array<double, 16> ProjectionTransformationMatrix;
1291
1295 double LastProjectionTransformationMatrixTiledAspectRatio;
1296
1300 vtkMTimeType LastProjectionTransformationMatrixCameraModified;
1301
1305 std::array<double, 16> ViewTransformMatrix;
1306
1310 vtkMTimeType LastViewTransformCameraModified;
1311
1312 vtkRenderer(const vtkRenderer&) = delete;
1313 void operator=(const vtkRenderer&) = delete;
1314};
1315
1317{
1318 return this->Lights;
1319}
1320
1325{
1326 return this->Cullers;
1327}
1328
1329VTK_ABI_NAMESPACE_END
1330#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
an ordered list of actors
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
a list of nodes that form an assembly path
a virtual camera for 3D rendering
Definition vtkCamera.h:151
an ordered list of Cullers
a superclass for prop cullers
Definition vtkCuller.h:31
Configuration for FXAA implementations.
abstract interface to OpenGL FBOs
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
an ordered list of lights
a virtual light for 3D rendering
Definition vtkLight.h:159
represent and manipulate 4x4 transformation matrices
virtual void Modified()
Update the modification time for this object.
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
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.
vtkCamera * GetActiveCameraAndResetIfCreated()
Get the current camera and reset it only if it gets created automatically (see GetActiveCamera).
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.
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,...
void SetPass(vtkRenderPass *p)
vtkRenderPass * Pass
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.
double GetTiledAspectRatio()
Compute the aspect ratio of this renderer for the current tile.
void CreateLight()
Create and add a light to renderer.
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,...
void AddLight(vtkLight *)
Add a light to the list of lights.
vtkCullerCollection * GetCullers()
Return the collection of cullers.
virtual void SetRightBackgroundTexture(vtkTexture *)
Set/Get the texture to be used for the right eye background.
bool UseImageBasedLighting
int VisibleActorCount()
Returns the number of visible actors.
virtual vtkLight * MakeLight()
Create a new Light sutible for use with this type of Renderer.
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.
virtual void StereoMidpoint()
Do anything necessary between rendering the left and right viewpoints in a stereo render.
bool TexturedBackground
vtkWindow * GetVTKWindow() override
Specify the rendering window in which to draw.
double OcclusionRatio
In case of use of depth peeling technique for rendering translucent material, define the threshold un...
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.
vtkTexture * GetLeftBackgroundTexture()
Set/Get the texture to be used for the monocular or stereo left eye background.
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,...
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...
static vtkRenderer * New()
Create a vtkRenderer with a black background, a white ambient light, two-sided lighting turned on,...
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.
double * ComputeVisiblePropBounds()
Wrapper-friendly version of ComputeVisiblePropBounds.
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
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.
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
vtkAssemblyPath * PickProp(double selectionX, double selectionY) override
Return the prop (via a vtkAssemblyPath) that has the highest z value at the given x,...
Hold a reference to a vtkObjectBase instance.
handles properties associated with a texture map
Definition vtkTexture.h:167
record modification and/or execution time
abstract specification for Viewports
Definition vtkViewport.h:65
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
Definition vtkVolume.h:120
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_SIZEHINT(...)
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)