VTK  9.7.1
vtkFollower.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
23 #ifndef vtkFollower_h
24 #define vtkFollower_h
25 
26 #include "vtkActor.h"
27 #include "vtkRenderingCoreModule.h" // For export macro
28 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkCamera;
32 
33 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkFollower : public vtkActor
34 {
35 public:
36  vtkTypeMacro(vtkFollower, vtkActor);
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
42  static vtkFollower* New();
43 
45 
49  virtual void SetCamera(vtkCamera*);
50  vtkGetObjectMacro(Camera, vtkCamera);
52 
54 
59  int RenderOpaqueGeometry(vtkViewport* viewport) override;
60  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
61  virtual void Render(vtkRenderer* ren);
63 
67  void ReleaseGraphicsResources(vtkWindow*) override;
68 
73  void ComputeMatrix() override;
74 
78  void ShallowCopy(vtkProp* prop) override;
79 
80 protected:
81  vtkFollower();
82  ~vtkFollower() override;
83 
86 
87  // Internal matrices to avoid New/Delete for performance reasons
89 
90 private:
91  vtkFollower(const vtkFollower&) = delete;
92  void operator=(const vtkFollower&) = delete;
93 
94  // hide the two parameter Render() method from the user and the compiler.
95  void Render(vtkRenderer*, vtkMapper*) override {}
96 };
97 
98 VTK_ABI_NAMESPACE_END
99 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
virtual void Render(vtkRenderer *, vtkMapper *)
This causes the actor to be rendered.
Definition: vtkActor.h:83
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
abstract specification for Viewports
Definition: vtkViewport.h:46
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ShallowCopy(vtkProp *prop) override
Shallow copy of an actor.
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkCamera * Camera
Definition: vtkFollower.h:84
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
vtkActor * Device
Definition: vtkFollower.h:85
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
virtual void ComputeMatrix()
Generate the matrix based on ivars.
a simple class to control print indentation
Definition: vtkIndent.h:28
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
vtkMatrix4x4 * InternalMatrix
Definition: vtkFollower.h:88
abstract class specifies interface to map data to graphics primitives
Definition: vtkMapper.h:77
a subclass of actor that always faces the camera
Definition: vtkFollower.h:33
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
#define VTK_MARSHALAUTO
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.